Live data from Hacker News

Swift and the Cute 2d game framework: Setting up a project with CMake

layer22.com

31–40 of 85 posts

Re: Swift and the Cute 2d game framework: Setting up a project with CMake

#31
post #16

Earlier quoted context omitted.

Ah thanks Piotr, also Cute looks very useful, great job.

It's not mine, I'm just a fan myself!

Well as a fan you certainly commit a lot https://github.com/RandyGaul/cute_framework/commits/master/

Re: Swift and the Cute 2d game framework: Setting up a project with CMake

#32
post #11

Last night I tried for maybe about 6 hours so many combinations of efforts to compile a C++, SDL3 and Lua program on Windows, with different IDEs, build systems, compilers, package managers etc. Finally I'm just giving up and using VS with CMake and vcpkg. The main problem is that there's way too many words on all those documentation pages. It would have taken 3 or 4 days to read them all, and maybe only 2 hours wort…

I agree. I used chatgpt to write a makefile to compile sokol+Tracy. It's a pretty solid, generic makefile. But "build system complexity" pushed me away from sdl, magnum graphics and bgfx into the arms of sokol. And I'm a 10+ year gamedev. Out of all of c++'s sins, the lack of a solid integrated build system is the one that bites me the most.

My theory is that good C++ devs haven't yet made a simple yet powerful build system because they're too busy making lots and lots of money writing enterprise C++.

Re: Swift and the Cute 2d game framework: Setting up a project with CMake

#35
post #28

Earlier quoted context omitted.

I wonder if there is a SDL3 wrapper that comes with a scripting language[0], hot reload and build scripts for every major platform. Love2D seems close to that, but afaik it doesn't support SDL3 features like the new GPU API. [0]: It's not like I'm allergic to C++, but I firmly believe when developing something that is mostly interactive, such as complex GUI or games, a language that is garbage collected and can be ho…

That's what I'm working on, basically love2d but SDL3 and TS/JS (via QuickJS). And no box2d builtin, but easily importable via CDN.

... at least if I can get the simplest Visual Studio + CMake + vcpkg hello world working.

Which I can't.

This always happens every few years. It takes me about a week to get a C++ program compiling and running, and by the end of it, I've lost all motivation, forget how any of it works, and delete it all and move back to TypeScript/web stuff. At least that I know despite all its warts.

[edit] figured it out

Hello me from the future, googling this in a few years. It's actually really simple: just follow the same steps on that page you were on[1] except you HAVE TO run the `vcpkg new --application` and `vcpkg add port fmt` commands in the dev cmd prompt, you can't just add the file manually for some reason, even though that's all it seems like it's doing.

[1] https://learn.microsoft.com/en-us/vcpkg/get_started/get-star...

Re: Swift and the Cute 2d game framework: Setting up a project with CMake

#36
post #32

Earlier quoted context omitted.

I agree. I used chatgpt to write a makefile to compile sokol+Tracy. It's a pretty solid, generic makefile. But "build system complexity" pushed me away from sdl, magnum graphics and bgfx into the arms of sokol. And I'm a 10+ year gamedev. Out of all of c++'s sins, the lack of a solid integrated build system is the one that bites me the most.

My theory is that good C++ devs haven't yet made a simple yet powerful build system because they're too busy making lots and lots of money writing enterprise C++.

We all just accepted CMake. It's not perfect but it works. C++ with SDL and Lua in a mono repo should be trivial. SDL3 supports CMake and Lua is simple to compile and make a CMakeLists.txt for.

Re: Swift and the Cute 2d game framework: Setting up a project with CMake

#37
post #11

Last night I tried for maybe about 6 hours so many combinations of efforts to compile a C++, SDL3 and Lua program on Windows, with different IDEs, build systems, compilers, package managers etc. Finally I'm just giving up and using VS with CMake and vcpkg. The main problem is that there's way too many words on all those documentation pages. It would have taken 3 or 4 days to read them all, and maybe only 2 hours wort…

I wonder if there is a SDL3 wrapper that comes with a scripting language[0], hot reload and build scripts for every major platform. Love2D seems close to that, but afaik it doesn't support SDL3 features like the new GPU API. [0]: It's not like I'm allergic to C++, but I firmly believe when developing something that is mostly interactive, such as complex GUI or games, a language that is garbage collected and can be ho…

You can build a project linking SDL3 with Lua and have access to all of the features of SDL3, with the obvious caveat that you'll have to code the rest of the owl yourself, but it isn't difficult. I have a basic CMake script that I use for projects and it works fine. (also, obviously you can just run the Lua code locally and skip the build process altogether when developing.) I use LuaJIT though, and the FFI generator here[0].

[0]https://github.com/sonoro1234/LuaJIT-SDL3

Re: Swift and the Cute 2d game framework: Setting up a project with CMake

#38
post #28

Earlier quoted context omitted.

I wonder if there is a SDL3 wrapper that comes with a scripting language[0], hot reload and build scripts for every major platform. Love2D seems close to that, but afaik it doesn't support SDL3 features like the new GPU API. [0]: It's not like I'm allergic to C++, but I firmly believe when developing something that is mostly interactive, such as complex GUI or games, a language that is garbage collected and can be ho…

That's what I'm working on, basically love2d but SDL3 and TS/JS (via QuickJS). And no box2d builtin, but easily importable via CDN.

That's my idea stack as well (I tried to build something like SDL2 + V8 at some point but ended up giving up...) If you have a repo/website set up please leave a link for me to follow :)

Re: Swift and the Cute 2d game framework: Setting up a project with CMake

#39
post #28

Earlier quoted context omitted.

That's what I'm working on, basically love2d but SDL3 and TS/JS (via QuickJS). And no box2d builtin, but easily importable via CDN.

That's my idea stack as well (I tried to build something like SDL2 + V8 at some point but ended up giving up...) If you have a repo/website set up please leave a link for me to follow :)

Yeah sure https://github.com/sdegutis/minigamemaker placeholder.

Re: Swift and the Cute 2d game framework: Setting up a project with CMake

#40
post #11

Last night I tried for maybe about 6 hours so many combinations of efforts to compile a C++, SDL3 and Lua program on Windows, with different IDEs, build systems, compilers, package managers etc. Finally I'm just giving up and using VS with CMake and vcpkg. The main problem is that there's way too many words on all those documentation pages. It would have taken 3 or 4 days to read them all, and maybe only 2 hours wort…

If you’re interested in Zig check out https://github.com/castholm/SDL.

Try the breakout example, I play around with it a lot. You’ll just need the Zig 0.14 compiler and it should be painless.

Post reply on HN