API - SDL or OpenGL?
Moderator: Coders of Rage
- Bullet Pulse
- Chaos Rift Cool Newbie
- Posts: 89
- Joined: Sun Feb 21, 2010 6:25 pm
API - SDL or OpenGL?
Hi, I've recently finished a book on C++, and I feel that it's time to gain knowledge in an API. I am a pretty hardcore programmer, so it's not like I'm just doing it as a hobby, but more like whenever I have time to. So obviously, I'm looking for the better API to learn. Yes, I have looked at the specifications of the APIs, but I want to know others' opinions on the subject, specifically those who have some experience with both APIs.
- davidthefat
- Chaos Rift Maniac
- Posts: 529
- Joined: Mon Nov 10, 2008 3:51 pm
- Current Project: Fully Autonomous Robot
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: California
- Contact:
Re: API - SDL or OpenGL?
both, try OpenGL on rendering and SDL with all the other stuff that opengl cant doBullet Pulse wrote:Hi, I've recently finished a book on C++, and I feel that it's time to gain knowledge in an API. I am a pretty hardcore programmer, so it's not like I'm just doing it as a hobby, but more like whenever I have time to. So obviously, I'm looking for the better API to learn. Yes, I have looked at the specifications of the APIs, but I want to know others' opinions on the subject, specifically those who have some experience with both APIs.
Re: API - SDL or OpenGL?
I recommend to use SFML. You will gain the benefits of OpenGL with a nice and easy OOP interface, plus you can still use OpenGL directly. Also you get all the Network, Audio and Windowing stuff on top.
-
- Chaos Rift Newbie
- Posts: 28
- Joined: Mon Jan 04, 2010 5:29 am
- Programming Language of Choice: C/C++
Re: API - SDL or OpenGL?
Before jumping into OpenGL I would recommend you to learn SDL first. Why? OpenGL is, or so I think, a lot harder to learn than SDL. Thus, it is also a lot more powerful than SDL. So, I would suggest you to learn first SDL and then continue with OpenGL. You don't just jump into the game development, you need to have patience to learn all the things, from ground up.
Some links that you may find useful (or not):
SFML
Guides & resources
Some links that you may find useful (or not):
SFML
Guides & resources
RyanPridgeon wrote:If you wanna go there, you go for it man. Nobody is stopping you so just work hard and achieve your goals.
- Lord Pingas
- Chaos Rift Regular
- Posts: 178
- Joined: Thu Dec 31, 2009 9:33 am
- Favorite Gaming Platforms: NES, SNES, Nintendo 64, Dreamcast, Wii
- Programming Language of Choice: C++
- Location: Hiding In My Mum's Basement With My Pokemon Cards
Re: API - SDL or OpenGL?
Learn SDL first then use OpenGL's rendering with SDL as you get more advanced in 2D games.
SDL is great for beginners in game development, and has quite a good amount of tutorials dedicated to it, like Lazyfoo.
When you want to move into 3d use OpenGL and GLUT.
GLUT handles windowing, input, and all the other stuff OpenGL can't do. I'm not to sure if GLUT has a sound library though.
SDL is great for beginners in game development, and has quite a good amount of tutorials dedicated to it, like Lazyfoo.
When you want to move into 3d use OpenGL and GLUT.
GLUT handles windowing, input, and all the other stuff OpenGL can't do. I'm not to sure if GLUT has a sound library though.
- TheBuzzSaw
- Chaos Rift Junior
- Posts: 310
- Joined: Wed Dec 02, 2009 3:55 pm
- Current Project: Paroxysm
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Contact:
Re: API - SDL or OpenGL?
OpenGL and SDL are not mutually exclusive of one another. SDL is a windowing API that handles device input, timers, threads, system signals, etc. OpenGL is nothing more than a 3D graphics API.
When using SDL, you have two choices for rendering. You can either use SDL's built-in 2D rendering system (all based on OpenGL anyway, though it supposedly can use DirectX's system too), or you can open a 3D rendering context and hand all control over to OpenGL itself.
SDL is a great choice in that it provides all the tools you need to build cross-platform games. The SDL_image module will load virtually any image format (great for loading textures in 3D). The SDL_ttf module will convert text to graphics. The SDL_net module will enable network communications. The SDL_mixer module will give you sound.
If you are going to make a really simple and straightforward 2D game, stick with SDL's basic 2D rendering model (surface blitting). If you want to make a 2D game more along the line of Elysian Shadows (complete with zoom, rotation, etc.), use OpenGL.
Either way, use SDL as your base. It is a solid library.
When using SDL, you have two choices for rendering. You can either use SDL's built-in 2D rendering system (all based on OpenGL anyway, though it supposedly can use DirectX's system too), or you can open a 3D rendering context and hand all control over to OpenGL itself.
SDL is a great choice in that it provides all the tools you need to build cross-platform games. The SDL_image module will load virtually any image format (great for loading textures in 3D). The SDL_ttf module will convert text to graphics. The SDL_net module will enable network communications. The SDL_mixer module will give you sound.
If you are going to make a really simple and straightforward 2D game, stick with SDL's basic 2D rendering model (surface blitting). If you want to make a 2D game more along the line of Elysian Shadows (complete with zoom, rotation, etc.), use OpenGL.
Either way, use SDL as your base. It is a solid library.
Re: API - SDL or OpenGL?
I've been meaning to ask, would anyone be able to tell me whether I'd be better off with SDL for networking and sound and input, or SFML?TheBuzzSaw wrote:OpenGL and SDL are not mutually exclusive of one another. SDL is a windowing API that handles device input, timers, threads, system signals, etc. OpenGL is nothing more than a 3D graphics API.
When using SDL, you have two choices for rendering. You can either use SDL's built-in 2D rendering system (all based on OpenGL anyway, though it supposedly can use DirectX's system too), or you can open a 3D rendering context and hand all control over to OpenGL itself.
SDL is a great choice in that it provides all the tools you need to build cross-platform games. The SDL_image module will load virtually any image format (great for loading textures in 3D). The SDL_ttf module will convert text to graphics. The SDL_net module will enable network communications. The SDL_mixer module will give you sound.
If you are going to make a really simple and straightforward 2D game, stick with SDL's basic 2D rendering model (surface blitting). If you want to make a 2D game more along the line of Elysian Shadows (complete with zoom, rotation, etc.), use OpenGL.
Either way, use SDL as your base. It is a solid library.
I've been trying to decide for a few days now, and this is the perfect place to ask I would imagine... Because Bullet Pulse might also be interested in this question :D
- TheBuzzSaw
- Chaos Rift Junior
- Posts: 310
- Joined: Wed Dec 02, 2009 3:55 pm
- Current Project: Paroxysm
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Contact:
Re: API - SDL or OpenGL?
My needs are generally very simple, so I just stick with all SDL components. SDL_net is a separate module, so it is harmless to use a different networking API.
As for the input, I do not recommend mixing APIs unless you have some tutorial explaining how to do so. Having SDL run the window but not manage input... I'm not sure if that's even possible, but Google may know otherwise.
I've heard of others using OpenAL instead SDL_mixer and using Boost threads instead of SDL threads.
As for the input, I do not recommend mixing APIs unless you have some tutorial explaining how to do so. Having SDL run the window but not manage input... I'm not sure if that's even possible, but Google may know otherwise.
I've heard of others using OpenAL instead SDL_mixer and using Boost threads instead of SDL threads.
Re: API - SDL or OpenGL?
That wasn't directed at me was it? I'm not talking about mixing APIs, just whether I should use OGL with SDL, or OGL with SFML...TheBuzzSaw wrote:My needs are generally very simple, so I just stick with all SDL components. SDL_net is a separate module, so it is harmless to use a different networking API.
As for the input, I do not recommend mixing APIs unless you have some tutorial explaining how to do so. Having SDL run the window but not manage input... I'm not sure if that's even possible, but Google may know otherwise.
I've heard of others using OpenAL instead SDL_mixer and using Boost threads instead of SDL threads.