Jump to content
  • Advertisement
Sign in to follow this  
SippyCup

SDL Questions

This topic is 4817 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

I have a couple of SDL questions. I haven't started programming with SDL yet. I know I could probably find the answers to these somewhere else, but I figured anyone who is experienced could answer me quickly and easily. First, I assume that anybody who wanted to play a game developed with SDL would have to have the SDL files. Is this true? Also, I was wondering if anybody knows for sure the best way to do things. I know you can reprogram the same code, say code to display a window, once for Windows and once for Linux, but that doesn't sound terribly efficient. Does anyone have a clue about how most big games are done?

Share this post


Link to post
Share on other sites
Advertisement
You can find the SDL files here.

If you use SDL and take care not to use any OS specific code, your game will really be cross platform compatible without any extra work on your side. I developed my game on Windows for several months. The linux port took a few hours and I got it to compile on Max OS X in less than an hour.

If your aim is cross platform compatibility, SDL is definitely the way to go.

Share this post


Link to post
Share on other sites
Quote:
Original post by SippyCup
First, I assume that anybody who wanted to play a game developed with SDL would have to have the SDL files. Is this true?


The simpler way to use SDL library and respect its license is to put a .dll in the system/application folder ( at least under Windows ).

Quote:

I know you can reprogram the same code, say code to display a window, once for Windows and once for Linux, but that doesn't sound terribly efficient.


At least you have to recompile and rebuild the project. Where is the problem ?
[smile]

Quote:

Does anyone have a clue about how most big games are done?


Commercial games use their own library.
As you can imagine great software houses cannot use open source libraries !
When you use an open source code your application inherits the same license!
But there are exceptions.
Loki software, for example, develops games for Linux using SDL ( if I'm not wrong ).

Share this post


Link to post
Share on other sites
For more resources on SDL, take a look here.

Quote:
First, I assume that anybody who wanted to play a game developed with SDL would have to have the SDL files. Is this true?


As with any game, the game itself should come with all required .dlls and files needed to run the program, so you don't need to worry about the end user not having them.

Quote:
Also, I was wondering if anybody knows for sure the best way to do things. I know you can reprogram the same code, say code to display a window, once for Windows and once for Linux, but that doesn't sound terribly efficient. Does anyone have a clue about how most big games are done?


The whole point of SDL is to provide cross-platform support, so you don't have to do this or worry about it [smile] With SDL you use the same code for linux and windows, as has been mentioned so far in this thread.

Share this post


Link to post
Share on other sites
Well, as the other posters have mentioned, SDL is made specifically for cross-platform support. Also, it has been used to make several professional games, including the latest Civilization game.

As to providing the SDL "files", I assume you mean SDL.dll and any other DLLs you use in your code. You have several options here. You can put them in the same directory as the executable. Alternatively, you might use some program that will make an installer for you. This allows you to specify where you want to put the game files on the user's computer. In that case, you can put all your DLLs in windows/system. This works just as well. Either way, those should be about the only files you need besides the executable (and of course artwork, scripts, etc).

Share this post


Link to post
Share on other sites
Quote:
Original post by SippyCupDoes anyone have a clue about how most big games are done?


Middleware seems to be commonly used by the big game companies these days.

You can also learn a fair bit about big games by reading postmortems.

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!