What exactly is SDL?

Started by
7 comments, last by Lothia 18 years ago
Well I am wondering this because in most tutorials I have read they just create a win32 window and then do everything. I understand it is a library (well seems to be) does it create the window and all that off hand or is it just easier to create games with? I would much rather prefer to do things from scratch (easier for me to understand) Thank you for your time. Also I use C++, MV C++.
Advertisement
From the SDL site

Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of "Civilization: Call To Power."

It basically does all the Windows set up code for you (including the window, input, graphics, sound etc). And it does it on a whole bunch of platforms so your code can compile on Windows, Linux, Mac etc without changes (well, hypothetically at least).

It is also much more simple than doing straight Win32. I personally love SDL.
Quote:Original post by Lothia
I would much rather prefer to do things from scratch (easier for me to understand)


SDL is much easier to understand than Win32 API.

Learn to make games with my SDL 2 Tutorials

0_o I think win32 is more easier to read than mfc but I'm always striving to reach the core level of programming. I can't wait to dive into assembly.

If I were you Id make all the wrappers for that game :)
So pretty much when you read most tutorials they have a few included libraries / other scripts because the SDL is a straight call for the mouse input, keyboard and all that. So you can just figure out the what ASDW buttons are and just have them be like a struct for [-1,0], [0,-1], [1,0], [0,1] (stuff like that but not exactly)
Thank you so much for giving me the information I needed and so fast.
So pretty much using SDL, is your core and you just build around it aye? Are there any limitations to it? (Not that I would ever reach them but still)
Quote:Original post by Lothia
Are there any limitations to it?


There's one big one, you can only have one window at a time.

They're currently adding multiwindow functions, though.

Learn to make games with my SDL 2 Tutorials

hmm what type of game using multi window function? Or is it when you window out the game closes?
Quote:Original post by Lothia
hmm what type of game using multi window function? Or is it when you window out the game closes?


By 'multi-window' it means that you're not allowed to have two window for the application. You can't have, say, one window displaying the map, and a completely different window displaying character inventory. This feature is supposedly due in version 1.3, though.
Ahh okay, but couldn't you just make a class that allows you to have an external area that can be moved and thus put the map? or since it's like that you GUI would not be able to change?

This topic is closed to new replies.

Advertisement