custom 8grid movement behavior - tips and advice?

0 favourites
  • 2 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • As mentioned in another thread I'm thinking about building my own behavior. I'm working on game prototypes that use grid movement (8way) and currently all my mobs (pc and npc) are using the same logic for movement (plus some basic pseudo path finding for npcs).

    Thanks to the awesome help of the community I managed to achieve a good grid movement, that snaps to the grid, checks for walls and even mob collision. Would it be possible to create a behavior that does the same:

    • check if mob is moving
    • set movement distance (set to grid size via action)
    • set movement speed
    • support state/condition/variable to set mob as immobile
    • support temp. deactivation of control input
    • check for collision / overlap with solid objects (for walls, objects and other mobs) as 8way does
    • allow custom controls (should be easy to recreate as

      rexrainbow already did it in his 8wayMP Behavior)

    Bonus (+100pts)

    • allow to set a "move to" grid position (based on grid size) and simply set movement direction to that angle (snapping to either 4way or 8way grid angles as mentioned in this thread)

    Bonus (+10.000pts)

    • check if next block is empty and if not, go either left or right to avoid simple obstacles (And enable/disable this feature via setting or action. It should be only required for AI movement)

    Not sure, I got all requirements but that should be about it.

    1) Is it possible to build this as a behavior?

    2) Is there maybe a behavior that does this already? (not looking at path finding behaviors because they tend to be to slow for larger numbers of mobs)

    3) Any tips, where to start or how to tackle this biggie in js?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks to the awesome help of the community I managed to achieve a good grid movement, that snaps to the grid, checks for walls and even mob collision. Would it be possible to create a behavior that does the same ?

    Would you be able to post a capx of your successful grid movement?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)