Advice for navigating puzzle maze game?

From the Asset Store
An amazing and interesting puzzle game for kids!
  • Hey guys, im looking for a good way for my character to navigate smoothly throughout the mazes. I was thinking maybe making pathways for each of the mazes where the character could move accordingly without moving off the paths ,bumping into walls and getting of course.

    Example...

    The mouse will move along only on the lines to help control turning and staying in course within the mazes. The lines will be invisible of course in actual gameplay.

    Honestly, thats the best idea I had for it since I started working on this project. But wanted to know if possible, other ways to go about this? And would I use the PIN Behavior for this? And could this be done with the Drawing Canvas as well?

  • I've made something like this before (a map screen with defined paths). The way I did it was to have a bunch of sprites to be 'nodes' on the path and each node would have instance variables containing the UID of the next node(s) you'd go to if you pressed each direction.

    Eg. one node might contain these variables:

    UP: 123

    DOWN:

    LEFT: 567

    RIGHT: 890

    And when the user was on the node and pressed the arrow direction they wanted, the game would then pick the node object with the UID specified in the instance variable and send them moving in that direction (or, if no UID was specified, assume that there was no path there and do nothing).

    Just had to put these nodes at every junction and set the IDs up so they'd all link together in the right way.

    Admittedly it was slightly tedious doing it that way but it was only a small map screen. If you had to do a LOT of mazes it might be worth thinking of a smarter way to do this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh wow. Thank you for the insight man. I do indeed have A LOT of mazes lol for this game. Maybe up to 30 to 35 levels, but I can't imagine putting a node for each turning point, turns, directions you name it lol. Also the character can go into holes and come out the other hole. I definitely would like to know of another way, but that's the best idea I could think of that would best seem to work. I appreciate the advice tho man ;). Hopefully I can think of a better way or someone who might know a better way pass on some helpful info. Thanks once more ;) Here's another screenshot of another maze.

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