Download
@ man n.
Skip this Video
Loading SlideShow in 5 Seconds..
@-Man PowerPoint Presentation

@-Man

154 Views Download Presentation
Download Presentation

@-Man

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. @-Man R. David Sigsby CISP 233 Davenport University Fall 2012

  2. The Concept • Pac-Man clone • Windows console • Close to original • Why? Good gaming intro...... and it's geeky.

  3. The Program staticvoidMain(string[] args){ game = new Game(); game.Map = Properties.Resources.MapDefault; game.Display = new Output.Default.Display(); // do any other config here game.Player.Speed = 5; game.Start();}

  4. The Board 2 Dimensional Array of Characters

  5. The Main Loop System.Threading.Thread.Sleep(ReadyWait); startTimers(); while(status != STOP && food > 0) { System.Threading.Thread.Sleep(SleepPerFrame); setMode(); // ghosts mode handleInput() // also handles pause handleMovement(); renderFrame(); checkCollisions(); } stopTimers(); if(food > 0) display.YouLose(); else display.YouWin();

  6. Introducing: The Ghosts Ghosts move based on a common method, but each ghost has a unique 'personality' that controls it's movements.

  7. The (Not So) Smart Ghosts • Ghosts can not reverse direction (mostly) • Ghosts move based on a target 'cell' • Different target cell for each of 3 modes: • scatter: a fixed cell for each ghost • chase: based on @-Man's location • frightened: select random direction to turn • Ghosts turn based on which directionwill put them closer to their target cell

  8. Making a Decision

  9. Making a (Bad) Decision

  10. Blinky's Targeting

  11. Pinky's Targeting

  12. Inky's Targeting

  13. Clyde's Targeting

  14. Back to Programming: Classes

  15. References Project Source Code (git) https://bitbucket.org/sigsby/atman The Pac-Man Dossier http://home.comcast.net/~jpittman2/pacman/pacmandossier.html Understanding Pac-Man Ghost Behavior http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-behavior