Difference between revisions of "Rot.js tutorial"
Kodiologist (talk | contribs) (Linked to the Node.js version on GitHub.) |
|||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
== Ananas aus Caracas: a sample game built using rot.js == | == Ananas aus Caracas: a sample game built using rot.js == | ||
Welcome to this tutorial! We are going to create a very simple roguelike game, playable in any modern browser. To achieve this, our language of choice | Welcome to this tutorial! We are going to create a very simple roguelike game, playable in any modern browser. To achieve this, our language of choice will be [[JavaScript]]; to simplify our work, we are going to use the [[rot.js|rot.js toolkit]]. | ||
This tutorial covers creation of a game to be played in a web browser. [http://github.com/blinkdog/ananas-aus-caracas-node See here] for a version of the game ported to Node.js so it can be played in a terminal emulator. | |||
=== Requirements === | === Requirements === | ||
Line 10: | Line 12: | ||
=== Game setting === | === Game setting === | ||
The tutorial consists of three chapters, which gradually add more and more functionality. The game itself is pretty simple: motivated by [https://www.youtube.com/watch?v=z4dMkYUlrR8 | The tutorial consists of three chapters, which gradually add more and more functionality. The game itself is pretty simple: motivated by [https://www.youtube.com/watch?v=z4dMkYUlrR8 this video], a player needs to find an ''ananas'' (pineapple) hidden within several boxes in an underground dungeon. It is necessary to find the ananas before Pedro (the ananas owner) finds and punishes you for sneaking into his warehouse. | ||
=== Tutorial contents === | === Tutorial contents === | ||
Line 16: | Line 18: | ||
'''NOTE:''' Working code samples from this tutorial are hosted at jsfiddle.net and use rot.js from GitHub. Please note that GitHub is '''not''' a CDN; you should use your own servers to host all the necessary files. | '''NOTE:''' Working code samples from this tutorial are hosted at jsfiddle.net and use rot.js from GitHub. Please note that GitHub is '''not''' a CDN; you should use your own servers to host all the necessary files. | ||
* '''[[rot.js tutorial, part 1|Part 1: Basics, map]]''' | |||
*: Create the basic data structures, initialize the output area, generate and draw the map | |||
* '''[[ | * '''[[rot.js tutorial, part 2|Part 2: Asynchronous game engine, player character]]''' | ||
*: Introduce the player character, add it to the engine/scheduler, let it move around | |||
*: | |||
* '''[[rot.js tutorial, part 3|Part 3: Interaction, Pedro]]''' | |||
*: Let the player open boxes (to make the game winnable); implement Pedro and his pathfinding (to make the game losable) | |||
[[Category: Developing]] | [[Category: Developing]] |
Latest revision as of 13:06, 20 March 2015
Ananas aus Caracas: a sample game built using rot.js
Welcome to this tutorial! We are going to create a very simple roguelike game, playable in any modern browser. To achieve this, our language of choice will be JavaScript; to simplify our work, we are going to use the rot.js toolkit.
This tutorial covers creation of a game to be played in a web browser. See here for a version of the game ported to Node.js so it can be played in a terminal emulator.
Requirements
- Basic JavaScript knowledge
- Modern web browser (Firefox, Chrome, Opera, Safari, IE9+)
Game setting
The tutorial consists of three chapters, which gradually add more and more functionality. The game itself is pretty simple: motivated by this video, a player needs to find an ananas (pineapple) hidden within several boxes in an underground dungeon. It is necessary to find the ananas before Pedro (the ananas owner) finds and punishes you for sneaking into his warehouse.
Tutorial contents
NOTE: Working code samples from this tutorial are hosted at jsfiddle.net and use rot.js from GitHub. Please note that GitHub is not a CDN; you should use your own servers to host all the necessary files.
- Part 1: Basics, map
- Create the basic data structures, initialize the output area, generate and draw the map
- Part 2: Asynchronous game engine, player character
- Introduce the player character, add it to the engine/scheduler, let it move around
- Part 3: Interaction, Pedro
- Let the player open boxes (to make the game winnable); implement Pedro and his pathfinding (to make the game losable)