logoalt Hacker News

dgb23yesterday at 4:52 PM2 repliesview on HN

It's also notable that video games are programs that run for hours and iterate over large sets of very similar entities at 60 frames or more per second repeatedly and often do very similar operations on each of the entities.

That also means that "just do an array of flat records" is a very sane default even if it seems brutish at first.


Replies

quietbritishjimyesterday at 7:52 PM

I think when he said "just do an array of flat records" he meant as opposed to record of arrays (i.e. row oriented vs column oriented), as opposed to fancy data structures which I think you're assuming he was implying. Separate arrays for each data member are common in game engines exactly because they're good for iterating over, which as you said is common.

show 3 replies
arendtiotoday at 6:29 AM

I would like to add that Braid is not a normal video game.

To me, it is a piece of art. It contains so many mind-bending mechanics that I think it is a real possibility that you could have worked on some of that stuff for years, making it unlikely to ship at all.

So, in addition to the performance requirements of a video game, Jonathan also had to find ways to implement all those fancy mechanics.