Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Tuesday, January 13, 2015

Mastermind

I quite like JavaScript and wanted to know a little more about drag and drop so I decided to make an online version of Mastermind.

Visual Studio makes it easier to write JavaScript.  It has good IntelliSense and you can quickly locate your functions and variables. You can also debug the JavaScript by stepping through the code line by line.

In the game, you can drag the pieces from anywhere.  For instance you can take a piece from the row below and drag it up.

The game can be played here: mastermind.azurewebsites.net.

If you are curious about the JavaScript then you can download it from here and save it to your computer.  (You may get security warnings).

Rinus

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