Code Monkey home page Code Monkey logo

dungeongeneration's Introduction

Random Dungeon Generation V.0.6.6

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,

Features

Some Characters

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.

Demo

Some Other Characters

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!

What's Next

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.

How to Build

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.

Changelog

v0.6.6

  • Implemented PIXI.js as the rendering engine of the game

v0.6.5

  • Started with decent version numbering
  • Game is now fullscreen
  • Seedable random number generator
  • Started with the UI
  • Converted the whole project to be compatible with Browserify

v0.6.0

  • New map generator
  • Path finding for enemies
  • Major code refactoring
  • Added factories to create entities

v4.0

  • A component entity system
  • Turns
  • Interaction with objects, such as doors
  • Monsters and enemies!

v0.2.0

  • Fog of War!
  • Field of view for the player

v0.1.0

  • A player that can walk through the dungeon
  • A camera with a viewport
  • Configurable settings

v0.0.1

  • Random Dungeon Generation
  • Corridors between the rooms
  • Random doors at the end of corridors

Contribute

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!

Contact

Some More Characters

Do you have great ideas, do you want to contribute or just send me an email. You can reach me by emailing to [email protected]!

License

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.

dungeongeneration's People

Contributors

ruscoe avatar stefanweck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dungeongeneration's Issues

npm install EEXIST error

When I try to run
npm install
I get this output:

npm WARN package.json [email protected] No repository field.
npm WARN optional dep failed, continuing [email protected]
npm WARN deprecated [email protected]: please  use(https://www.npmjs.org/package/buffer) instead. this module was renamed.
npm ERR! EEXIST, open 'C:\Users\Jorge\AppData\Roaming\npm-cache\31b0598e--cache-through-2-3-6-package-tgz.lock'
File exists: C:\Users\Jorge\AppData\Roaming\npm-cache\31b0598e--cache-through-2-3-6-package-tgz.lock
Move it away, and try again.

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\ProgramFiles\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install"
npm ERR! cwd D:\Github\dungeongeneration
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! path C:\Users\Jorge\AppData\Roaming\npm-cache\31b0598e--cache-through-2-3-6-package-tgz.lock
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! not ok code 0

project status

Hi,

This looks like a very nice project and the artwork is top class. ๐Ÿ‘
I wonder what made you loose interest and never come back to it?
Did you hit any specific roadblocks or got to a point where you wanted feature X but found out it would be just too much work to implement it?
Maybe you lost interest for html5 as a game dev platform?

On a side note, I can only see the hero and a spider in the source.
Please consider releasing at least a few other character sprites, even if under a more restricted license, as this would help those trying to tinker with this codebase and add some more functionality to it.

Peace! ๐Ÿ˜‰

Error when npm install!

image
I download project and input npm install in my vscode terminal window.
And error happened.
How to solved this error?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.