Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualServant of the Lord

Posted 20 September 2012 - 01:55 PM

There's no point switching to a new API just from a short snippet of code. I'd recommend SFML over SDL to C++ users in most situations, and I have experience in both APIs. That's not to say one is "better" than another, but you choose the right tool for the right job... and if your job is completing a game, and since both SDL and SFML would both be good choices, switching APIs is detrimental to meeting your goals.

SDL is a 'C' programming language API, that is usable in C++ and uses a functional interface.
SFML is a native C++ programming language API, using object-oriented principles and RAII.

They are both good APIs, but it's bad advice to go hopping from API to API (or language to language as some people also suggest), whenever a wall is encountered, especially when that wall exists in both APIs and switching wouldn't solve your problem anyway.

The issue you were having, was how to load a Tiled Map Editor map file in C++. That's a C++ issue, not a SDL or SFML issue. Both SDL and SFML are not natively familiar with Tiled Map Editor... and both have 3rd party integration with that format.

In my personal opinion, you should stick with what you are already using.

#1Servant of the Lord

Posted 20 September 2012 - 01:55 PM

There's no point switching to a new API just from a short snippet of code some person posted on a forum*. I'd recommend SFML over SDL to C++ users in most situations, and I have experience in both APIs. That's not to say one is "better" than another, but you choose the right tool for the right job... and if your job is completing a game, and since both SDL and SFML would both be good choices, switching APIs is detrimental to meeting your goals.

SDL is a 'C' programming language API, that is usable in C++ and uses a functional interface.
SFML is a native C++ programming language API, using object-oriented principles and RAII.

They are both good APIs, but it's bad advice to go hopping from API to API (or language to language as some people also suggest), whenever a wall is encountered, especially when that wall exists in both APIs and switching wouldn't solve your problem anyway.

The issue you were having, was how to load a Tiled Map Editor map file in C++. That's a C++ issue, not a SDL or SFML issue. Both SDL and SFML are not natively familiar with Tiled Map Editor... and both have 3rd party integration with that format.

In my personal opinion, you should stick with what you are already using.

PARTNERS