Food is one of the most important items that you look for on the map so it’s appropriate that food be the first inventory item that we implement in our roguelike game. In this chapter, I’ll demonstrate how the player’s level of hunger can be managed and write the function that will allow the player to consume food and keep going.
In addition to collecting inventory, the player needs to be able to view their inventory and manage its contents so they can have the specific items they need. We also need a way to display other screens and come back to the map when needed.
The inventory items have a complete cycle throughout this game, depending on the item, and each step has to be coded so that the inventory exists and is managed just like inventory items would be in real life. Every part of the program will be affected in some way.
A Changing Landscape In 2011, I was interviewed for a programming job at a local company and, as part of the interview, I was asked to provide some samples of my coding. I brought a couple of significant examples I was happy with and let the interviewer look over them. He immediately asked me to…
Now we need inventory collection in the game, starting with food. We need a system in place for collecting and managing not only food but all the other collectibles such as armor, weapons and potions which often have different requirements.
Role-playing games are often turn-based; your character performs an action and then all the other characters and opponents get their turn. For this reason, managing the turns is essential to the game and that’s what we’re looking at in this chapter.
In this chapter, I want to review what we’ve done so far in this series to show how everything has contributed and where it’s going from here so you’ll have a better understanding of how an application grows.
Hidden doorways and passages are one of the challenges in many games and Rogue is no exception. It makes the game a little more challenging and stretches out the game experience, too. In this chapter, we’ll see how to add hidden doorways to our own roguelike.
The “fog of war” is an important feature for adding challenge and mystery to a game as the player must gradually discover new territory and whatever surprises are there. It’s also a challenging feature to code.
Rogue is a game in which the player moves through many levels to their ultimate goal. In this chapter, we add this feature to our own game.