Skip to main content

Text Adventure Game using C# and Winforms

Downloaded: 1190

Last edit: 10 February 2022

Resource Type Worksheets and Activities, Teaching Resources, Example Programs and Live Lessons
English Key Stage 16-18 Years (KS5)
Curriculum Topic Programming

This tutorial consists of two pdf documents, the first showing how to create a GUI in Visual Studio and the second how to write the code.

The entire solution is provided for use with Visual Studio 2019 or 2022

The game uses a static class for the Player that has examples of direct public access to properties and the use of auto-properties to allow the choice of get; set; or both

There is a generic Item class used for game objects, and three classes that inherit from it for Weapons, Potions and Notes.

The use of the 'is' keyword to determine the dataType of a class allowing the correct casting to be applied to the Item sub-classes

There is an example of an overloaded function

Edit history

Graham Bridge | 10.02.22

Initial creation

Unlock