Rogue C# – Taking Inventory
It’s time to add more inventory items but first we need a way to define their abilities without getting lost in the code.
Because technology should be the means, not the end.
The arts are not a way to make a living. They are a very human way of making life more bearable. Practicing an art, no matter how well or badly, is a way to make your soul grow, for heaven’s sake. Sing in the shower. Dance to the radio. Tell stories. Write a poem to a friend, even a lousy poem. Do it as well as you possibly can. You will get an enormous reward. You will have created something.
Kurt Vonnegut, A Man Without a Country
It’s time to add more inventory items but first we need a way to define their abilities without getting lost in the code.
The method for processing user commands was getting out of control so I decided on some creative use of the Dictionary class to automate things.
In this chapter, I review the access modifiers available in C# and how they affect where properties and procedures can be accessed in the code.
In the latest chapter, a flowchart of the Game startup process points me to a problem assigning inventory to the player.
The classes in the Rogue C# code were developed over time and I decided an important part of the project rescue was to look them over and see who was talking to whom.
This week, I decided to setup a Substack profile where I’ll be reposting upcoming content from the site. Substack is a newsletter and subscription service where you can subscribe to my content, including the Rogue C# series, and get e-mail notifications every time I post a new article. I’ll also be posting additional odds and…
While quality code should be well-commented and easy to follow, sometimes you need other types of documentation to actually see the shape of a process. In this chapter, I flowchart the map creation process and find ways to improve the code.
In this chapter, we’re going back to the official list of requirements for our Roguelike and expanding them to cover the game from start to finish.
In this update, I’m ditching the monochrome map and adding some color graphics on the map with text drawing via the TextRenderer class.
It’s been a few years since the last report from the Rogue C# project and the dungeon retains its mysteries. Time to dust off the project notes and find what awaits discovery.