Archived

This topic is now archived and is closed to further replies.

asdasd12345

sdl

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
And just so you know, on Windwos platforms, SDL is a wrapper for Direct X.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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 SDL

SDL_Init(...);

//then you create a surface fir teh screen and bitmap

SDL_Surface* Screen, Bitmap;

// then you create the window

Screen = SDL_SetVideoMode(...);

//Then you load the bitmap

Bitmap = 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.

Share this post


Link to post
Share on other sites