CSCI 470
Web Science
Spring 2013

Montana Tech
Computer Science & Software Engineering



Assignment #6 - Dungeon Online, single-player version
Due: 10PM, Thurs 3/7.

You will be building the beginning of a multi-player online game. This week, we will just build a single-player local version of the game. You will learn to use the new Canvas element that has been added to HTML5.


Overview.
The login page of the game allows users to create an Avatar with a given name, choose their avatar's image, and choose a dungeon to play in. The player is then assigned a random position in the dungeon and the player can navigate through the dungeon using their arrow keys. The player can type short messages that appear temporarily below the player's Avatar. You should implement your web page using HTML5, JavaScript, and the <canvas> element.

Files. The file dungeon.zip has the images for the assignment. It also contains a completed version of the login page and a partially completed version of the game page.

We have provided you with a set of dungeon?.txt files that define dungeons of different sizes. Here is a small example:
13 10
W W W W W W W W W W W W W
W - W - - - - - - D - - W
W - W - W W W - W W - - W
W - W - D - D - W W - - W
W - - - W W W - W W W W W
W W W - W W W D W W - - W
W W W - W - - - - D - - W
W W W - W - - - - W - - W
W - - - W W W W W W - - W
W W W W W W W W W W W W W
The two integers specify the width and height (respectively) of the dungeon in tiles. The "W" character denote walls, the "D" character denotes doors, and the "" character denotes passageways. The provided PHP function convertArray($filename) can be used to create a 2D JavaScript array containing data from a dungeon file.

Requirements:
Submission. I will be testing your program on the URL you send me via email. I will be using the Firefox browser. You also need to submit your source file(s) to the Moodle dropbox. The Moodle timestamp is the completion time for the assignment.

Page last updated: February 16, 2014