SFML community forums

General => General discussions => Topic started by: TheGuerilla on March 20, 2016, 09:58:27 pm

Title: SDL2 Speed vs SFML?
Post by: TheGuerilla on March 20, 2016, 09:58:27 pm
I understand that SFML's speed beats SDL 1.2 by a landslide, but I am making a game engine right now that utilizes SDL2's new hardware-acceleration. So has anyone made a test that compares SDL2's hardware acceleration speed to SFML's speed? If SFML is still faster, I will definitely switch the entire engine to it.

Thanks
Title: Re: SDL2 Speed vs SFML?
Post by: Laurent on March 20, 2016, 11:05:37 pm
I don't think we can answer this question. You should definitely write a small benchmark to check that yourself, this way you can make sure that the code that you test is as close as possible to how you intend to use the libraries in your engine -- and that the results are thus relevant.
Title: Re: SDL2 Speed vs SFML?
Post by: GraphicsWhale on March 21, 2016, 05:43:17 am
For the most part the performance is more or less the same.

If you want an exact answer for your situation, you'd have to port your engine to SFML and benchmark it. Alternatively, do like Laurent said and make a small benchmark (wont give you exact results, but close enough).
Title: Re: SDL2 Speed vs SFML?
Post by: DarkRoku12 on March 21, 2016, 06:38:03 am
I finished a Lua game engine with SFML.

just need to the port to android (almost done) and other platforms outside windows and finish the docs.

My Lua game engine run very very fast with SFML. You can create without problems the most demanding 2D games with it.

SFML have a very good performance, and an excelent API, without saying that we have here sfe::Movie, LTBL2 , Thor, SFGUI, TGUI, Selba Ward, ETC.

I probably made a GUI for my engine with TGUI or SFGUI.

SFML is full of tools and have clear docs, SDL not to much, the only decent tutorials for advanced topics are from lazy foo, and are ugly in comparison with SFML.

The performance of graphics libraries based on OpenGL is almost the same. The unique thing that will really boost your engine is use raw openGL for specific things. And only with Vulkan you'll have portable graphics with possible multi-thread rendering.
Title: Re: SDL2 Speed vs SFML?
Post by: TheGuerilla on March 21, 2016, 11:19:33 pm
For the most part the performance is more or less the same.

If you want an exact answer for your situation, you'd have to port your engine to SFML and benchmark it. Alternatively, do like Laurent said and make a small benchmark (wont give you exact results, but close enough).
I'm porting it right now. I guess we'll find out. I'm sure hoping its at least the same, because SFML is so much easier to use than SDL2.

EDIT: So I ported the core of the engine and tested it out, and it has about the same performance; so I'm really happy about that. I will definitely be using SFML instead.
Title: Re: SDL2 Speed vs SFML?
Post by: Mörkö on March 23, 2016, 06:02:33 pm
What about CSFML?
Title: AW: SDL2 Speed vs SFML?
Post by: eXpl0it3r on March 23, 2016, 09:27:13 pm
CSFML is just a C wrapper around the C++ API, one or two function calls won't make a difference.