Sign in to follow this  
kimi

SDL game help/guides

Recommended Posts

Hi all, I am trying to program game on SDL. I use very helpful tutorials but I need more help,suggestions and guides. Can anyone please help in graphics, sound ???. How to use some simple graphics and sound in the game[help] and how to use bullets(like a gun) or some AI enemy scrolling in the screen like mario ?( u jump over it to avoid or on it to kill it)

Share this post


Link to post
Share on other sites
I recommend http://lazyfoo.net/SDL_tutorials/index.php
Includes tuts for all of the different OS/Compiler combinations you may have

also theres a forum topic on this
http://www.gamedev.net/community/forums/topic.asp?topic_id=339189#SDL

Share this post


Link to post
Share on other sites
Thanks for the replies.

@conorH, yes I am following Lazy Foo excelent tutorial along with other useful tutorial to learn SDL[smile]

@Simian Man, thanks for the link I will read that aswell, looks very helpful. I will see if I can understand it [wink]

Share this post


Link to post
Share on other sites
Can anyone tell me how can I combine a sequence of program to work in order. I mean for eg: First I creat a menu and load surfaces with text messages to strat the game after clicking and selecting I want a new window in which the game get started.

I am not able to write one big program which consist of all things, it is getting very tedious and difficult to bug also.

Share this post


Link to post
Share on other sites
The best approach to 'clueing it all together', that I've seen 'til now, is described in this article:

Managing Game States in C++

I use this sort of state management in my 3D adventure game project and would recommend it for all sorts of 'bigger' games. It gives you a neat and flexible structure to work with, while keeping the different states tied together by the state manager.
But of course this solution would lead to: "write one big program which consist of all things".

So, since you don't feel able to do that (like you've mentioned), you could just write a simple GUI with, say 3, buttons, labeled 'Start Intro', 'Start Game', 'Quit' and then use system in the corresponding callback to start your Intro.bin or your Game.bin by clicking on one of the buttons of your GUI.

For Example:

Your callback for the 'Start Intro' button could look like this:


static void StartIntroCallback()
{
if (system ("Intro.bin"))
{
cout << "Error loading Intro" << endl;
}
else
{
cout << "Intro loaded" << endl;
}
}



For system to work in c++, you'll have to #include <cstdlib>.

Share this post


Link to post
Share on other sites
Thanks for the reply. I will see what I can do. For now I am just writing different programs. It is not big game what I learned from tutorial just want to apply most things.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this