For being good game programmer ,good to use SDL?

Started by
15 comments, last by rip-off 12 years, 10 months ago
Hi All,

I just started developing games, i found that we can use SDL to develop games, but using such API's is really a good option?
or we should avoid such things to improve our skills? I want to be a good game programmer, so i think it will be good if i do many
of the things in my own?
Also game studios recruitment clearly shows the need to have good grip over c++ , OpenGl.
Using the SDL ,Can i still improve my these required skills?

Please suggest !!

Thanks&Regards
Advertisement
The purpose of SDL is to give you a cross-platform way of performing common tasks, like creating a GUI Window and accessing keyboard and mouse. If you only plan on creating a game for one platform and one only, then you might think of it as a convenience. If you ever plan to deploy it on multiple platforms (eg. Windows, OS X, Linux, iPhone, Android) then it is an absolute must that you use something like SDL.

Most people will tell you to use SFML instead of SDL, if you are planning on programming in C++.
If you want to develop games, no one will likely care about your skills in writing the boilerplate code for creating a window and setting up a suitable rendering context. In commercial situations, this is almost certainly already handled by existing code, either through a library/engine or some in-house project boilerplate.
Programming a game is such a vast task, you can use SDL and still find lots of things to practice your skills (and as said by others, more interesting things than what SDL does).

And if you ever feel limited, in possibilities or in "skill challenge", you can replace SDL with something of your own later.
When I first started working in 3D, I also used SDL. Eventually when I was comfortable enough with SDL, I ended up replacing it with Win32 API calls to have more control over my games. SDL was a great stepping stone for me because it let me get up and running quickly and what you learn there, carries forward to other platforms as well.
To answer part of your question a little more directly: YES -- using SDL will still let you practice your C++ and (if you choose to use it) OpenGL, and more importantly it will allow you to exercise your problem solving skills and create programs without having to worry about basic functionality like creating a window.

If you look at the List of games using SDL on Wikipedia you'll find that there are a lot of quality games, and that even some very big commercial titles have used it for Linux ports; working with SDL will not be a waste of your time.

- Jason Astle-Adams

I've never seen much of a point for using SDL for a few reasons:

  • It probably has the wrong open source license (its unusable as-is on platforms that don't have dll support), and for the platform's you would need the commercial license won't come with code to run on that platform (PS3, XBOX, etc) anyway, which more or less makes me wonder why the commercial license of SDL costs money.
  • You still have to deal with shaders (GLSL, Cg, HLSL), which arguably is where a huge portion of the code is going to live. Supporting more than one flavor is a huge amount of work, which can be mitigated with a language neutral shader generator (editor etc), which is also a huge amount of work to create.
  • Graphics API's in the grand scheme of things aren't all that complicated since the hardware does all of the work, using the APIs raw or even making a basic wrapper for one is a pretty trivial thing to do.
  • For C++ the real time consuming things end up being things like serialization, proper localization support and string handling, and memory management (multiple heaps, streaming textures etc)
http://www.gearboxsoftware.com/
It probably has the wrong open source license (its unusable as-is on platforms that don't have dll support), and for the platform's you would need the commercial license won't come with code to run on that platform (PS3, XBOX, etc) anyway, which more or less makes me wonder why the commercial license of SDL costs money.

It's not quite so simple. SDL 1.3 is now zlib (or some similarly permissive license). However, 1.3 is still a WIP (last I checked, at least), and so may not be suitable in some cases. 1.2.x is relatively stable, but is still LGPL (IINM). Whether that's a problem depends on the circumstances, of course.

Naturally, if a library doesn't support the platforms you're interested in or if the licensing terms or cost don't meet your requirements, then it probably won't be of much use to you. That goes for any library though, more or less (SDL isn't unique in this regard).

Graphics API's in the grand scheme of things aren't all that complicated since the hardware does all of the work, using the APIs raw or even making a basic wrapper for one is a pretty trivial thing to do.[/quote]
Although SDL 1.3 does provide a wrapper over the underlying graphics API for hardware-accelerated 2-d graphics, many people just use SDL to handle windowing and events, and do all the low-level graphics stuff themselves. As such, SDL is still useful even if you want to write all the low-level graphics code yourself.

For C++ the real time consuming things end up being things like serialization, proper localization support and string handling, and memory management (multiple heaps, streaming textures etc)[/quote]
If you're talking about development time, I'd say it's probably easy to underestimate what goes into a cross-platform library like SDL unless you've actually tried to implement such a framework yourself (that is, a library that supports at least Windows, OS X, and Linux, and offers support for windowing, events, basic audio, and so forth). It can be surprising how much is involved (IMX, at least).

Note that I'm not specifically advocating for the use of SDL here; I'm just responding to the points you raised.
Many open-source games use SDL, so if you are interesting in contributing to them, learning SDL would not be so bad. (There are also many using OpenGl.) It can only be a positive thing if you mention SDL on your CV, though OpenGl might have a higher status. With those API things though I think that when you have learned to use one it will be easy to learn the others.
SDL is really the only decent low level game programming API; this is compared to an API like the Windows 32 API.

SDL is also compatible with the much more powerful OpenGL. SDL has many tutorials on the web, Lazy Foo being the best I have found so far, though I no longer have a need for tutorials and only really use them as a reference. OpenGL, when used with SDL can give it a bigger punch. SDL should be learnt first then OpenGL (walk before running).

  • I would avoid SFML as there are very little tutorials and I don't really know a lot of support.
  • Allego (Don't make me laugh).
  • Win32 API is great, lots of control but without learning an API before, you will find it very difficult and probably get frustrated.
It is important to start with an API that is technical enough, yet simple enough for you to use; there is no point in abandoning games half through because you don't know how to solve the programming specifics. It will also help to build up your problem solving skills, which you will use across all APIs that you learn.
[size="5"]My Twitter

[size="2"]I do not care for reputation, merely to help fellow users.

This topic is closed to new replies.

Advertisement