SDLGameBase 0.1 Released

Member
Posts: 156
Joined: 2002.10
Post: #1
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/downl...mebase.sit

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

- Iain
Quote this message in a reply
Member
Posts: 304
Joined: 2002.04
Post: #2
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
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #3
You should change that to #include <SDL/SDL.h>
Quote this message in a reply
Member
Posts: 156
Joined: 2002.10
Post: #4
Oops - will change as soon as I can
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #5
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.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
Why on earth would you want it in a global folder?

Strikes me the home folder is clearly the right choice Rasp
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #7
Quote: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 Rasp
A little off-topic: Tell that to Microsoft!
Quote this message in a reply
Entropy
Unregistered
 
Post: #8
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.
Quote this message in a reply
Member
Posts: 156
Joined: 2002.10
Post: #9
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
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  SDLGameBase 0.2 released IBethune 1 1,884 Jan 21, 2004 11:19 AM
Last Post: IBethune