SDL VS SFML
Moderator: Coders of Rage
- 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:
SDL VS SFML
So I have seen a lot of people use SFML, I want to know what all the buzz is about and why it is better than SDL. Personally I use SDL. I want to know if SFML is better or not. They both seem to have the same purpose and I don't know what would be better.
Re: SDL VS SFML
I am like 99% sure that SFML uses OpenGL for it's graphics... So it ends up being faster for the most part...davidthefat wrote:So I have seen a lot of people use SFML, I want to know what all the buzz is about and why it is better than SDL. Personally I use SDL. I want to know if SFML is better or not. They both seem to have the same purpose and I don't know what would be better.
- ibly31
- Chaos Rift Junior
- Posts: 312
- Joined: Thu Feb 19, 2009 8:47 pm
- Current Project: Like... seven different ones
- Favorite Gaming Platforms: Xbox 360, Gamecube
- Programming Language of Choice: C++, ObjC
- Location: New Jersey.
Re: SDL VS SFML
I'd say that SDL is better for beginners because of its simplicity and the fact that Lazyfoo exists. He helped me so much in learning how to use it. Also, SFML is better for more advanced users because of how fast it is and also it has a bunch of ports to different languages, so if your making a universal game, that would be very helpful.
Website/Tumblr
My Projects
The best thing about UDP jokes is that I don’t care if you get them or not.
Re: SDL VS SFML
Well the 'difficulty' is really relative. I'd say for most people that have used OO languages, SFML will come more easily than SDL.ibly31 wrote:I'd say that SDL is better for beginners because of its simplicity and the fact that Lazyfoo exists. He helped me so much in learning how to use it. Also, SFML is better for more advanced users because of how fast it is and also it has a bunch of ports to different languages, so if your making a universal game, that would be very helpful.
- mv2112
- Chaos Rift Junior
- Posts: 240
- Joined: Sat Feb 20, 2010 4:15 am
- Current Project: Java Tower Defence Game
- Favorite Gaming Platforms: N64/Xbox 360/PC/GameCube
- Programming Language of Choice: C/++, Java
- Location: /usr/home/mv2112
- Contact:
Re: SDL VS SFML
A while ago, i tried SFML, but i think i set it up wrong because when i rendered the screen it started spewing out crap that i had rendered with an openGL app i had. But the OO did seem alot more easier than plain SDL.
- Bakkon
- Chaos Rift Junior
- Posts: 384
- Joined: Wed May 20, 2009 2:38 pm
- Programming Language of Choice: C++
- Location: Indiana
Re: SDL VS SFML
SFML is much simpler than SDL and the tutorials on their website is formatted better than LazyFoo. It's also a lot more powerful right off the bat without needing a bunch of extension libraries.ibly31 wrote:I'd say that SDL is better for beginners because of its simplicity and the fact that Lazyfoo exists.
Here's a crazy idea: Go try it and see what you like better. Why do you need other people to tell you want library to use?davidthefat wrote:So I have seen a lot of people use SFML, I want to know what all the buzz is about and why it is better than SDL. Personally I use SDL. I want to know if SFML is better or not. They both seem to have the same purpose and I don't know what would be better.
- ibly31
- Chaos Rift Junior
- Posts: 312
- Joined: Thu Feb 19, 2009 8:47 pm
- Current Project: Like... seven different ones
- Favorite Gaming Platforms: Xbox 360, Gamecube
- Programming Language of Choice: C++, ObjC
- Location: New Jersey.
Re: SDL VS SFML
For me, SDL was easier to learn, not sure why. It seemed like the code was simpler. Depends on how you define simple... simple as in library-simple, or amount-of-code-you-have-to-write simple.Bakkon wrote: SFML is much simpler than SDL and the tutorials on their website is formatted better than LazyFoo. It's also a lot more powerful right off the bat without needing a bunch of extension libraries.
Website/Tumblr
My Projects
The best thing about UDP jokes is that I don’t care if you get them or not.
Re: SDL VS SFML
Just some recommendations:
- If you are using C++ and/or want to program for PC and/or want native use of OpenGL than go for SFML.
- If you are using C and/or want to program for embedded devices and/or want to write software rendering stuff use SDL.
However, you should make your own decision!
- If you are using C++ and/or want to program for PC and/or want native use of OpenGL than go for SFML.
- If you are using C and/or want to program for embedded devices and/or want to write software rendering stuff use SDL.
However, you should make your own decision!
-
- Chaos Rift Junior
- Posts: 345
- Joined: Tue Jan 12, 2010 7:23 pm
- Favorite Gaming Platforms: PC - Windows 7
- Programming Language of Choice: c++;haxe
- Contact:
Re: SDL VS SFML
It's quite simple really, They are pretty much par-for-par. The only real differences is that SFML uses OGL where as SDL relies (generally) on software. As such, SFML is faster, and it also supports right out the box hardware accelerated rotation + stretching. It supports more image formats right off the bat. It also has a simple pixel shader language based of OGL. SFML would (I expect) use a smaller code base as SDL has more modes to support (software, OGL, hardware render modes).
On the other hand, SFML *cannot* be run on any device that doesn't support OGL, or any device with a very very weak graphics card. Some people's computers have difficulty running simple popcap games for instance.
SDL has far better OS and language support, but SFML is far more feature rich. If I was doing a simple card game/pacman/something simple I'd probably look at SDL for its better compatibility (Software OR OGL modes) but otherwise, I prefer SFML.
Oh, and SFML has far better documentation (if I remember correctly) and some decent tutorials for getting started.
Really, there isn't much more to say. If you still can't choose, then I suggest SFML as it's easier (IMO) to use with less road-blocks.
On the other hand, SFML *cannot* be run on any device that doesn't support OGL, or any device with a very very weak graphics card. Some people's computers have difficulty running simple popcap games for instance.
SDL has far better OS and language support, but SFML is far more feature rich. If I was doing a simple card game/pacman/something simple I'd probably look at SDL for its better compatibility (Software OR OGL modes) but otherwise, I prefer SFML.
Oh, and SFML has far better documentation (if I remember correctly) and some decent tutorials for getting started.
SFML has a C port.K-Bal wrote:If you are using C
Really, there isn't much more to say. If you still can't choose, then I suggest SFML as it's easier (IMO) to use with less road-blocks.
Re: SDL VS SFML
You are rightLive-Dimension wrote:SFML has a C port.K-Bal wrote:If you are using C
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
- Ginto8
- ES Beta Backer
- Posts: 1064
- Joined: Tue Jan 06, 2009 4:12 pm
- Programming Language of Choice: C/C++, Java
Re: SDL VS SFML
SFML is:
- faster
more feature-rich (sprite rotation&stuff)
they're working on batch rendering tiles for SFML 2.0 (I LOVE batch rendering)
more than one window
awesome networking package
less clunky
still has a C interface
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
-
- Chaos Rift Junior
- Posts: 345
- Joined: Tue Jan 12, 2010 7:23 pm
- Favorite Gaming Platforms: PC - Windows 7
- Programming Language of Choice: c++;haxe
- Contact:
Re: SDL VS SFML
If you can call lazyfoo a good beginner tutorial :PGinto8 wrote:SFML is:So I'll have to say that SFML is better. However, it will likely be a long time before it overtakes SDL because there aren't really any good beginner tutorials for it. SDL has lazyfoo.
- faster
more feature-rich (sprite rotation&stuff)
they're working on batch rendering tiles for SFML 2.0 (I LOVE batch rendering)
more than one window
awesome networking package
less clunky
still has a C interface
Someday I shall look into doing a "simple" tutorial game with SFML, covering basics but also more advanced topics.
Re: SDL VS SFML
It's personal preference imo.
SFML may be written in c++ but it's just as easy to incorporate SDL into a c++ project in an OO manner.
Also for everyone saying SDL only has software rendering, well you can pass the SDL_HWSURFACE flag to change that, or alternatively the SDL_OPENGL flag, and then use straight opengl calls like glBegin(GL_QUADS); e.t.c.
SFML may be written in c++ but it's just as easy to incorporate SDL into a c++ project in an OO manner.
Also for everyone saying SDL only has software rendering, well you can pass the SDL_HWSURFACE flag to change that, or alternatively the SDL_OPENGL flag, and then use straight opengl calls like glBegin(GL_QUADS); e.t.c.
Re: SDL VS SFML
You will see yourself writing wrapper classes that look similar to SFML.Xeno wrote:SFML may be written in c++ but it's just as easy to incorporate SDL into a c++ project in an OO manner.
Using pure OpenGL is always possible if you can create a render context. I don't think that this is an argument.Also for everyone saying SDL only has software rendering, well you can pass the SDL_HWSURFACE flag to change that, or alternatively the SDL_OPENGL flag, and then use straight opengl calls like glBegin(GL_QUADS); e.t.c.