Jump to content
  • Advertisement
Sign in to follow this  
RevahDan

Few questions about SDL

This topic is 3947 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 learned SDL from this great website: http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index. and i have a few questions about it: 1. how do i change the window title because i keep getting "SDL_APP" and i have no idea how i can change it. 2. i wanted to know if theres a way that the user won't see the images i am loading to my application, because on the tutorials they are loading from a data folder BMP images and the user could easy change them. 3. do u know any other resources that could improve my sdl programming skills ?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by RevahDan
1. how do i change the window title because i keep getting "SDL_APP" and i have no idea how i can change it.


SDL_WM_SetCaption("My Awesome Game!",0);

Quote:

2. i wanted to know if theres a way that the user won't see the images i am loading to my application, because on the tutorials they are loading from a data folder BMP images and the user could easy change them.


That can be considered a bonus (allows the user to modify the game with better graphics). Other than that you could use something like zlib and load all the images from a zip file (you can rename the zip file to .blob or whatever so naive users won't try to extract them). This is essentially what Quake 3 did (AFAIK). Finally, you can embed images in the executable itself, using resource files. I've never used them, so I can't give you any additional info.

Note: A determined user could probably replace the image files in all cases (though I admit I'm not sure how easy the executable route would be).

I recommend taking the simplest solution unless, keep them in a folder.

Quote:

3. do u know any other resources that could improve my sdl programming skills ?


The SDL documentation wiki.
Lazy Foo's tutorials (these are more up-to-date, AFAIK).

Share this post


Link to post
Share on other sites
Quote:
Original post by rip-off
Other than that you could use something like zlib and load all the images from a zip file (you can rename the zip file to .blob or whatever).

zlib is definitely an option, but I'd recommend using something a little more higher level like PhysFS.
Quote:

Note: A determined user could probably replace the image files in all cases (though I admit I'm not sure how easy the executable route would be).

If you mean Windows resources via .rc files, LoadResource() and all that jazz, it's trivial. Executable resources are designed to be easily modified.

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!