Archived

This topic is now archived and is closed to further replies.

XELON

What is a game engine anyway?

Recommended Posts

Still I can''t find out the purpose of making engines.Are the game engines used to show the textures of the game? For example When I make a game like Mario or Sonic (2D), Do I have to make an game engine?If yes , where and Why do I use it? Another question is while the hero of my 2D game is walking through the road,The screen has to be move right or left.Or the textures has to be moved right or left to show the hero is walking. If true,then how can i do this?Can it be done just using one map for each mission and move it to right or left according to the players movements? In short,The game engines are used to show the map and the hero (or whatever) according to the player''s movements.Is that right???

Share this post


Link to post
Share on other sites
quote:
Original post by XELON
Still I can''t find out the purpose of making engines.Are the game engines used to show the textures of the game?
For example When I make a game like Mario or Sonic (2D), Do I have to make an game engine?If yes , where and Why do I use it?

Another question is while the hero of my 2D game is walking through the road,The screen has to be move right or left.Or the textures has to be moved right or left to show the hero is walking.
If true,then how can i do this?Can it be done just using one map for each mission and move it to right or left according to the players movements?


In short,The game engines are used to show the map and the hero (or whatever) according to the player''s movements.Is that right???



Game Engines are lower level than that. A game engine is the bridge between you and DirectX. When you write a game, you have to make up all these functions (well if you are organized you would) that help automate various things better. For example, you may want a function that plots an RGB pixel to the screen. For this you may want a function that you can call that will obtain your DirectX surface, another that will actually plot the pixel, etc etc.

Game Engines are the reusable part that you don''t want to always keep rewriting that do the same damn thing as last time. They''re just functions and classes, etc that make your life a bit easier. Basically if you write a game, you can''t help but have written an engine too, you just might not know it.

If you''ve written a game and are not sure which part is the Engine, it is the part as I said before, that you could separate from your game, and build a whole new game on top of. It does all of the menial tasks etc.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
a game engine is a collection of c++ code to help making a game easier

for example a class in a game engine might be CPlayer

so you just #include "player.h" into your game and use it

CPlayer Mario;
Mario.Create(100, 200, true, "mario.bmp";
Mario.Draw(0, 0);
Mario.Destroy();

Share this post


Link to post
Share on other sites
quote:
Original post by Hellraisr
A game engine is the bridge between you and DirectX.
To be precise, a game engine is the bridge between you and graphics/input/sound libraries (not necessarily DirectX ).

quote:
XELON
In short,The game engines are used to show the map and the hero (or whatever) according to the player''s movements.Is that right???

Yes.

Consider this example of an RPG game:
The game engine part is:
- displays pictures
- plays sounds
- receives inputs
- (RPG specific) experience calculator
- (RPG specific) monster generator

The game part is:
- Mr.X is the final boss
- When I press spacebar, my character casts uber spells.
- When I open chests, it will always blow up and reduce my character''s HP to 10%.
- My character has a dog named Billy.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Anonymous Poster
a game engine is a collection of c++ code to help making a game easier


since when does it have to be in C++??

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I said c++ without thinking cause I use c++

a game engine is a collection of code to help making a game easier

Share this post


Link to post
Share on other sites