Jump to content
OGXbox.com

Meerjel01

Members
  • Posts

    150
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Meerjel01

  1. There's a Unity version for the Xbox 360 that I want to use but I need a hard modded console for it. That or a way to turn my unmodded 360 to a homebrew console. Can someone that sells a 360 reach out to me here?

     

    I don't know if I should ask here but I have no other place to go to right now.

    Meerjel01

  2. 8 hours ago, Kalpi said:

    Never know until you try, make the first step and people are likely to join in to help

    Nah. Someone else has to do it since I have too much to do and too many projects to attend to.

  3. 15 minutes ago, Kalpi said:

    Looks interesting, but seems it fills the same role as SDL, which has a much larger knowledge base behind it. But maybe I'm just stuck in my ways.

    I think SFML is easier to learn for starters. For sure I didn't use SDL that much but it was a bit difficult for me to go with it at the start.

  4. We need to port SFML to the OG Xbox somehow. It should be possible since it's a "simple" library and can be ported to other things. I'm not sure if I can port it so I want someone else to do it properly even if I have to pay for it. Can someone port SFML to our classic console?

  5. Bump*

    Now I'm gonna talk about how I make the geometry for levels. I struggled with getting X file based geometry to work with UV2 (Lightmap UV) so I made my own technique to load a level.

    Using code similar to this made me able to load a level and learn custom file format programming. For the file I used to copy/paste data from an .x file with a text editor but now when I made a Blender export script it got easier to work with. I suggest using multiple files during development and then copy them over to a single map file. And using a texture container I can take a single-copy texture and place it on a surface without using up memory.

    This is a trial and error scenario. You need patience and skill for it to work.

  6. I've sent him a message here and his mail but if I can't reach him then I'll ask here what I wanted.

    I'm gonna try to make an engine from nothing but pure C++ following his tutorials on the website and this video. But his tutorial series was not finished and I need to figure out how to make audio play as well as having controller input.

  7. Can't edit an old post so here's the how to add to an array code made proper.

    numObjects++;
    CObjects* newList = new CObjects[numObjects];
    for(int t=0; t < numObjects - 1; t++)
    {
    	newList[t] = objectList[t];
    }
    newList[numObjects - 1] = tempObject; // Add the new Object
    objectList = new CObjects[numObjects];
    for(int i=0; i < numObjects; i++)
    {
    	objectList[i] = newList[i];
    }
    delete newList;

    The - 1 was needed to properly get an element from an array using the maximum size of it.

    • Like 1
  8. I'm going for the XTL in the mean time the nxdk gets easier to work with. Also do this

     

    std::ifstream fin("file.txt");
    
    if(!fin)
      return false;

    Not

    std::ifstream fin("file.txt");
    
    if(fin)
      return false;

    Everyone needs to remember to look through the code after these problems or it'll not do what it's supposed to do. Also "!fin" means "fin == NULL" if wanted to know.

     

    Another thing. I will try to make my own skinned mesh renderer code so I can have full control over it. (Like vertex data and animation blending)

  9. You can use the std library to create std::vector<Object> list variables if you feel like it. But I've found it to take up some space than a simple array. Sure std::vector is easier to use but it can't be that good for the Xbox for some reason other than increasing the size of the xbe. But I know a method to increase array size easily.

    It's to take the array you want to expand, place all of it's elements in a temporary array by for-looping, empty the first array, fill it with 1 more element, place a new object at the end of the array and put everything else from the temporary array back to the first one. Then delete the temporary array for memory's sake.

    I suggest that you make an int with the number of elements on an array for this like a "int numObjects" variable.

    numObjects++;
    CObjects* newList = new CObjects[numObjects];
    for(int t=0; t < numObjects; t++)
    {
    	newList[t] = objectList[t];
    }
    newList[numObjects] = tempObject; // Add the new Object
    objectList = new CObjects[numObjects];
    for(int i=0; i < numObjects; i++)
    {
    	objectList[i] = newList[i];
    }
    delete newList;

    You can make a func that takes an existing array and add something to it if you wish but that depends if it works for multiple types somehow.

    • Thanks 1
  10. I think I'll bring some of my time with 2D angular sprites in 3D now. I made a system that I wish to use called 4-Angular-Directional-Sprites in the past that only uses 2 textures for a single frame. It's used in my game Atmo but I want to implement it to the original Xbox as well.image.thumb.png.6aa3a2bb053891a7cf2425ef698fe457.png

    • Like 1
  11. I admit. I haven't gotten around to make an importer for skinned meshes with armatures yet. I was using the code from the example engine in the Xbox homebrew site. But I've added some extra features to it that was shown in the video above which was multiplying a matrix to a bone. Even getting the bone by name and set an index for it was programmed as well. So no I'm not the one to be credited for the whole code but the additions for it.

  12. Word of advice. When you want to draw something on the screen and are using multiple classes that shares Direct3DDevice, like this.

    bool Init(IDirect3DDevice8** device)
    {
    	directDevice = *device;
      	
      	// Rest of the code
      
      	return true;
    }

    It is important to use the more global variable (directDevice) later on. Not the one specific for the function (device). This would make the object unusable since the device isn't used by the application fully. It's like feeding someone an extinct animal. It won't come back.

    I say this cause I've had this issue lately. Remember to look closely at your code before compiling/test it.

    • Like 1
  13. When making a game from it’s own source code, it is viable to have some prebuilt functions to go with it so you don’t repeat unnecessarily. Classes is a thing you can use a lot but not a function if it already exists. Don’t invent the wheel when it’s already made.

    For example. A non-void function.

    float clamp(float v, float low, float high)
    {
    	return v <= low ? low : v <= high ? v : high;
    }

     

    Use this when you want to stop a floating value from going above or below a certain value. This can be useful in many cases when needed. Also

    float distance(D3DXVECTOR3 a, D3DXVECTOR3 b)
    {
    	return D3DXVec3Length(&(b - a));
    }

     

    Use this to get the distance between 2 points. You could use the code after ”return” but it’ll be wiser not to since that would add more unnecessary space to the program. Even when you think it’s not worth doing it, it’s still important to work hard for something to work the best.

    • Like 1
  14. When you’re about to program a game engine, make it as organized as you can. Make a lot of classes. This time I’m gonna tell you to make a game class that’ll contain the data for the actual gameplay. It’s recommended to do that. Make a game.h file and a class called CGame (Or how you like it to be called). It’s gonna contain the necessities for your game to run like update functions (EarlyUpdate(), Update(), LateUpdate()) and the render function(You probably only need one).

    You can keep the actual game loop in the main.cpp file but you can decide if you want the game’s functions to be called in the while loop in main or inside the actual game.

     

    Example on calling game funcs in main.cpp (You can find the DirectX draw methods in the website I linked)

    While(true)
    
    {
    
    game.EarlyUpdate();
    
    
    
    game.Update();
    
    (DirectX Draw Start)
    
    
    
    game.Render();
    
    
    
    (DirectX Draw End)
    
    
    
    game.LateUpdate();
    
    }

     

    Example on calling game funcs on the actual game.

    While(true)
    
    {
    
    if(game->loop() == 0)
    
    break;
    
    }

    The draw functions is in the CGame class so the main.cpp method is highly still valid here.

    Also keep making functions and variables for everything needed because that’s what makes a game run good enough OR great. Don't repeat code, use static methods!

    • Like 1

Board Life Status


Board startup date: April 23, 2017 12:45:48
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.