[SDL] A small game I'm writing

David K david at terrorpunksyndicate.org
Fri Jan 6 09:09:34 PST 2006


Hello!

I have been using SDL for about a month now, and actually I've only 
known proper C-programming for just about as long. I've known PHP for a 
couple of years, so it was relatively easy to learn C as well, and using 
SDL for graphics made it even easier.

Well, I just want to say BIG THANKS to everyone on this list, because 
I've learned so much in this short period of time, from digging through 
the archives. Here's a tip for those who need help and are afraid to ask 
because they might get "flamed" :-)

Go to www.google.com and type:

your topic site:www.libsdl.org

For example: "faster blit site:www.libsdl.org" (to do a search on 
messages concerning how to blit faster!)

I checked out David Olofsons game "Pig" and was very impressed with the 
speed, and I showed it to my girlfriend who even sat down and played it 
(and she's not the gamer type of person, if you know what I mean...).

Anyway! As a token of my appreciation for this mailing list even though 
I haven't been a member for much long, and only made 2-3 posts so far, I 
would like to demonstrate my current game project that's written in C 
and using SDL for graphics. Here's a link to the game: 
http://david.terrorpunksyndicate.org/tilesrpg6.rar

And here is ofcourse the source code for those who would like to study 
it: http://david.terrorpunksyndicate.org/rpgsource.rar

This is the final local single player test I've compiled before I start 
converting it to multiplayer. My aim is to write a graphical MUD / 
MMORPG / online 2D RPG where players use a client (C+SDL) to play on a 
server (pure C).

I have some issues with speed... It runs at approx 100 FPS here on my 
AMD Atlhon 1.6 ghz but I'm getting just 19 FPS(!!) on my P3 450. This is 
not acceptable for this kind of game on such a "fast" computer. I've 
done everything I know to speed up the game... convert all surfaces with 
SDL_DisplayFormat(), try to avoid blitting when not needed, etc etc.... 
If anyone would like to take a look at the code and perhaps give me a 
few tips on how to increase the speed on slower computers, by all means 
do so. :-)

Thanks again to everyone here on the SDL mailing list and good luck with 
all your projects. :-)

Best regards
David Karlgren




More information about the SDL mailing list