anthony asks “I’m an aspiring AI Programmer, I’ve written a few small games for college projects and I’ll be doing my MSc thesis soon enough.
I was wondering if you thought it would be a better idea to write my own small game (e.g. a simple variant on CTF in 2D) for testing out various AI techniques or to use an existing game (Doom3, Unreal etc) instead.”
That’s a great question. Before I discuss engines in more detail, here’s some advice for your research in general:
Write the bulk of your AI code as a separate library to be engine independent.
Use console-based automated tests to prototype all your functionality.
Integrate working features into whichever engine you feel most comfortable with.
The idea is that you shouldn’t be too dependent on any engine. You don’t have to develop in fully test-driven style, but using a simple text-based application with multiple little tests is a great workflow for helping you prototype ideas.
As for the engines, ultimately it’ll depend on how comfortable you are with the codebase and the tools you choose. Your experience of the C++ language and with large game projects should affect your decision.
Existing Game Engines
Most game engines are not easy to extend, despite what their marketing department tells you! It takes whole teams of professionals to reuse a game engine and make a just a simple derivative. The further you diverge from what the engine was intended to do, the harder it is to change.
With that in mind, here’s some advice to help you focus on your AI research and be more productive:
Go for open source game engines if possible (e.g. Quake 3). Having the whole code available is a huge help when trying to understand the codebase, and it also removes any limitations.
Use older engines that were developed a few years ago (e.g. Quake 2). You don’t need the graphical bells and whistles of modern engines, and you’ll get a faster simulation because of it.
Also, consider picking an engine that’s most similar to what you want to do (or design your demo to match what’s possible with the game engine).
There certainly are many advantages of working with a real commercial codebase, warts and all.
It’s one of the greatest skills to be able to understand and learn from large codebases and poorly documented source!
Working on AI in 3D environments is an important skill to have if you want to move into industry later.
Using game engine makes for a better demo, so it’ll be easier for you to convince game developers of the applicability of your ideas.
In essence, using an existing game engine is the best way to go if you’re technically comfortable with using one.
It’s probably not wise to attempt to rebuild a 3D environment yourself. It’ll take a lot of work to find models, animations, textures, etc. However, as you said, a 2D environment is very sensible.
To to that, you can use an open source engine which will allow you to create a simple vector-based renderer:
With simpler frameworks such as SDL.
I’d recommend this approach if you’re not too confident with fully blown game engines, or you don’t want the benefits of a 3D demo, then this approach is for you.
If you have any advice for Anthony post it in the comments!