Adventures in C# Programming is a programming course like no other. It teaches the features of the C# language by guiding you step-by-step through the development of an exploring-style game.
You will learn to…
Adventures in C# Programming is a programming course like no other. It teaches the features of the C# language by guiding you step-by-step through the development of an exploring-style game.
You will learn to…
Write a retro-style adventure game like ‘Zork’ or ‘Colossal Cave’
Master object orientation by creating hierarchies of treasure objects
Create rooms and maps using .NET collections, arrays and Dictionaries
Create objects with overloaded and overridden methods
Serialize networks of data to save and restore games
Write modular code using classes, partial classes and subclasses
Program user interaction with a ‘natural language’ interface
Plus: encapsulation, inheritance, constructors, enums, properties, hidden methods and much more…
If you are a beginner programmer and already studying another C# course, this will give you hands-on experience of writing a big and complex project.
If you are an experienced programmer, this will give you a quick way into the twisty little corners of the C# language.
If you are a retro-games fanatic, learn how to write games just like the Infocom classics of the 1980s.
In this course you will learn to write C# your own retro text-adventure game using either the free Visual Studio Community Edition or a commercial edition of Microsoft Visual Studio. All the source code of sample projects is provided ready for you to download, run and modify.
The course instructor, Huw Collingbourne, is the author of the cult adventure game, The Golden Wombat Of Destiny. A long-established programming teacher online, he is also a well-known programming columnist in the UK and is the author of The Book Of Ruby.
Adventures in C# Programming is the ultimate fun way to learn the C# language. So, come on in and let’s begin the adventure.
Learn by writing a text adventure
If you are a Visual Studio 2019 user, be sure to download and read this document before creating a project.
Let’s consider who this course is best suited for.
Be sure you are ready…
How should you study this course? I
Get to know the classics – then write your own!
A Room is an object. So right away I need to do some object oriented programming.
Class Definition
Object creation
Arrays
Scope
Namespaces
Encapsulation
Inheritance
Constructors
Properties
Dictionaries
Subclassing Dictionaries
Enums
Keys and Values
Modular code organization
Adding new objects to a Dictionary
Restructuring code
List management
Generic Lists
Overloading
List operations
Hidden methods
Descendent methods with the same names
Iteration
Overridden methods
The MenuStrip component
Finding an object in one or more lists
Serialization
Note that in the latest versions of .NET the use of BinaryFormatter will generate warnings due to the fact that it is not fully secure. Microsoft now recommends using the XML or JSON formats instead. Here I include an example project using JSON. Be sure also to read the PDF notes supplied.
The [Serializable] attribute
SerializationInfo
Review code
Faking ‘natural language’
Partial classes
Accepting user input
Analyzing user input
Before we move on, here’s a short quiz to help you revise a few important concepts…
The ContainerThing class
It’s time to create your own game. Here are a few ideas…
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.