A downloadable game for Windows

This game is called Super Adventure and it is a Decision-based RPG where you will have to perform great feats and complete certain tasks to improve. But be careful, as you will face fearsome creatures. Remember, you can always return to your sweet home.

Some Technical Details

This game, although it may seem simple at first glance, integrates several quite interesting concepts that I wanted to implement and refine in C# and through the use of certain design patterns. For example: To generate all the objects, I use a JSON file that stores the essential attributes of each weapon, character, place, item, and mission. Then, thanks to the Factory design pattern, we can read these objects and create and instantiate them, which allows us great ease in creating more missions, places, items, and weapons without modifying the code. We only need to modify the JSON correctly.

The implementation of the interface: INotifyPropertyChanged for updating the visual section. A bit like the Observer pattern in Java, when a model class undergoes some change, the ViewModel classes get updated, allowing us to see those changes in the visual section, and avoiding direct coupling between the model classes and the view classes.

To facilitate moving the combat logic into its own class, I began by creating a separate MessageBroker class. This class can be used by any object in the game and observed by the UI. The MessageBroker acts as a “Message Broker” – a class that separates the publisher and subscribers in the Observer pattern. We’ll handle messages to the UI through this MessageBroker class, which will be a Singleton (ensuring only one instance exists that all other objects in the program can share). The UI will subscribe to this single MessageBroker, eliminating the need to create individual events and subscriptions for each different type of class we might create in the future.







Download

Download
SuperAdventure.zip 1.5 MB

Leave a comment

Log in with itch.io to leave a comment.