Tuesday, October 14, 2014

HTML 5 and javascript game programming.

pac.azurewebsites.net


I want to get better at javascript and I still think that the best way to learn something new is to just dive in and start using it.

Only when you actually try and create something do you realize what you know, wish you knew, or thought you knew but don't.

So the challenge was to create a Pacman game.  I wanted to make something fairly close to the original.  For instance I knew that each ghost had its own movment pattern but I did not know what it was.  I found this great site that explains the rules of the ghost behavior: Understanding ghost behavior

So the ghost behavior made it into the game.

Other features are:
  • Just like the original, the ghosts will attack in waves and then back off and then attack again.
  • When you eat a ghost, the eyes zoom back to the home base.
  • Pacman can outrun the ghost because it can take corners quicker than the ghosts.
  • If you stay too long on a level, then the red ghost will become quite fast. Don't hang around too long.
  • And also - there is also a high score table!
So what are you waiting for? Have a go at: http://pac.azurewebsites.net