object oriented game engine architecture

Started by
18 comments, last by Nirklas 20 years, 11 months ago
What are your thoughts on how to design a "general purpose" game engine? I know, general purpose is difficult, think maybe a 1942-type-of-game. But it''s the general design of the game engine that i''m interested in, not so much the graphics-engine, or the AI or the input-engine, but how they interact. What parts are MUST-HAVE? what parts are SHOULD-HAVE? COULD-HAVE? and, as I mentioned, how should they interact? Which patterns are useful? Where to use them, and WHY? For example... * Which part is responsible for creating / deleting new objects (enemies, powerups, projectiles etc)? * Should I have a common interface to control the entities that both the AI, the input-engine and the network-engine utilizes? etc, etc I''d like a general discussion on game engine architecture. =) i think this is the one part of game developing that there''s still very hard to find good articles / information about. I''ve got some ideas regarding some parts of an engine, but I think I want to hear some of your thoughts first... /Niklas Andersson Sweden
Advertisement
http://www.extremetech.com/article2/0,3973,594,00.asp
Ahh, well... I''ve been there ...and read that.
...and it''s not excactly what I''m looking for.

I''m more interested in game-engines object-oriented design

/Niklas Andersson
Sweden
Take a look at OGRE:

http://ogre.sourceforge.net

Pretty nice OO design they have there. Not sure how fast/efficient/etc it is.

Might give you an idea or two

[edited by - tyson on May 3, 2003 9:58:39 AM]
============================A guy, some jolt, and a whole lot of code :)
Go find the Nebula Device - free game engine using OO.
quote:Original post by Nirklas
What parts are MUST-HAVE?
what parts are SHOULD-HAVE?
COULD-HAVE?
and, as I mentioned, how should they interact?

Which patterns are useful? Where to use them, and WHY?

For example...
* Which part is responsible for creating / deleting new objects (enemies, powerups, projectiles etc)?

* Should I have a common interface to control the entities that both the AI, the input-engine and the network-engine utilizes?

etc, etc

I''d like a general discussion on game engine architecture. =)
i think this is the one part of game developing that there''s still very hard to find good articles / information about.

I''ve got some ideas regarding some parts of an engine, but I think I want to hear some of your thoughts first...


Just a few notes on what I did:
- The program controls the Game engine, which controls all "sub-engines" (Graphics, sound, input) by telling them when to do their job and with what.
- The game engine also controls all physics, the game loop, etc. It has functions like UpdateInput() which call those "sub-engines". Another function I used was PlaySound(int SoundIndex, ....) which played a loaded sound.
- OOP is the best way to go. Have similarly named functions in each engine (ex. Init, Unload, Draw/Paint, Move, etc).



- Rob Loach
Current Project: Go Through Object-Oriented Programming in C++ by Robert Lafore

"Do or do not. There is no try."
- Yoda
Rob Loach [Website] [Projects] [Contact]
quote:Original post by Rob Loach
- OOP is the best way to go.


A bold statement, a bold statement indeed. Before you make such a statement you should define what you mean by best .

- Damage Inc.
Another good thing to look at is the ''engine exports'' code in the Half-Life SDK. It should give you an idea of the kind of services a game engine makes available to the game. It''s not OO (at all - one big structure of function pointers ) - but it''s worth a look.

I *really* need to get my first few articles up

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

yes. yes you do. hurry up with those articles
quote:Original post by Tyson
Take a look at OGRE:

http://ogre.sourceforge.net

Pretty nice OO design they have there. Not sure how fast/efficient/etc it is.

Might give you an idea or two

[edited by - tyson on May 3, 2003 9:58:39 AM]



This is a graphics engine, not a GAME engine.


"Five passengers set sail that day, for a three hour tour, a three hour tour...."

This topic is closed to new replies.

Advertisement