7 ms·
You more or less described Zig
by dario_od 2y ago
You more or less described Zig
- mr_00ff00 2y agoSort of, although Zig certainly pushes itself towards the embedded world. I have tried Zig a bit and like it a lot, and I am sure it would be better for game dev than Rust, but I don't want to pass allocators around all day to all the objects in my game. Go without GC is more like a Go and Zig baby.
- mholub 2y agonothing really prevents you from defining global allocator in Zig and having explicit allocator in standard library is actually a good thing, cause it's quite a common case in game development to use arena allocators which are being freed once per frame - so you don't really need to reinvent your data structures in Zig I do have some concerns about Zig because it also introduces some friction for correctness sake like requiring to always use all variables, explicit casts everywhere - I want some compiler toggle to disable all of that and focus on problem but unfortunately it's not there I am playing with Zig now and haven't really formed my opinion about game development specifically but I like it a lot so far
- throwawaymaths 2y agoTo be fair though that sort of friction only affects things in the small. They can be annoying but you'll never have to refactor outside the scope of the friction itself. In practice, it's only really a problem if you're doing codegen.
- lr1970 2y agoZig is flexible. If you don't like global allocators or explicitly passing allocators, you can store pointer to the allocator in your object and it will be passed implicitly.
- thegeekpirate 2y agoOdin is almost precisely that, and has many useful gamedev features and bindings.