I'm a C# developer for the most part. Back in college I had classes on C/C++ so I "know C" and that's a good chunk of the reason I'm a C# developer.
However I've never had the chance to code in C/C++ professionally and I'd like to study how a modern game engine works, along with how an industrial grade C/C++ app operates.
The problem is, I have no idea where to start. As in, I downloaded the Quake 3 engine source code (which has been retronymed id Tech 3) and I'm not even sure where to start with it.
How should a sheltered C#/WinForms attack a massive C codebase like id Tech 3 or some other massive AAA engine?
The free game engines that use C++ are: CryEngine, Esenthel, G3D Innovation Engine, Godot, idTech, Irrlicht, Leadwerks, Limon Engine, Lumberyard, Lumix Engine, OGRE, Panda 3D, PhyreEngine, Source Engine (free if your game is free), Torque 3D, Toy Engine, Unigine, Unreal Engine, and Urho3D.
Game Engine development can take anywhere from a couple of days, to years. The expertise needed to make a small functional engine is a lot higher than the expertise needed to make a small functional game from an existing engine (keep that in mind). As an example, I made a 2D engine in about 6 months.
Try to do the simplest 3d "Hello World" program that uses the most basic subset of the engine. That will probably teach you loads.
With big code bases it's best not to try to learn everything all at once. Just dive in with a very specific question that you need to answer to yourself (or can search for on the internet), or a very specific task that you need to accomplish. This approach gives you the purpose and motivation you need to actually do some programming. The learning will come by itself.
Writing a mod would be a good starting point.
Start on charted territory: The vanilla game. Change stuff. Look at the grenade bounce code. Make it bounce further. Add client-side prediction (which non-bouncy projectiles already have).
Add a teleport weapon. It will tell you more about collision detection than you'd like to know.
There are a few key functions that handle most of the game: The engine exports, the trap_* calls. It might help a great deal to know what exactly mods are doing with them before opening up the engine code and looking at their implementation.
For example, it might tell you more about the engine to know that you need to call LinkEntity every time an entity moves or otherwise its position in the game BSP tree is not updated and subsequent engine calls might ignore it, than to know exactly how the tree is stored and accessed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With