5 ms·
What do you mean by game-style here? I’m very intrigued. Any place to read more about these?
by aparsons 5y ago
What do you mean by game-style here? I’m very intrigued. Any place to read more about these?
- foota 5y agoThe keywords here are things like data oriented or "structures of arrays". Some examples are unity ECS or amethyst and bevy in Rust language.
- astrange 5y agoIt's called entity-component systems in games. Note that OOP was designed for simulations but games, the only kind of simulation people like using, don't use OOP.
- astrobe_ 5y agoI think the more accurate references is "Parallel arrays", aka "Structure of Arrays" (SoA) [1] The amusing thing is that SoA is something you could see in old languages that didn't have data structures, or the code of newbies that don't know data structures. [1] https://en.wikipedia.org/wiki/Parallel_array https://en.wikipedia.org/wiki/Parallel_array
- scambier 5y agoIt's "Entity Component System". The "system" is part of the pattern name.
- BlueTemplar 5y agoPlenty of games use OOP (C++ !). And ECS is just relational OOP.
- loopz 5y agoGaming has always been pushing boundaries of what's possible performance-wise. For high-throuhput data loops, there's already established patterns used by gamedevs that maximize use of cache and cpu/gpu.
- elcapitan 5y agoLook for "Data oriented design" or "Structs of arrays". Here's a talk on the former by Mike Acton: https://www.youtube.com/watch?v=rX0ItVEVjHc https://www.youtube.com/watch?v=rX0ItVEVjHc On the latter, there's Jai, a new programming language for games (WIP, unpublished) by Jonathan Blow, who has been very public in documenting the process creating it, and which is centered around such concepts. There is some unofficial documentation of the ideas on SoA vs AoS and how the language can help switching between the two, e.g. here: https://pixeldroid.com/jailang/overview/Features/SOA/#/overview/ https://pixeldroid.com/jailang/overview/Features/SOA/#/overv... and here: https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md#data-oriented-structures https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md... Edit: Just realized that the articale even mentions Jai towards the end.
- CodeArtisan 5y agohttps://gameprogrammingpatterns.com/component.html https://gameprogrammingpatterns.com/component.html https://gameprogrammingpatterns.com/data-locality.html https://gameprogrammingpatterns.com/data-locality.html