What is an Engine

Hi, I’m very new to graphics programming. I love computer games and often come across phrases like: “they have developped a completly new graphics engine for this game”, but actually to be honest, I don’t exactly know what an engine is, and what it does. Is OpenGL an engine or not???

Hi,

A game engine makes it posibble for the actual game to draw graphics play sounds etc.

So the engine could contain code for drawing and moving objects in a 3D world, playing sounds and music, calculating physical interactions and other stuff that doesn’t change from one game to another.

OpenGL is an “application programming interface” =).
OpenGL is often used by the engine to draw the graphics.

Hope this made sense.

First off, no, OpenGL is not an engine. It is a graphics API. A game engine has to generally do quite a bit more than just draw stuff on a screen. For example a game engine in a generic sense must deal with graphics output, sound output, controller feedback output, controller input, media input/output, time, game state, and AI. Under a finer grained look of course, some of those tasks may involve multiple subtasks. A game engine must also free wheel.
When you take the free wheeling nature of the game engine, you can think of the task modules as specialized engines since they too may freewheel. So you could call the graphics module a graphics engine. That is, it doesn’t stop running until you exit the game (or it crashes). The graphics portion of the engine may use OpenGL to draw the graphics.

So, how would I program a simple engine? Would I just define a function like:

void CreateWindow(int xSize, int ySize);

Enter the code for this function in the header file and then just always include the header file in my function?

This sounds like a wind up, is it April Fools already??

ps Apologies if you are serious

Originally posted by endo:
[b]This sounds like a wind up, is it April Fools already??

ps Apologies if you are serious[/b]

No, for gods sake, this is not a wind up. Look at my UserName. It probably is a really stupid question and if someone gives me a real good answer, I will probably understand that this was a stupid question, but just please answer my question.

Check out mine, it is at URL ri927.net. I call it the Emily Game Engine, it is real simple and I’m still adding alot of stuff to it.

Maybe I can help you. You say that you are
very newbie in game programming. Before you start to write an engine(with OpenGL as graphic API) , you should learn to
understand what is OpenGl and what can I do with OpenGL. In internet, there are a lot of
sites that offers online tutorials for OpenGL. You should visit nehe.gamedev.net.
Nehe has created very good tuts for newbies.
He explains people how people create a Window
(fullscreen and windowed), etc.
If you want to learn details OpenGL, you should buy the OpenGL programming guide book. For the basic requirement, you should know c or better c++.