=== WORK IN PROGRESS ===
Au moment où j’écris c’est encore juste une ébauche de PacMan, on peut juste tester le déplacement, les collisions et l’algo de recherche du fantôme rouge.
Quand on a des specs aussi précises c’est un juste un plaisir de les implémenter :D
The red ghost’s character is aptly described as that of a shadow and is best-known as “Blinky”. In Japan, his character is represented by the word oikake, which means “to run down or pursue”. Blinky seems to always be the first of the ghosts to track Pac-Man down in the maze. He is by far the most aggressive of the four and will doggedly pursue Pac-Man once behind him.
Of all the ghosts’ targeting schemes for chase mode, Blinky’s is the most simple and direct, using Pac-Man’s current tile as his target.
All ghosts move at the same rate of speed when a level begins, but Blinky will increase his rate of speed twice each round based on the number of dots remaining in the maze. While in this accelerated state, Blinky is commonly called “Cruise Elroy”, yet no one seems to know where this custom was originated or what it means. On the first level, for example, Blinky becomes Elroy when there are 20 dots remaining in the maze, accelerating to be at least as fast as Pac-Man. More importantly, his scatter mode behavior is also modified to target Pac-Man’s tile in lieu of his typical fixed target tile for any remaining scatter periods in the level. This causes Elroy to chase Pac-Man while the other three ghosts continue to scatter as normal. As if that weren’t bad enough, when only 10 dots remain, Elroy speeds up again to the point where he is now perceptibly faster than Pac-Man.
If a life is lost any time after Blinky has become Elroy, he will revert back to his normal behavior and speed when play resumes, heading for his home corner during the initial scatter period. But once the last ghost (Clyde) has left the ghost house in the middle of the board, he will turn back into Elroy again. Keep in mind: he is still in scatter mode the entire time.
Nicknamed “Pinky”, the pink ghost’s character is described as one who is speedy. In Japan, he is characterized as machibuse, meaning “to perform an ambush”, perhaps because Pinky always seems to be able to get ahead of you and cut you off when you least expect it. He always moves at the same speed as Inky and Clyde, however, which suggests speedy is a poor translation of the more appropriate machibuse. Pinky and Blinky often seem to be working in concert to box Pac-Man in, leaving him with nowhere to run.
In chase mode, Pinky behaves as he does because he does not target Pac-Man’s tile directly. Instead, he selects an offset four tiles away from Pac-Man in the direction Pac-Man is currently moving.
If Pac-Man is moving left, Pinky’s target tile will be four game tiles to the left of Pac-Man’s current tile. If Pac-Man is moving right, Pinky’s tile will be four tiles to the right. If Pac-Man is moving down, Pinky’s target is four tiles below. Finally, if Pac-Man is moving up, Pinky’s target tile will be four tiles up and four tiles to the left.
Pinky is the easiest ghost to exert control over thanks to his targeting scheme. By changing direction, you can dictate where Pinky will turn next when he is nearby. If you are facing off closely with Pinky, he will turn before he reaches you if he can. This happens due to the fact Pac-Man has come close enough to Pinky for Pinky’s target tile to now be behind him.
Nicknamed “Inky”, Inky uses the most complex targeting scheme of the four ghosts in chase mode.
He needs Pac-Man’s current tile/orientation and Blinky’s current tile to calculate his final target.
To determine Inky’s target, we must first establish an intermediate offset two tiles in front of Pac-Man in the direction he is moving. Now imagine drawing a vector from the center of the red ghost’s current tile to the center of the offset tile, then double the vector length by extending it out just as far again beyond the offset tile.
Inky’s targeting logic will keep him away from Pac-Man when Blinky is far away from Pac-Man, but as Blinky draws closer, so will Inky’s target tile. This explains why Inky’s behavior seems more variable as Pac-Man moves away from Blinky. Like Pinky, Inky’s course can often be altered by Pac-Man changing direction or “head-faking”. How much or how little effect this will have on Inky’s decisions is directly related to where Blinky is at the time.
sources : pacman dossier
== Contrôles ==
Pour les déplacements vous utiliserez les flèches directionnelles du clavier.
1 click sur la scène réinitialise le jeu.