Jump to content
  • Advertisement
Sign in to follow this  
Lothia

What exactly is SDL?

This topic is 4620 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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++.

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
hmm what type of game using multi window function? Or is it when you window out the game closes?

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!