Skip to main content
GameDev.net gamedev.net
🔒 Locked

I came up with a good SDL Engine idea.

Started by dudedbz1 Oct 29, 2005 at 7:24 AM 2 replies 950+ views
Original Post
dudedbz1
dudedbz1
Hi all. Some of you may remember me talking about SDL_Engine in the past. Well, I got a new idea. Now I would have SDL_Engine handle the base stuff, a new SDL_EngineMini which handles all little stuff(SDL_WM_SetCaption(...), ...), a new SDL_EngineTTF which handles all the TTF stuff, a new SDL_EngineSprite which handles all images, drawing, etc., and last, but not least, SDL_EngineMusic for all the music stuff. So far I came up with SDL_Engine and SDL_EngineMini, after that I'll make SDL_EngineSprite, and after that the TTF, and after that the music one.
-----------------------------....::::DRAGON BALL Z::::....C<<"+"<<"+"; // Go C++ !!!-----------------------------
Ezbez
Ezbez
What exactly do these engines do that SDL doesn't? Does it manage memory or something? Or just make code more readable?
dudedbz1
dudedbz1
Quote:
Original post by Ezbez
What exactly do these engines do that SDL doesn't? Does it manage memory or something? Or just make code more readable?


Both + practice ;). Anyways, I dont like how SDL is set up, functions floating around everywhere, structs everywhere...

Lets take SDL_Surface* for example:
int x, int y;SDL_Surface *image;image = IMG_Load(...);x = 0;y= 0;SDL_FreeSurface(image);

or...
Image image;
-----------------------------....::::DRAGON BALL Z::::....C<<"+"<<"+"; // Go C++ !!!-----------------------------
rip-off
rip-off
acutally, its better to have generic class names, and focus on building a nicely strcutured engine, rather than rerouting all the SDL calls through your class.

e.g. a "Engine" class, instead of "SDLEngine", so that you could drag and drop a completely different implementation of the rendering, say if you move to OpenGl rather than software rendering.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.