Building a Roguelike in Javascript - Part 12

Weapons and Wearables

This is the sixteenth post in the Building a Roguelike in Javascript series. I recommend you start at the beginning unless you've been following along. This part corresponds to the the twelfth part in Trystan's series. All the code for this part can be found at the part 12 tag of the jsrogue repository. At the time of writing, I am still using the d4ea2ab commit for rot.js.

In this post, we are going to add weapons that an entity can wield to increase attack value as well as wearable items that will increase an entity's defense value.

Demo Link

The results after this post can be seen here.


Building a Roguelike in Javascript - Part 11

Hungry Heroes Need Food

This is the fifteenth post in the Building a Roguelike in Javascript series. I recommend you start at the beginning unless you've been following along. This part corresponds to the the eleventh part in Trystan's series. All the code for this part can be found at the part 11 tag of the jsrogue repository. At the time of writing, I am still using the d4ea2ab commit for rot.js.

In this post, we are going to add a hunger system to our game. Over time our hero will grow hungrier and eventually starve if no food is consumed! In order to do this we will need to create consumable items! Monsters will sometimes drop corpses when killed and there will be consumables scattered throughout the cave! Important note about refactoring since last post: I have renamed the Game.Mixins namespace to Game.EntityMixins and have moved all the entity mixins to assets/entitymixins.js, leaving only entity templates and the repository definition in assets/entities.js. I reccomend you pull the code at the pre-part 11 tag before starting this post.

Demo Link

The results after this post can be seen here.


Building a Roguelike in Javascript - Part 10b

Inventory and Item Management

This is the fourteenth post in the Building a Roguelike in Javascript series. I recommend you start at the beginning unless you've been following along. This part corresponds to the second half of the tenth part in Trystan's series. All the code for this part can be found at the part 10b tag of the jsrogue repository. At the time of writing, I am still using the d4ea2ab commit for rot.js.

In this post we are going to give our hero an inventory! That means the hero will be able to pick up items from the cave floor as well as drop them back onto the floor. We're also going to create a screen to view the items the player currently has!

Demo Link

The results after this post can be seen here.


Building a Roguelike in Javascript - Part 10a

Items on the Cave Floor

This is the thirteenth post in the Building a Roguelike in Javascript series. I recommend you start at the beginning unless you've been following along. This part corresponds to the first half of the tenth part in Trystan's series. All the code for this part can be found at the part 10a tag of the jsrogue repository. At the time of writing, I am still using the d4ea2ab commit for rot.js.

In this post we are going to add the notion of items to our game! We're also going to make it so that items get generated throughout the floors of our cave. In the next part of this post, we're going to make it so the player can actually pick up items and carry them in an inventory!

Demo Link

The results after this post can be seen here.


Building a Roguelike in Javascript - Part 9

Wandering Monsters

This is the twelfth post in the Building a Roguelike in Javascript series. I recommend you start at the beginning unless you've been following along. This part corresponds to the ninth part in Trystan's series. All the code for this part can be found at the part 9 tag of the jsrogue repository. At the time of writing, I am still using the d4ea2ab commit for rot.js.

In this post we are going to make some more interesting cave dwellers! We are going to add some monsters which wander randomly around the cave and attack our hero. Although this initial artifical intelligence is very primitive, it will be a good stepping stone for future posts! We're also going to do some refactoring to the way entities are stored in order to allow us to quickly look up if an entity is at a given position!

Demo Link

The results after this post can be seen here.