GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Pacman type movement of enemy

I have had lots of questions from my year 8 & 9 students about how to make maze games similar to Pacman. Can anyone point me towards any relatively simple tutorials on how to make the enemy chase the actor and also spawn from random locations within the game/maze. We have added some random spawners inside the maze at specific locations but its a matter of getting them to move towards the player or through the maze. At the moment the kids are only making the player move by using the arrow keys and "move behaviour"

Comments

  • tatiangtatiang Posts: 11,796Member, Sous Chef, PRO, Senior Sous-Chef

    Someone can correct me if I'm wrong but I believe Pacman ghosts move in set patterns and then deviate as needed to approach the player (Pacman). I'm not sure starting with Pacman is the easiest idea... something like Space Invaders or Daleks or even Spy Mouse would be much easier as a stepping stone to other enemy movement a step below Pacman.

    I found two sites that describe ghost movement... a quick perusal shows that there's some definite complexity to the whole process.

    http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-behavior
    http://mentalfloss.com/uk/games/31287/the-different-strategies-of-each-of-pac-mans-ghosts

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • ArticulatorArticulator Posts: 9Member, PRO

    Thankyou for you response. I have tried to steer my kids away from it, generally towards a scrolling endless runner type game, pong, asteroids flappy whatever, I was thinking that if I could create a random spawner in a couple of locations ( I have year 8 students who have eaten up the tutorials that TShirtbooth did on random spawners) they just want the enemy objects to be able to follow within the maze walls, or in one case move along a street or footpath as in a skaterboy. Ive just seen Jamie Cross's tutorial on enemy chasing players and will give that a go.
    Thanks heaps for your time.
    BTW I have 2 year groups using GS and they totally love it! It teaches them soooo much I just cant keep up with them.

  • tatiangtatiang Posts: 11,796Member, Sous Chef, PRO, Senior Sous-Chef

    @Articulator said:
    BTW I have 2 year groups using GS and they totally love it! It teaches them soooo much I just cant keep up with them.

    That's great! I first started using GameSalad with 7th and 8th graders and they've done quite well with it. I've taught students as young as 4th grade (9 years old) and though it's a stretch to get them to work through the logic and sequencing, they can build simple games and enjoy the possibilities.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,913Member
    edited November 2015

    The best method might be to use pathfinding behavior. Also checkout my youtube channel as I have over a hundred videos on gamesalad. My videos are brodcast quality teaching videos.

  • ArticulatorArticulator Posts: 9Member, PRO

    Thankyou for that, I have watched several videos that you have produced and mention them to my students to have a look at as well. You do an awesome job and it is really appreciated. I will check out the Pathfinder behaviour cheers

  • UtopianGamesUtopianGames Posts: 5,686Member
    edited November 2015

    Check out our free bundle below and check out ghost follow at 2:00 in the video below.

    Its an old template now (nearly 5 years old) but should give you some ideas.

    http://www.deepblueapps.com/?product=gs-free-bundle

  • stevejstevej Posts: 435Key Master, Head Chef, Member, PRO GameSalad Employee

    Some useful reading: Pacman ghost behavior.

  • ParkGamesParkGames Posts: 117Member, PRO

    I have a Pacman like game but instead of ghosts the player must escape fire. This allowed for random movement around the maze by the fire - it is spooky though that the fire seems to know where you are and head directly for you!

    For a more Ghost like movement you could try having the 4 ghosts just head towards Pacman's last knowing location that is updated once per second or two. One ghost will target a space directly in front of paceman, one behind him and the others go to the top and bottom. After 30 seconds send the ghost to each corner of the maze then repeat.

Sign In or Register to comment.