3

As I understand, SDL offers abstractions that let you make windows, handle input and audio much easier than doing so directly with the low level APIs provided by several operating systems.

However, it seems that a lot of games, both indie and AAA, don't use it, and I would like to know why. This makes me suspect that there may be areas where SDL is lacking, such as features, performance, or robustness, when compared to platform-specific APIs.

Apart from platform support, that is, considering only the platforms SDL supports, I do not understand what would keep a developer from using SDL for their game, since I feel like, based on my admittedly limited knowledge, it'd be much smarter to use SDL on the platforms that do support it.

  • 1
    SDL in contrast to what? High-level frameworks (e.g. XNA, Love2D, Pixi.js) or low-level tooling (e.g. OpenGL, DirectX, X11)? – Anko Jul 13 '14 at 09:40
  • Low-level stuff. Using OpenGL and/or DirectX for rendering, and using SDL for window/input/audio handling. – Jay Abelter Jul 13 '14 at 10:03
  • It's all a matter of preference. Just as it seems completely outrageous not to use SDL to you, it seems completely outrageous to use SDL to others. – Panda Pajama Jul 13 '14 at 10:49
  • @PandaPajama I don't see how that devalues my question. Whether or not to wear a helmet while riding a bicycle is also personal preference. Many people opt to not wear a helmet. That doesn't mean wearing a helmet isn't objectively safer. – Jay Abelter Jul 13 '14 at 12:20
  • @PandaPajama I want to know why someone would find one option completely outrageous. – Jay Abelter Jul 13 '14 at 12:21
  • 1
    @JayAbelter: I downvoted this question because as it is written, it seems like spam, kinda like "Is there any reason not to use (random weight loss pill)?, don't people want to like, lose weight?". Now, assuming good will (I currently don't), the reason people don't use SDL is the same reason you don't use XNA, Unity, Ruby, or whatever other product: because you don't deem it appropriate for your project. 1000 people who don't use SDL will give you 1000 different reasons, in which case this would be an opinion poll, and therefore inappropriate for this site. – Panda Pajama Jul 13 '14 at 12:28
  • @PandaPajama What I'm trying to ask is if SDL is lacking in something (in terms of features, performance, or robustness) that warrants going directly to WinAPI/X11/etc. – Jay Abelter Jul 13 '14 at 14:02
  • @JayAbelter: No, that's not what you're asking. If that is what you want to ask, then you should rephrase your question to reflect that. Pretty much not a single paragraph in the question you wrote is even remotely close to the purpose you claim your question has. Adjectives like "smarter" don't really help much. – Panda Pajama Jul 13 '14 at 14:04
  • @PandaPajama I have edited my question so it will not be misconstrued as spam. – Jay Abelter Jul 13 '14 at 14:10
  • @JayAbelter: I rewrote your question based on your comments. Once again, each developer will give you a different answer, but my answer is that any abstraction you put into your code will make some things easier, others more difficult, and sometimes will even make some things downright impossible. I do not use SDL or any other "framework" or "engine" because I prefer to do things myself and handle the multiplatform abstraction myself. But once again, that is one opinion from one developer. I still don't think this is an appropriate question for this site, but I removed my downvote. – Panda Pajama Jul 13 '14 at 14:21

1 Answers1

1

SDL introduces an additional dependency

While many platforms support it, it is not a part of the regular distribution of all of those platforms, so users must download and install it themselves. One such platform is Windows, and assuming that your target market is divided in proportions similar to the Steam Hardware Survey, that means that ~95% of your potential users probably don't have SDL.

If you're dependent on users downloading and installing SDL correctly themsleves, you will get burnt. You'll encounter problems such as users failing to get the correct version, failing to get the DLLs into the correct directories, incorrectly mixing 32-bit SDL with 64-bit programs (or vice-versa), and potentially causing version-conflicts with other programs that may use SDL. All of those will cause you support headaches and generate a bad reputation for your program.

The solution to this is knowledge, of course. Not on the part of your users (nobody ever reads readme files) but on your part. You need to know that this can be a problem, and you need to package the correct SDL binaries with your program's installer, then install them in your program's own directory so as to avoid conflicts with other programs. Either you're prepared to go this route or you risk problems for ~95% of your potential users.

Maximus Minimus
  • 20,144
  • 2
  • 38
  • 66