SDL engine

Started by
8 comments, last by Kwizatz 16 years, 10 months ago
Hi, I'm trying to learn c++ with the goal able to program 2D games like pacman and stuff like mario bros and final fantasy I. Although C++ is new to me, I have done several other object oriented programming languages, like java. However, I never programmed games before. I read an article about game programming, saying that I need a game engine, it recommended SDL (http://www.libsdl.org/). When I looked up for some demo's of SDL, I didn't like the program going full screen all the time. Does anyone know if it's possible to make stuff run in a windowed mode with this engine? Also, is this a good game engine to start with and will I need more advanced engine later on?
Advertisement
Yes, SDL can run in windowed mode.

However, SDL isn't really an engine. What it does is it makes graphics, sounds, input, etc. much simipler than many other methods (such as using the Windows SDK and DirectX), so you can focus on making the game and not on making all the background stuff needed to get the game up and running.
SDL is a multimedia library, not an engine, the engine is what makes a game run that is not the game itself (IE: Sound system, Rendering System, Physics and collision detection, GUI, etc.).

Games use Engines which use libraries which provide an API.

Quote:
saying that I need a game engine,

An engine is not required to make a game.
Quote:Original post by jpetrie
Quote:
saying that I need a game engine,

An engine is not required to make a game.


Correct! but using an existing one would theoretically shorten development time, and coding your game with a game/engine duality makes it easier to use the same core functionality (the engine) on your future games.
Oh, definitely. But the misconception that game engines are required components of game development, and that one must "build or buy" one is one of my pet peeves.
Oh I see. But is SDL suitable for making 2D games? Or should I use a real engine? What good game engines are there out there?
Quote:Original post by HawkAgent
Oh I see. But is SDL suitable for making 2D games?


Yes, so is Allegro if you want to shop around for options, these basically give you low level access to hardware. I believe Allegro has some higher level stuff, sprite functionality for example, you have to evaluate which one better fits your needs.

Quote:Original post by HawkAgent
Or should I use a real engine?


Its up to you really.

Quote:Original post by HawkAgent
What good game engines are there out there?


A simple google search returns plenty of results, Haaf's game engine looks very good, but that was the only one I checked any further [smile].
Oh well since I already started working with SDL, I might as well go on with it, so I can get more comfortable with c++.
Is there anywhere I can find a full list of SDL's constants, classes and methods?
Quote:Original post by HawkAgent
Oh well since I already started working with SDL, I might as well go on with it, so I can get more comfortable with c++.
Is there anywhere I can find a full list of SDL's constants, classes and methods?


Yes, http://libsdl.org/ which I linked before, check documentation, if you want a more specific link, this is a direct link to the SDL API reference in Wiki form.

Edit: since you asked for classes and methods I might as well clear something for you, SDL is written in C, and uses a C API, so there are no classes or methods, the API consists of a collection of functions and structures, in other words its procedural rather than object oriented, that does not keep you from using it on a C++ application or as part of an OO program, you'll just have to adjust.

This topic is closed to new replies.

Advertisement