Jump to content
  • Advertisement
Sign in to follow this  
HawkAgent

SDL engine

This topic is 4177 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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].

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!