Jump to content

C# Text-Based Adventure Game Map

Macimoar

I'm making a project for my C# class. The idea is that the end user will be able to use the program to construct their own text-based adventure game. I'm using a WPF, the bottom half of the form will be for the text command input and log, and the top will have a graphical representation of the map and a simple inventory display.

 

I want the map to do two things: 1. Only show a room when the user enters it and 2. Move the player sprite to the correct room. The latter shouldn't be too hard, but it's the former that I have no idea on.

If you've played the adventure game in the Google Chrome Developer Console, then you know the kind of map I want to create.

 

If anyone has first hand experience in this and could give me some tips that would be great, or if someone could point me in the direction of a tutorial I can follow or something, I can't seem to find what I need.

DELETE! DELETE!

EXTERMINATE! EXTERMINATE!

Silence will fall.

 

PSU Tier List - I keep forgetting where this is so I'm going to leave it here.

Link to comment
Share on other sites

Link to post
Share on other sites

is the map showing only 1 room at the time or you mean it's like a labyrinth with black room and THEN it shows up with color and all the gizmos when you enter it ?

 

If It's always showing full map but just partial parts at a time it's very easy. You must be familiar with MVVM if you have chosen WPF over Winform for such a project.

I suggest you make your map as a grid and image elements for each room. One black out and one fully displayed with the character icon inside. Then make a simple class with a boolean property for each rooms. Then bind the background image of each grid with and image where the source depends on the boolean value of that room. If you enter room 6 then you only need to change all the boolean to false but put true in room6 and the grid will use all blacked out images for all rooms and room6 will show all nicely with the character.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×