1 / 41

All About PacMan

All About PacMan. Susan Miller/Jeff Bush Scalable Game Design University of Colorado. What will your story be? This story can be tailored to a number of different audiences…. Rules of PacMan.

sane
Download Presentation

All About PacMan

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. All About PacMan Susan Miller/Jeff Bush Scalable Game Design University of Colorado

  2. What will your story be? This story can be tailored to a number of different audiences…

  3. Rules of PacMan PacMan travels a maze world, eating up the pellets. Ghosts chase the PacMan. If the ghost gets too close to the PacMan, the PacMan dies!

  4. Same game…different description… Once upon a time, in a land far away lived a Traveler who wandered the world filled with obstacles looking for the lost treasure. He was told to avoid the terrible Chasers who would render him dead if they got near him. If he found the treasure, he would win.

  5. Same game…different description… A long time ago, in a land far away, lived a prince, longing to marry his princess. The mean king, however, told the prince that he couldn’t marry the princess until he found all the gold in the country. Since the king didn’t like the prince, he sent his henchmen to chase after the prince and kill him.

  6. NOUNS = AGENTS No matter which version of PacMan you choose, you will still need agents… What will you need?

  7. Verbs= ACTIONS What will each agent do?

  8. Let’s Jump In Open AgentCubes Online Click on NEW PROJECT Save your file as PacMan

  9. Let’s make the basics… A PacMan, a Chaser, the ground, the walls and the Pellets

  10. Create your agents (or clone ours) PacMan 10 minutes Ghost(s) Ground Walls End Pellets https://www.agentcubesonline.com/project/68900

  11. Make a new world/level that is at least 16x21

  12. Put your agents on your worksheet

  13. Create your world

  14. It’s time to SAVE THE WORLD!

  15. Let’s get programming…

  16. Making the chasers chase… BACON!!!!! How can we find the scent in a room?

  17. The doggy is going to sniff for the bacon…

  18. Which way will the dog go?

  19. The PacMan is stinky… He leaves his SCENT on the GROUND

  20. The ground now has the PacMans scent on it… How do we use MATH to determine the strength of the scent?

  21. Imagine you have two values for scent on the ground…

  22. Now imagine you have four values for scent on the ground…

  23. Now imagine you have four values for scent on the ground… We can MODEL the DIFFUSION equation, by taking the AVERAGE of the four tiles.

  24. Programming Steps: 1. Program the PacMan to leave a scent 2. Program the ground and the pellets to diffuse the scent 3. Program the ghost to ‘smell’ the scent and determine which direction it is strongest.

  25. 1. Program the PacManto leave a scent - Create an agent attribute

  26. 2. Program the ground to diffuse the scent

  27. 2. Program the ground to diffuse the scent (s[up]+s[down]+s[left]+s[right])/4

  28. Now program the PELLETS to also diffuse the scent! Discussion question: Why do we want both the pellets and the ground to diffuse the scent?

  29. Now, let’s get the Ghosts to follow the strongest scent

  30. Now, what if we want to end the game when the pellets are all gone?

  31. Class, who is still working???

  32. Introducing the controller… The controller is an agent whose sole purpose is to count the Pellets…

  33. How this works… The controllers will set the number of Pellets to zero The controller will ask (poll) the Pellets to see who is still on the worksheet The Pellets will ‘answer’ by ‘counting off’ The controller will check the number of Pellets to see if it is equal to zero. When the number of Pellets is equal to zero, the game is over.

  34. When the Controller asks the Pellets if they are still on the board, they increase the count by one for each Pellet. One! Three! Two! Four!

  35. When the Controller asks the Pellets if they are still on the board, they increase the count by one for each Pellet. One! Three! Two!

  36. When the Controller asks the Pellets if they are still on the board, they increase the count by one for each Pellet. One! Two!

  37. The controllers will set the count of Pellets to zero, poll the Pellets, and then check to see if the game is over.

  38. Hill Climbing shortcut for diffusion

  39. Hill Climbing shortcut for diffusion

  40. Challenge activities Make PacMan change direction Make PacMan move continuously PowerPellet Next Level

More Related