WebFund 2013F: Tutorial 9: Difference between revisions
Created page with "In this tutorial you will be modifying <tt>adventure-ajax-demo</tt>, an updated version of [ Adventure Demo] that now uses asynchronous background requests (AJAX) to navigate ..." |
No edit summary |
||
Line 1: | Line 1: | ||
In this tutorial you will be modifying <tt>adventure-ajax-demo</tt>, an updated version of [ Adventure | In this tutorial you will be modifying <tt>adventure-ajax-demo</tt>, an updated version of [[WebFund 2013F: Tutorial 6|Simple Adventure]] that now uses asynchronous background requests (AJAX) to navigate between rooms and update the page. | ||
First, grab the code, either [http://homeostasis.scs.carleton.ca/~soma/webfund-2013f/adventure-ajax-demo.withmodules.zip with modules] or [http://homeostasis.scs.carleton.ca/~soma/webfund-2013f/adventure-ajax-demo.nomodules.zip without]. Then unzip it and get it running as usual. (If you download the version with modules, you shouldn't need to run <tt>npm install</tt>.) | First, grab the code, either [http://homeostasis.scs.carleton.ca/~soma/webfund-2013f/adventure-ajax-demo.withmodules.zip with modules] or [http://homeostasis.scs.carleton.ca/~soma/webfund-2013f/adventure-ajax-demo.nomodules.zip without]. Then unzip it and get it running as usual. (If you download the version with modules, you shouldn't need to run <tt>npm install</tt>.) | ||
Do the following: | Do the following: | ||
* | * Create a room, the Holodeck, which is just connected to sick bay. | ||
* Get to the secret room by editing and re-sending a post request. | |||
* Modify the server code so that attempts to get to non-existent rooms instead send you to the Void. | |||
* Modify the server code so that if the password "openSesame" is included in the post request, it allows users to enter the secret room. If users give the wrong password or no password at all, they should get redirected to the void. |
Revision as of 06:31, 8 November 2013
In this tutorial you will be modifying adventure-ajax-demo, an updated version of Simple Adventure that now uses asynchronous background requests (AJAX) to navigate between rooms and update the page.
First, grab the code, either with modules or without. Then unzip it and get it running as usual. (If you download the version with modules, you shouldn't need to run npm install.)
Do the following:
- Create a room, the Holodeck, which is just connected to sick bay.
- Get to the secret room by editing and re-sending a post request.
- Modify the server code so that attempts to get to non-existent rooms instead send you to the Void.
- Modify the server code so that if the password "openSesame" is included in the post request, it allows users to enter the secret room. If users give the wrong password or no password at all, they should get redirected to the void.