Desert of Barbarians is a funny meta-Javascript game set in the The Tartar Steppe world, inspired by the classic Missile Command game.
You are a young recruit with the goal to defense your castle from Barbarians attacks. The more you improve your defenses, the more you have chance to survive.
The game presents a board for playing the game and a board for writing your code. You are welcome to follow suggestions and hints from the chat box on the right.
Try to finish all the game for getting your final score. You can try to improve it as many times as you want!
Just go to Desert of Barbarians and insert your username for playing.
For the local usage you just need to install NodeJs. Then:
Clone the repository:
$ git clone --recursive [email protected]:lukesmolo/Desert-of-Barbarians.git
Launch the server from the game directory:
$ nodejs server.js
Open a browser to 127.0.0.1:8000 and play the game!
We would be very glad if you want to contribute to improving this project. Please fork it and submit a pull request! 😎
In order to add a level, you need to:
- Write the code for the new level
- Write dialogues for the new level
- Update max_n_level variable both in server.js and public/js/index.js
Write the new level in a .js file and put it inside the public/levels directory, renaming it levelX.js according to its number.
Write dialogues inside dialogues file. The order in which you write dialogues will be the order in which dialogues will be displayed.
Every dialog has an header:
/*character-X
where character is one among:
- colonel
- assistant
- crazy_doctor
and X is the number of the level.
After the header you can write the dialog, in this way:
""dialogdialogdialog...
If dialog has to appear after user has answered a specific answer, i.e., when user has chosen among more answers, you have to include the previous number of the answer before dialog. For example:
""2--dialogdialogdialog...
This dialog will appear after user will have chosen the previous second answer.
After a dialog, you can write an answer for the user, in this way:
--answer...
If you want to write more than one answer, you need to include the next dialog referred to, in this way:
--1--answer1...
--2--answer2...
--3--answer3...
Once you have completed dialogues, just parse them with parser.py. It will automatically create dialogues files.
$ python2 parser.py dialogues
Desert of Barbarians is a game by Alessandro Cocilova and Luca Sciullo.
We would like to thank all authors of these libraries:
Icons were Designed by Madebyoliver and distributed by Flaticon
Desert of Barbarians is released under the GPLv2 License.