logoalt Hacker News

kunosyesterday at 10:58 AM0 repliesview on HN

> What features in Jai make it superior to C++ for writing games specifically?

Some examples that come to mind from my personal experience.

- Compile times. 1-2 seconds vs the typical build times in a C++/Rust game can be a game changer

- Massive compile time capabilities.. you can have an entire content pipeline executed at compile time, all written in Jai

- Builtin Type reflection.. another gamechanger in games for editors and such

- Very easy to debug, the minimalistic approach means the code is not heavily transformed by the compiler thus really easy for a debugger to follow and still performant. Example: loading the same gltf file in my engines in Rust and C++ debug mode is MUCH slower than debug mode in Jai.. again, game changer.. you hit build/run and you're back in the game in few seconds.

- Very easy to learn

- Very ergonomic in its minimalism

- A lot of small things you instantly miss when jumping to other language.. one thing on the top of my head.. the ability to have struct members "overlay" other specific locations.. so you could have a Matrix4 struct with Vector members "forward" "right" "up" etc

- The builtin "context" based "temp allocator".. perfect for games, anything that is needed for a frame goes in there with close to zero allocation time and it gets reset every frame at zero cost

Jai has a HUGE potential if it can survive Mr. Blow's ego.. which is a big big ask.