3 ms·
Learning about ECS and how to use them made gamedev so much easier for me. Although now I'm hamstrung by only being able to work on games in languages/framework
by p1necone 7y ago
Learning about ECS and how to use them made gamedev so much easier for me. Although now I'm hamstrung by only being able to work on games in languages/frameworks with a solid ECS library (does a good/community agreed upon one exist for rust yet?).
ECS, the observer pattern, and behavior trees are probably the three main things that answered all the "how on earth do they build something this complex" questions for me.
- gentleman11 7y agoI would add state machines to any list of amazing techniques
- p1necone 7y agoDefinitely. Behaviour trees are kind of a special case/evolution of regular ol state machines, but I find both useful in different situations.
- gentleman11 7y agoI was considering learning them soon for enemy ai. Are they useful in other situations too?
- p1necone 7y agoBasic state machines are useful for controlling flow between different menus/game screens - this "current mode" state exists across iterations of the game loop so you need some kind of data based state machine. e.g. in say a jrpg you have "new game/continue" menu -> world map -> battles and character menu and back again. Edit: oh I misunderstood you - you were asking about behaviour trees. I haven't used them for anything other than controlling game unit behaviour (although not necessarily just enemy ai - one other example is using them to combine a bunch of simple actions into one thing that the user can tell a unit to do - so like an attack move in an RTS is actually "loop (is enemy nearby? -> no -> move towards location -> yes -> attack (which is probably it's own behaviour tree))
- Nullabillity 7y ago> does a good/community agreed upon one exist for rust yet? Specs? At least that's what Amethyst uses.
- steveklabnik 7y ago> (does a good/community agreed upon one exist for rust yet?). I just ran across this: https://csherratt.github.io/blog/posts/specs-and-legion/ https://csherratt.github.io/blog/posts/specs-and-legion/