Meerjel01 Posted 20 hours ago Report Share Posted 20 hours ago This topic is gonna be about programming for the Original Xbox using the official Xbox Developer Kit! Using DirectX 8. Since I’m capable of it I decided to make my own tutorial series for people to learn from. Let’s begin! First you’ll need to download and install the tools. I’m not gonna instruct you on the process of getting the DevKit to work or where to get it. This is just a C++ tutorial. After you’ve opened VS2003, make a new project. There’s a preset for Xbox developers in the New Project window, use it, make it an empty game application and create a .cpp file. In the file, include the xtl library. #inlcude <xtl.h> The main method should also look like this. Void __cdecl main() { } There’s a site dedicated to DirectX/C++ development so use that first if you don’t know how the basics of the XTL works. https://xbdev.net/tuts/tuts.php After that, I’m gonna tell you how I do things. 2 Quote Link to comment Share on other sites More sharing options...
Meerjel01 Posted 2 hours ago Author Report Share Posted 2 hours ago 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.