Game Programming

Ive started using SFML, and SDL and they are quite easy but I dont know if hey are game engines... I dont really understand this term. Is it something that allows programmers to create games easier because they contain functions that the users can use and etc, etc... Also, how hard would it be to create a game engine? Could someone give me a simple example of creating a shape with this custom engine? Lastly, what are some good books to get started with this cause Ive got a week off school and I want to make the most of it.

thanks
Engine is kind of a buzzword. It can really encompass anything; rendering, sound, inputs, physics etc.

SFML and SDL are both suitable for making games, yes. They interface with lower-level graphics libraries (OpenGL) so that you don't have to.

Creating your own engine isn't unheard of, but it'll take some effort. You'll need to understand programming for OpenGL or DirectX pretty well. Or at least enough to hack something half decent together.

Making a game and making a game engine are two entirely different tasks. If you want to make a game, go with SFML or SDL (I prefer SFML). If you want to look at your own engine (with whatever elements you want to include), I'd start looking in depth at OpenGL/OpenAL etc.
closed account (zb0S216C)
Hazique35 wrote:
"Ive started using SFML, and SDL and they are quite easy but I dont know if hey are game engines"

They're not.

Hazique35 wrote:
"I dont really understand this term."

There's no consensus on what constitutes as a game-engine. In simpler words, a game-engine has no definite definition. Though, to be overly general, a game-engine consists of "components", such as graphics, audio, etcetera, which are all linked in some logical way.

Game-engines, commercial or private, always focus on one specific game genre, such as first-person shooter or racing simulators. Very few game-engines exists that are capable of handling multiple genres, but even so, they tend to have undue complexity. One thing most engines have in common, however, is that they provide a cross-platform interface for multiple operating systems just like the CryENGINE.

Hazique35 wrote:
"Is it something that allows programmers to create games easier because they contain functions that the users can use and etc, etc..."

In a way, yes. An engine ties multiple aspects of a game together in either a object-orientated fashion or as a C-style interface. The engine itself is not part of the game, but a system on which the game is built. The game uses the engine's objects and/or API to get some task done. Here's a very quick example of how a game integrates an engine:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// Engine Header:
//
namespace Engine
{
  class IGame_Object
  {
    virtual void Update( ) = 0;
    virtual void Destroy( ) = 0;
  };
}

//
// Game Header
//
namespace Game
{
  class Destroyable_Object
    : Engine::IGame_Object
  {
    void Update( )
    {
      // ...
    }

    void Destroy( )
    {
      // ...
    }
  };
}

Hazique35 wrote:
"Also, how hard would it be to create a game engine? "

Most people on this forum would gladly agree that building an engine is something that's best left to experienced programmers, especially those with game development experience. I disagree. A game-engine can be as trivial as text-based I/O and audio and it will still constitute as an engine in my book. The amount of components and the complexity of the component's implementation determines just how difficult the engine is to implement. Remember: a game-engine is a system and a system must contain at least two components that are linked together in order for that system to actually be considered a system.

In regards to books, I don't know of any. In fact, a game-engine is all about common sense and knowledge of the programming language of choice. As I said, there's no definite engine architecture which developers must follow, so it's up to you to decide how the engine looks and behaves during run-time.

Good luck.

Wazzak
Last edited on
thanks for the answers. So making an engine is very complex by the looks of it... Another question, OpenGL is a game engine that s used to make things such as SDL and SFML? Also, Ive heard of STL. When someone learns this in depth, can they pretty much program anything? Sorry if some of these questions are repetitive, I just want the correct answers in my head.
I would categorize SDL and SFML as multimedia libraries that can be used to make games (as well as many other libraries). I look at game "engines" as the reusable parts of a type of game. For example you could make an engine for a 2D side scrolling platformer that has things specific to 2D side scrolling platformers, as in how you handle collision, character movement, map movement, etc... The engine could the be used to make other games of that type, but for a different type of game (RPG etc...) could require a complete re-write or heavy adaptation.
So making an engine is very complex by the looks of it...
It would completely depend on the complexity of the game you plan to make.

OpenGL is a game engine
I wouldn't call openGL a game engine, it's a graphics specification that is implemented by video card manufacturers and only handles drawing.
thanks for the answers
Topic archived. No new replies allowed.