Tag Info

Hot answers tagged

1

I 'll try to manage InputController changing its behaviour at runtime (in c# can use some kind of delegates) Examples : if activated in_game state then InputController.processInput = logic1 if activated menu state then InputController.processInput = logic2 if activated inventory state then InputController.processInput = logic3 Logic1..N are alternative ...


1

In instances like this I use a stack of input maps. You already have certain buttons doing this or that while playing the game, if you can group that logic into a map (array of button/key => some event) then you can make multiple maps for the different states you have. From there you just need 'some event's that can be used to push and pop the maps from a ...


1

You aren't over complicating it at all. This is a great way to think about a game. It keeps the game flexible for any changes you want to add in the future (say a stats screen). The first place I would look is using the Strategy Pattern: Wikipedia Determine what input triggers you would need and add them to an abstract interface. Then, implement the ...


1

ECS doesn't make miracles and not all the problems should be solved by it. In some point you will need especific code about the specific logic of your game. You can put an "Invulnerable" flag inside your health component and a flag "PenetrateInvulnerability" inside the atack message and your system combat manage then.



Only top voted, non community-wiki answers of a minimum length are eligible