You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is an extremely simple and flexible entity structure for video games that doesn't make you want to die when you're 20k lines deep in a project.
This is an extremely simple and flexible entity structure for video games that doesn't make you want to
die when you're 20k lines deep in a project.
pros:
- you never have to think about the ideal entity structure again and can get back to working on things that actually matter (actually using it to add new entities and making your game better, instead of overthinking)
- you never have to think about the ideal entity structure again and can get back to working on things that
actually matter (actually using it to add new entities and making your game better, instead of overthinking)
- has all of the reuse power of an Entity Component System (ECS)
- doesn't have the complexity of an ECS
- you don't have to think about where to put that one new piece of data you need while in the middle of gameplay programming
@@ -17,12 +19,14 @@ cons:
- it seems "messy" and wasteful
- probably won't get you laid
If you're heavily memory constrained, you'll probs want to upgrade this into a discriminated union with a shared Entity base structure. Or even dynamically allocate each new entity. But that comes with extra complexity. Don't pay it unless you have to.
If you're heavily memory constrained, you'll probs want to upgrade this into a discriminated union with a shared Entity base
structure. Or even dynamically allocate each new entity. But that comes with extra complexity. Don't pay it unless you have to.
https://store.steampowered.com/app/3309460/Demon_Knives/ (we used the more complicated variation I mentioned earlier, except it was probably overkill in hindsight)
https://store.steampowered.com/app/3309460/Demon_Knives/ (we used the more complicated variation I mentioned earlier,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the tl;dr -> https://storage.randy.gg/entity%20midwit.png
/*
ENTITY MEGASTRUCT
This is an extremely simple and flexible entity structure for video games that doesn't make you want to die when you're 20k lines deep in a project.
pros:
- you never have to think about the ideal entity structure again and can get back to working on things that actually matter (actually using it to add new entities and making your game better, instead of overthinking)
- has all of the reuse power of an Entity Component System (ECS)
- doesn't have the complexity of an ECS
- you don't have to think about where to put that one new piece of data you need while in the middle of gameplay programming
- you can do easy serialisation by just copying the bytes over
cons:
- it seems "messy" and wasteful
- probably won't get you laid
If you're heavily memory constrained, you'll probs want to upgrade this into a discriminated union with a shared Entity base structure. Or even dynamically allocate each new entity. But that comes with extra complexity. Don't pay it unless you have to.
https://store.steampowered.com/app/3309460/Demon_Knives/ (we used the more complicated variation I mentioned earlier, except it was probably overkill in hindsight)