PDA

View Full Version : SDLGameBase 0.1 Released


IBethune
2003.11.27, 02:43 PM
I have just put together a code base for SDL/C++ games to use. It includes the View and Controller parts of an MVC architecture (which I can recommend using!) and a basic event loop. It also has a custom image loading library, where you define images to be loaded in an XML file, which saves hours of work over the course of a project, as you don't need to recompile to change graphics.

Can people please download and try it out. Have a look around the code and see if there is anything you find unclear, or just plain wrong! The link is http://www.pyramid-productions.net/downloads/sdlgamebase.sit

Let me know what you think - I know something like this would have been handy for me...

- Iain

codemattic
2003.11.28, 04:10 PM
Im having a little bit of trouble here. I get an error in SDLMain.m in the #import "SDL.h" line with the error "SDL.h: No such file or directory". And yet I can click on Resources/SDL.framework in the "groups and files" section and sdl.h is right there. I installed the SDL.pkg on my machine - but no dice. Sorry man. What am I doing wrong?

Im using panther and xcode 1.0.1.

cheers

Josh
2003.11.29, 01:02 AM
You should change that to #include <SDL/SDL.h>

IBethune
2003.11.30, 10:23 AM
Oops - will change as soon as I can

Skorche
2003.11.30, 10:15 PM
I seem to remember that the default SDL app project assumed that the framework was going to be in your home library folder and set the search paths accordingly. In reality, most people are going to want to put it into global library folder. Got me why they set it up that way.

OneSadCookie
2003.12.01, 02:48 AM
Why on earth would you want it in a global folder?

Strikes me the home folder is clearly the right choice :P

AnotherJake
2003.12.01, 03:29 AM
Originally posted by OneSadCookie
Why on earth would you want it in a global folder?

Strikes me the home folder is clearly the right choice :P
A little off-topic: Tell that to Microsoft!

Entropy
2003.12.01, 05:00 AM
Another side note:

if you have compile problems in Xcode, changeout all occurances of 'map' with 'std::map', or add 'using namespace std;' to each file that map is in. This is due to the picky, yet correct use of namespaces in gcc 3.3.

Other than that, great work! I have a very similar framework under construction.

IBethune
2003.12.01, 07:30 AM
OK I'll change the namespaces too.

Thanks for the feedback.

Hopefully in the next week or so we'll have some updates including non-blocking alpha changes (so you can animate at the same time as a fade) and also a sound modules. Long term plans include a module for menus and title-screens. What fun eh?

- Iain