1 / 15

@-Man

@-Man. R. David Sigsby CISP 233 Davenport University Fall 2012. The Concept. Pac-Man clone Windows console Close to original Why? Good gaming intro... ... and it's geeky. The Program. static void Main ( string [] args) { game = new Game();

rosina
Télécharger la présentation

@-Man

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. @-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

More Related