6 ms·
Btw, Love2D is based on SDL2. If you hate Lua but needs the same cross-platform capabilities, you can use an SDL2 binding in other languages or make your own.
by raincole 7mo ago
Btw, Love2D is based on SDL2. If you hate Lua but needs the same cross-platform capabilities, you can use an SDL2 binding in other languages or make your own.
- newobj 7mo agoSDL3
- jasonjmcghee 7mo agoDefinitely SDL2. Author is currently building version 12 which will be using SDL3. But it's been in development for quite some time with no clear end date afaik.
- krapp 7mo agoIt is easy to get Lua (with LuaJIT) working with SDL3, though. That obviously isn't a replacement for the framework but it is perfectly doable if someone just wants to write a game in Lua with minimal overhead. Edit: I mention LuaJIT specifically because it lets you create metaclasses around C objects, which is much easier than messing with the Lua stack from C, and it's easy to make a 2d vector class from an SDL Point or a spritesheet or what have you. There are a few rough edges like dealing with pointers and gc but to me it's the best of both worlds (the speed of C, and some implicit type checking, and the flexibility of Lua.) Obviously you could do it the hard way and the other way around with normal modern Lua but it's such a pain in the ass.
- newobj 7mo agoI stand corrected!
- dannyfritz07 7mo agoWho is "the author" these days? Is it Slime? I wonder what Rude and Bartbes and vrld are up to these days. Are releases still done on holidays? Are all libraries still named after sex themes? I was active for versions 0.4 - 0.6.
- jasonjmcghee 7mo agoYes, idk, and of course
- raincole 7mo agoAs far as I know only the latest (unstable) version uses SDL3.
- onehair 7mo agoNow why would you hate lua of all things?
- raincole 7mo agoFor all the reasons, but the 1-based index alone makes me uncomfortable.
- WolfeReader 7mo ago1-based indexing is great. It's just _different_ - from C, where the array index is just sugar for pointer arithmetic, and from other languages which borrowed the practice without reasoning.
- raincole 7mo agoThe reasoning is to be consistent with C and it's more than enough reasoning for me. I don't know if 1-based indexing is fundamentally better. However, I know the probability that I will need to use other languages in the future is 100%, and they'll use 0-based index. It's like right-click-to-select.
- bajsejohannes 7mo agoThere are arguments for why 0-based indexing is _better_, unrelated to pointer arithmetic. https://www.cs.utexas.edu/~EWD/transcriptions/EWD08xx/EWD831.html https://www.cs.utexas.edu/~EWD/transcriptions/EWD08xx/EWD831... > we had better regard —after all those centuries!— zero as a most natural number Of course, a counter argument is that we've already made the mistake of indexing with 1 in natural language (first, second, ...). That decision is not free of annoyances, though: the 19th century are year numbers 18xx, floors below the first have a varying names when they could have been negative numbers, etc.
- ufo 7mo agoThat EWD is one if my pet peeves. Dijkstra makes an unfair comparison because he lists plenty of examples where 0-based indexing is more convenient but ignores the equally numerous situations where 1-based is more convenient. For example, iterating backwards over an array is much better in an 1-based world. I like the argument that 1-based is better for indexing and 0-based is better for offsets: https://hisham.hm/2021/01/18/again-on-0-based-vs-1-based-indexing/ https://hisham.hm/2021/01/18/again-on-0-based-vs-1-based-ind...
- CyberDildonics 7mo agoThere is a lot more that goes into Love2D than just SDL. It uses many other libraries for sound, image loading, etc as well as using luajit so that the lua runs very fast and has a super easy C FFI.
- Levitating 7mo agoBut SDL already provides an API for all the things you listed. So I am assuming the libraries in Love2D still call those underlying SDL APIs right?
- CyberDildonics 7mo agoLove2D uses openAL for audio, FreeType 2 for fonts, DevIL for image loading and Box2D for physics. It can also use image fonts. It uses luasocket for networking and has a compression API built in. On top of that there are love2d specific libraries people have written to deal with 2D games like GUIs and tile libraries. Then there is the ease of debugging, where you can use lua to have runtime access to the table of variables and can print them on screen if you need to, not to mention dynamically loading new update and draw and input functions. This is all to say that just downloading SDL is not going to get anywhere close to what love2d has included.
- Levitating 7mo agoCool stuff!
- Levitating 7mo agoSDL3 should get more love in general. The SDL3 GPU API[1] provided a cross-platform GPU API even before WebGPU. In Rust it's a good alternative for winit/wgpu. For that reason I added it to areweguiyet.com[2] last week, where apparently it wasn't even listed before. I am currently using it to develop a space game[3] inspired by the original BBC Elite. Using emscripten to get on the web and QUIC/Webtransport for networking. [1]: https://wiki.libsdl.org/SDL3/CategoryGPU https://wiki.libsdl.org/SDL3/CategoryGPU [2]: https://areweguiyet.com/#ecosystem https://areweguiyet.com/#ecosystem [3]: https://git.levitati.ng/LevitatingBusinessMan/elite/src/branch/quic-webtransport https://git.levitati.ng/LevitatingBusinessMan/elite/src/bran...
- hresvelgr 7mo agoSDL3 doesn't support bindless resources and the plans to do so in the future are very loose[1]. [1] https://github.com/libsdl-org/SDL/issues/11148#issuecomment-2575762027 https://github.com/libsdl-org/SDL/issues/11148#issuecomment-...
- runevault 7mo agoSDL3 is something I've been keeping an eye on, but at least one thing that held me back from diving into it was SDL_Mixer (audio library) was not updated to a release version for SDL3 until I think a month ago? I need to get back to it but lately I've been messing with SDL2 + wasm stuff using emscripten.
- steeleduncan 7mo agoIt seems to have updated to SDL3 - https://github.com/love2d/love/blob/main/CMakeLists.txt#L178 https://github.com/love2d/love/blob/main/CMakeLists.txt#L178
- vrighter 7mo agoso is unreal engine