Game Development SDL vs. Opengl directly

I am making a game. It will have animation, drop down menus, sounds, and mouse interfaces. I have been looking into what to use for the development libraries. I took a look at SDL and it seemed to be more difficult then using OpenGL, and OpenAL directly. Can anyone, in simple terms, explain why using SDL is a better (easier) option? (Maybe just some missing features that only exist there)

Thanks in advance,
Walt

SDL is basicly just a bunch of helper libraries, and utilities. Many people have contributied their own utilities to it, so it is grown into being a handy toolkit.

You still have to write your own OpenGL application, it does not abstract that away from you, it just helps to bring up an OpenGL window, or start up the sound system. The rest is up to you, – you still have to write your own OpenGL application. ++ there are many contributions that add handy things like true-type fonts, jpeg/tiff image loading etc.

I personally started with glut for doing these things, because that was what was around at the time, but I’ve also used SDL, and it seems to be growing in ways that glut never will.

I also raccomand SDL over direct WM-specific code and SDL over GLUT.
For starters, it’s simply an overkill, it can reduce development time to a minimum.
The extra learning time is easily gained back as soon as you port.

Never take my advise… but here it is.

If I were working for a software house and were making
a linux game, I would pick SDL. Simply because it is
well established and since many people use it to write
games, it is most likely the best. Additionally, you
will be able to find answers to your questions by other
people who use it across the net. Ah, and I believe
an SDL-based game is more likely to be portable.

I like to re-invent the wheel, and so I wrote (and
I am still writting) all of it from the begining.
If learning (and thinking about things) is what you
are after, do it all yourself.

Finally, thank you for taking the time to make a
linux game! This is what is needed in the linux
community, more and more games, so that non-linux
users ca be lured over to our side…

Originally posted by iznogoud:
If I were working for a software house and were making a linux game, I would pick SDL. Simply because it is well established and since many people use it to write games, it is most likely the best.
I agree, furthermore some linux interfaces to this or that are somewhat ankward.

Originally posted by iznogoud:
Ah, and I believe an SDL-based game is more likely to be portable.
You can say it for sure. I ported something myself and I have some SDL based apps which run on both win32 and linux.

Originally posted by iznogoud:
I like to re-invent the wheel, and so I wrote (and I am still writting) all of it from the begining.
I’m also doing it because it’s not to reinvent the wheel. Sometimes, you need an extra feature from an OS and, rather than not having it, it’s better to have a wrapper which just says “everything works as in this OS” while in fact it’s just doing nothing.
Luckly, those things are for very advanced apps, but there could be a real need to do this.

Originally posted by iznogoud:
If learning (and thinking about things) is what you are after, do it all yourself.
I agree. So, why am I posting this?
Because doing this is hard. You can easily spend months on getting a nice API. Then, you know everything of every part of every service and API call you used and designed and you won’t need to search the internet anymore to find what a specific function does.
In the same time, someone which used SDL or a downloaded-from-the-internet API or framework, would have done a per-pixel, portal-based engine with BSP trees and skeletral animation (EDIT: still not understanding the magic behing the whole of it). This could be sad.
I write this words to say: “Hard work pays in the long run, but it’s painful in the beginning”.

Originally posted by iznogoud:
Finally, thank you for taking the time to make a linux game! This is what is needed in the linux
community, more and more games, so that non-linux users ca be lured over to our side…

I’m targeting linux for everything after I saw last distros at work. I think this is a real need, but I’m also developing something to port the whole SDK-CDK and stuff.
I must say however it’s something difficult. Could someone post a (useful) link on linux programming? I’m still having troubles.

PS: people which would write “google” should not reply to my question. I know how to use it, the fact is that forums are to share and someone sharing linux experience is what I’m searching for.

Phoa! I cannot believe there is someone out there
who almost completely agrees!

With regard to the “linux programming link” I have
one word of advise, “terminology.” Yes, I found out
that you can find out about most anything if you ask
the question in the right way and search (Google?)
for the right keywords.

I also believe that learning to get the most out of
your OS requires some basic knowledge of the guts of
the OS (linux or not…). Learning has a price, and
in most cases it is time – time well spent.

Keep asking questions. Keep questioning!

Thank you for all of your opinions. I am not worried about doing the hard work. I just wanted to use my time wisely. Now that I will probably be going with SDL, I have been to theire site. Is there any place where a more complete API exists for the SDL calls? I see that the manual has some calls but not all of them are described, and I could guess on most, I think this would be a mistake. Has anyone used any of the published books? If so could you recommend any of them?

Thanks Again

Strange enough. When I was looking at SDL I took everything from the official site and it contained all I needed. Maybe it was an old release?
Are you sure you looked close enough at the SDK?

PS: people which would write “google” should not reply to my question.
Check google!! :wink:
Sorry it was tempting :wink:

But seriously

Could someone post a (useful) link on linux programming? I’m still having troubles.
What you simply should do (imo) is take a look at the X API. I think that’s all you need, for the graphics part that is. Sound is a different story though. I’ve never done any sound specified coding on linux. However I do know that many people are using OpenAL. Maybe you should take a look at that.
Anywho I wish you good luck and I’m happy you’re not only coding that API of yours for Linux. After all we don’t like the win only APIs, isn’t.
Sorry I can’t give you any links…

Originally posted by <styx>:
Sorry it was tempting :wink:
Point taken then. :slight_smile:

Originally posted by <styx>:
What you simply should do (imo) is take a look at the X API. I think that’s all you need, for the graphics part that is.
Thank you. In fact, I stumbled on it some days ago. If someone wants it, I saved it to disk and edited so it stays on disk so I can send easily pack it up.

Originally posted by <styx>:
However I do know that many people are using OpenAL. Maybe you should take a look at that.
Unluckly, I did. My opinion on the thing is that AL is a bad thing. It takes the Open?L pattern so one realizes it’s as good as GL but in fact it is not. I don’t really like it.
Furthermore, from what I’ve read on the mail list, it’s not really “open”.
Personally, I like much more FMOD but it takes some cash to get it in a project.
OpenML is also very interesting. Too bad I still have to understand if this is a joke or not (maybe avaiable only on hi-end hw?).

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.