New answers tagged

0

I'd probably use those three variables: Vector2i previousTile Vector2i nextTile float transition Previous and next tile are pretty self explainatory. If player wants to move, nextTile is set to his target coordinates (eg. [2, 1]). Player is in "moving" state if previous and nextTile are different. The "transition" field is used to tell where the player is ...


0

If the visual position is needed by one set of systems and the logical position by another set of systems, then it might be a good idea to have a separate component for each. Have the Animation system and the Rendering system read the VisualPosition components. Have the game-mechanical systems read the LogicalPosition components. Have the Movement System ...


Top 50 recent answers are included