Where to start coding a game engine?

Started by
16 comments, last by CrazyCdn 16 years, 9 months ago
I've become interested in programming a properitry game engine for my projects needs. I have no clue where to start... Can anyone give me an insight on some good tutorials or something or advice :)
Advertisement
Before we can answer that question, how much programing experience do you have? What programming language are you going to be using? How much game programing experience do you have?

theTroll
You could start with the Enginuity series here on GameDev. It isn't really deep, but it should whet your appetite.

There are quite a few books on the subject, as well. I'm sure you'll get some opinions about the quality of those books in other responses, but I've heard the names of the first couple listed thrown around here a few times.

EDIT: Enginuity link fixed.
No, don't use the Enginuity series, unless you know the downfalls of singletons. The engine he was writing was quite singleton heavy. If you're using it as a very general overview it might be ok but its highly dated at this point.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

Thanks! I have 2 years of experience with C++ and 1 Year with C#, it wouldn't matter to me which one I'd use...

EDIT: Haha, hadn't even seen you post that :P Ok, is there any other tutorial series?
Or instead of reading Enginuity, which even Superpig thinks sucks (some say), you could write a game, not an engine. You could also read this link which has some good discussion on game engine design.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

Thanks, but I need to code an engine for a company which will be doing several more games. To save time, we would like to code an engine :P

Thanks for the other link though :P
Then I would suggest jumping into XNA. It is pretty easy, decent performance, no memory leaks.

theTroll
For our engine, I used the bottom-up approch, starting from the
basic details, and building on them.

The basic details include calling conventions, data type sizes,
architecture types, and engine building (DLL and static *.libs).

All engines should have a logging manager and a memory manager
(Of sorts), espically if using C++. You can also provide a Task
Manager system (The Enginuity series describes how to do this)

You can then provide base interfaces to individual subsystems,
such as Video, and Input. Using the Task Manager, you can provide
multiple instances (if any) of the subsystems.

Other possible managers you can have are module managers, file managers,
diectory managers, etc. It all depends on what you want the engine to
do, and if portability is a concern.

On the usage of singletons--overusing them is bad. Probably the only
class that should be a singleton is the engine core--but, then again,
it depends on what your needs are.
I've found over and over that any attempts to design a game engine without a game have been semi-failures, because once it came down to writing the game, the engine was forced to mutate substantially. Maybe it's different when you've had a lot of experience, but for me, the game always ends up needing things that the engine didn't plan for or needs them in a different way.

Instead of building engine, game, game, game, build the engine and first game together. Take longer about it and take the time to refactor and redesign as you go. That way you will end up with an engine that actually suits your needs.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

This topic is closed to new replies.

Advertisement