Why do programmers use SDL in C ++

SDL a waste of time?

Samyboy wrote:

I have one question, however, should I use SMFL to create windows in which to create the games? Or should you do the whole thing with MFC or WinAPI and just use SMFL to output sprites, etc.?

I see no reason to take the platform-dependent, low-level path if SFML does the whole thing for you. Unless you want to accomplish something that SFML can't, but a normal problem shouldn't be a problem.

ProgChild wrote:

If you want to use them, you'll be building at least one layer of abstraction around them anyway. This means that you will probably only call the actual SDL or OpenGL commands in very few places in your program.

In my experience, hobby game programmers (especially those who are not very advanced) tend not to waste a lot of thought on design and only learn the bare essentials from C ++ to get something done. Separation of graphics and logic is not always popular either, as it requires a rethink. At least that's my impression. But of course, ideally you design your design in such a way that the graphic interface can be exchanged with little effort if necessary.

ProgChild wrote:

The question is what you want to do. 2D? Then SDL is okay.

I have to say, I reached the performance limits with a simple platformer with SDL, and I also missed some basic functionality (at least in the main pack). And yes, I optimized it, even to the point that I really only drew the bare essentials (i.e. never the entire background, only the rectangles that have changed). But of course it can still be that I overlooked something, although at the time I actually read the documentation quite well.

ProgChild wrote:

The SDL runs on considerably more platforms than SFML.

That seems to me to be one of the few remaining advantages of SDL. Even as a C programmer you have the option of using the SFML C binding.

In my opinion, SDL has long been the usual way of giving C / C ++ programmers an easy entry into 2D game / graphics programming. I took this path myself and of course learned a lot. SDL is certainly not bad, I thought very highly of it at the time. But now there is a competitive framework with SFML, which has many - in my opinion not insignificant - advantages. For C ++ programmers in particular, it is definitely a good idea to be able to use modern techniques in their own language.