This project started out as a small project to experiment with random dungeon generation. Quickly I began to notice that this was a lot of fun to work with and I added a player. And I added some enemies. And I rewrote the map generator. I added turns. Etc etc, until we ended up here! A roguelike game with a random dungeon generator that I am creating purely in javascript on canvas!
Version: 0.6.6 - 5 August 2014
By Stefan Weck,
Random Dungeon Generation
Every playthrough will be different because every single map is different! The map generator tries to create new maps that are worth exploring and that encourage you to clear the entire map.
Turn Based Combat
Not only is everything turn based. It is also based on speed. For example, some enemies can act twice while you can only perform one action.
Component Entity System
This system allows me to attach components to entities. Examples of components are: Sprite, CanOpen, CanFight or KeyBoardControl. By combining these components and attaching them to entities I can create almost anything. Do you want to control a door with your keyboard or do you want a magic door that is able to fight? It's all possible.
Fog of War
You want to know what's on the other side of that wall? Go check it out, you don't have X-ray vision to look through walls. A thick fog of war will hide everything that isn't lit up by your torch, allowing enemies to sneak upon to you. Who know what happens in the dark.
Configurable Settings
Currently this only applies to fellow programmers that know their way around the code. But in the future I will let people choose their own settings before they start their playthrough. Ensuring once again a new and fresh experience.
You can view a live demo with the current code on GitHub right here: Live Demo. Note: Move the character around with your WASD keys!
Looting
One of the more important parts of the game is being able to loot enemies, chests and other piles of garbage! This means the player should have an inventory to store and use all these items.
Advanced Enemy Behaviour
For now every enemy is very dumb, they just run to you as soon as they see you. If you manage to lose them they will wait in the dark again until you show up. I want more intelligent monsters that flee when hurt, or that cooperate with other monsters to corner you!
Different Types of Rooms
Every room is now a plain old square. I would like to see some more variation in terms of room layouts. Maybe have some rooms where the floor has collapsed or have rooms that are overgrown with grass.
I provide a fully compiled version of the game in the dist
folder. Both plain and minified formats are in there.
Install NPM if you haven't already done so. NPM is a package manager that ships with Node.js. Then open up your console and navigate to the root folder of this project.
Run npm install
once to install all the dependencies needed by this project. Next there are a few options:
Run grunt build
to perform a new build to the dist
folder. This way Browserify will generate a bundle from every required script in the lib
folder, this will also generate a minified file of the bundle. This is preferred when you are done developing and want to push your new changes, as this version doesn't include the debug map.
Run grunt dev
to watch every module needed in the project for changes. Watchify will take care of rebuilding the bundle so the only thing you have to do is refresh your browser. No need to run grunt build
everytime you make a change. This version includes a debug map so you are able to debug single files while the .js file included is still the bundle file.
Run grunt debug
to let JSHint check the code for you, a tool that helps to detect errors and potential problems in your JavaScript code.
v0.6.6
v0.6.5
v0.6.0
v4.0
v0.2.0
v0.1.0
v0.0.1
I would love for the community to help along with this project. It's already getting a decent sized game and chances are that I overlooked something or could improve something!
If you find an error or problem report it on GitHub Issues!
Feel free to fork the repository and propose a pull request!
Do you have great ideas, do you want to contribute or just send me an email. You can reach me by emailing to contact@stefanweck.nl!
This project ( the code ) is licensed under the terms of the MIT license, found in LICENSE.md
The MIT license does not apply to the art used in this project. Please create your own art when using the code from this project.