How do I make nom nom pacman app continuous move player

0 favourites
  • 4 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • I'm trying to modify the nom nom pacman tutorial, so the player moves all the time, like in a real pacman game

  • Every tick:

    if pacman is facing up - set pacman Y position to pacman.Y-1

    if pacman is facing down - set pacman Y position to pacman.Y+1

    if pacman is facing left - set pacman X position to pacman.Y-1

    if pacman is facing right - set pacman X position to pacman.Y+1

    But I have not tested it. You also have to check if there are obstacles in the way before pacman moves.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not certain where this every tick is under? Also wouldn't I need a boolean or am I over thinking the solution

  • The every tick is under system. You want the pacman to always move, so you will need every tick. I think you don't need a boolean.

    If the user hits a key you can change the direction pacman is facing and/or moving. You can either use a variable for this and ask if this variable is 1, 2, 3 or 4 (for each direction). You can also safe "left", "right", "up", "down" instead in this variable. Or you can just change the direction pacman is facing and ask which direction he is looking.

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