News for hackers. Stuff that matters.
Re:24 Hours of Rust Game Development by whatshisface on Monday March 04, 2019 @09:04PM (#19307513)
>If you want to make a simple game like this, just sit down and program it in the obvious way. It will work.

I have heard that the restrictions imposed by the Rust compiler make it surprisingly hard to get it working the normal way. The first time I heard of ECS was in a Rust talk about how it helped them stop fighting the borrow checker.

Re:24 Hours of Rust Game Development by Impossible on Monday March 04, 2019 @09:45PM (#19307689)
For a simple game it seems like you could get away with vectors of mutable structs. This looks like ECS where one entity has a single component and there are only a few systems that update them (update, draw). For simple games you can do the old-school arcade style model with memory allocated upfront for everything (giant mutable gamestate struct) which was called out as not scalable in the talk but it worked for countless classic console and arcade games and scales all the way to Call of Duty. Another option is to avoid mutation and go for a functional style where you return a new game state struct after update (drawing probably shouldn't need to mutate), which might not scale for large games but is completely reasonable for small games without much state.
Re:24 Hours of Rust Game Development by nine_k on Monday March 04, 2019 @10:37PM (#19307909)
I suppose you can have a giant game state and return a new immutable copy on every frame if the amount of change is small, and you reuse most of the unchanged state.
Re:24 Hours of Rust Game Development by Manishearth on Tuesday March 05, 2019 @06:33AM (#19309829)
> hard to get it working the normal way

This is mostly for complex games, otherwise for simple stuff there are ways to get it working.