8 ms·
I’m not using SDL or any other library to hide those platform differences. Once start working on Linux port he'll regret about that. Every developer that start
by SXX 11y ago
I’m not using SDL or any other library to hide those platform differences.
Once start working on Linux port he'll regret about that. Every developer that start with own platform-specific code end up using SDL2 anyway. Don't do that mistake.
- seivan 11y agoAn alternative is Cocos2d-x, but they manage memory using a single autorelease pool.
- pmelendez 11y agoI might be wrong, but I think I remember that Cocos2d-x uses SDL under the hood.
- seivan 11y agoFrom what I can gather, not with V3 and above. I think starting V4 they will go render-agnostic so they can use Vulkan and Metal. Besides, there is more than rendering for a decent engine. Managing controls in an agnostic way is nice to. I am actually working on adding better control-events so it can wrap Windows, Windows phone, Apple TV and External controllers easier.
- pmelendez 11y ago> "From what I can gather, not with V3 and above. I think starting V4 they will go render-agnostic so they can use Vulkan and Metal." That would make sense, last time I touched it was back in 2012. > "Besides, there is more than rendering for a decent engine." For sure, but Cocos2d-x is a complete software framework and SDL is meant to be a library. Although I would grant that it would make sense if the author would choose to use a game engine for his game.
- jason_slack 11y ago>> "From what I can gather, not with V3 and above. I think >> starting V4 they will go render-agnostic so they can use >> Vulkan and Metal." >That would make sense, last time I touched it was back in >2012. Cocos2d-x has never used SDL for anything. for v4 the renderer is vastly different. Going from v2 to v3 there were major changes here as well.
- jason_slack 11y agoNo, SDL is not used under the hood.
- picozeta 11y agoFurthermore SDL2 is absolutely fantastic and just works. You may say, you do not want to use it as it "just" abstracts away keyboard/mouse/controller input, window and GL context creation but these things are damn hard to get right.
- anon4 11y agoAlso, your game will continue working natively when linux transitions to using wayland/mir, without having to run via an X11 shim.
- fulafel 11y agoThis is true for the alternatives as well, approximately nobody writes raw Xlib apps in modern times.
- SXX 11y agoUnfortunately most of game developers that decide against use of SDL2 do that based on their experience of Windows development where it's pretty much standard to have own code for everything (except development tools and some middleware). E.g they think that their own code going to take less lines and be cleaner than SDL. As result these people usually don't even consider any alternatives as all of them even worse from their standpoint.
- jblow 11y ago... And those developers are generally right. I would use SDL in Linux ports of things because it is the closest to a reasonable native API on Linux (which says more about Linux than SDL actually). But even having done so I would then use native APIs in Windows, OSX, etc. If your standard of quality is high enough, it won't really be possible to reach it using a blanket API like SDL everywhere.
- exprx 11y agoNothing on the post above is even remotely accurate.
- shurcooL 11y agoBefore going with SDL2, I'd highly suggest evaluating it compared to GLFW.