I am interested in learning how to write a game engine of my own… I am an experianced c/c++/ogl programmer and just need some resources of where to get started and also some information about engines in general (what exactly is the engines responsibility etc… anyway if anyone has any ideas…
Also anyone know anything about running gl over a network?
the game engine responsability are… everything!!!
In a magic world with fairies where everything is perfect, you could just use one engine and modify only the artwork and levels and you have different games.
Writing an engine isn’t a specific task. It’s a mix of AI, physics, graphics, game logic and networking.
All those things wrapped up in a nice software architecture gives you a game engine.
So pretty much you need some knowlegde in all those areas to write one.
Goodie goodie gumdrops Any resources?
Well, (gets ready to plug a book)
The book Windows Game Programing for Dummies is great if you want to blend Direct X into the game engine. Which I recommend. The two things that is lacks is info on Direct 3D(hell I like OpenGl better) and Direct Play (game networking).
Other then that… It’s got everything. Has a AI chaper on the CD, Direct Sound, Direct Input, and it’s easy to understand.
I think a good toolbox is made up of several smaller “enginettes” rather than a big, mega-engine.
Thus, you’d have the sound engine, responsible for talking to underlaying hardware, possibly substitute mixing and positioning if not available in hardware, etc.
Then you’d have the AI engine, which would do pathing, physics, and other sh!t-happening stuff.
Add a separate logic engine (also known as “scripting language”) for “writing the game”.
Communication engine for network games (and, possibly, run all input through this engine, too, depending on your model).
Graphics engine, which just renders the world view each frame. Here’s where you can use OpenGL. You could start by just writing this part, and mocking up (or not even worrying about) the other parts.
Also, there are a number of sub-enginettes that you can plug into the graphics and/or AI/physics engines, like particle systems, skeletal animation, etc.
Of course, these engines talk to each other to more or less extent; a scripted event might change the physics parameters; the physics will update the world components, which in turn changes the source of a 3D sound… But with good design, these interfaces are clean and you can shear off one implementation (engine) and put in another.
I guess there is one “meta-engine” which is the World State Representation Engine. Here’s where you can gain lots of efficiencies (if you’re careful) or lose big (if you’re fond of aiming at your feet). All the other engines need services from, and/or operate upon, world state, so you might want to start there.
I personally found Windows Game Programming for Dummies fairly useless. And I didn’t even know that much Windows programming to begin with. I liked “Inside DirectX” much better (as far as Windows game programming goes) and the red book for OpenGL. Your taste may vary.