sdl

Started by
7 comments, last by asdasd12345 20 years, 3 months ago
I have been banging my head against a brickwall trying to understand directdraw and directx but it totally baffles me. i can make a surface and initilize it but the general idea confuses me. i read that sdl is good for beginners which is what i am, but is it the wussy way out?
http://www.geocities.com/asdasd12345/
Advertisement
Hey,

Not at all. SDL is a very powerful library. SDL is just a different way of doing the same thing, sdl uses a c interface and directx uses a coms interface that is really difficult to start working with. I use directx personally but that is for my own pain and agany and has nothing to do with being a good idea.
Also if you are intereseted in using more then just windows the sdl is the library of choice.

Later, Ben
You may also want to check out Allegro.
-- Steve --
SDL is a great way to start writing games really quickly, the API is simple to use and learn and there are numerous extension libraries for tasks. The only downfall I would say is then lack of decent tutorial sites on SDL, the only good one I can recommend to help you get started with SDL is Cone3D.

My 2D game engine
And just so you know, on Windwos platforms, SDL is a wrapper for Direct X.
so what u mean is that it will take care of the directx stuff i do not understand?
http://www.geocities.com/asdasd12345/
SDL will let ease in to game coding and it is pretty powerful so you can make high quality programs with it.


"If you don't try, you will never succeed!"

Grellin
GDUnion.com

[edited by - Grellin GDU on January 7, 2004 6:43:09 PM]
"If you are not willing to try, you will never succeed!"GrellinC++ Game Programming
quote:Original post by asdasd12345
so what u mean is that it will take care of the directx stuff i do not understand?


Basically yes. Its api is extremely straight forward and easy for newbies to grab. You focus more on creating your game than learning how to intialize a COM API
SDL stands for Simple Directmedia Layer. I can''t emphasize simple. it can get somplex, and allows a certain amount of control. Let me give you an idea of how to open a bitmap and display it to the screen:

in pseudocode:
//first you initialize SDLSDL_Init(...);//then you create a surface fir teh screen and bitmapSDL_Surface* Screen, Bitmap;// then you create the windowScreen = SDL_SetVideoMode(...);//Then you load the bitmapBitmap = SDL_LoadBMP(...);//then you copy the Bitmap to the screen SDL_BlitSurface(...)//release the surfaces, and you are done!


There is a little more, for example you have to tell it WHERE to blit the image, and some arguments for each function, but the documentation is good so you shouldn''t have a problem.

BTW.. for video the backend of SDL is OpenGL, but everything else for windows is DX.
------------------------------------------VOTE Patrick O'GradyWrite in Presidential CandidateThe Candidate who Cares.

This topic is closed to new replies.

Advertisement