Adventure Story

Documentation:

Game manager

The "GameManager.cs" is the script that manages the various features of the game.

It contains the Stats of the players, their coins and alerts the various features the state of others.

This script is in charge of saving and loading data so that the player can pause the game, and it contain and manage player's items


Player Movement, Switching Scenes and Camera

Through the "PlayerController.cs" script, player movements are managed. The script handles user input, animations, and prevents the PG from leaving the boundaries of the map.

Through the "ToArea.cs" and "FromArea.cs" scripts, transitions between one scene and another are handled. The "ToArea.cs" script is used to send a player to another scene, while the "FromArea.cs" is used to receive a player from another scene.

Through the "PlayerController.cs" script, player movements are managed. The script handles user input, animations, and prevents the PG from leaving the boundaries of the map.


Audio System

Through the "AudioManager.cs" the game can play and stop both Sound Effect and Background Music in every situation (Enter a city, starting a battle, using an attack and similar)


Quest System

With the "QuestManager.cs" script the game save and manage a list of variable to activate and deactivate some Quest Object

"QuestObject.cs" is the script that activate and deactivate other object in the game based on the "QuestManager.cs" variables

"QuestMarker.cs" is in charge to call the "QuestManager.cs" to activate and deactivare variables in various situations

In combo with the Dialog System the game can activate quest even after a Dialogue


Dialog System

Through the "DialogManager.cs" and "DialogActivator.cs" scripts, dialogs are managed. The "DialogManager.cs" pops up the dialog box, the name box when prompted, keeps the messages going, and closes the dialog boxes when finished.

The "DialogActivator.cs", on the other hand, is responsible for calling the "DialogManager.cs" only when appropriate by passing it the dialog to appear.


Player Stats

The "CharStats.cs" take care of keeping a player's stats saved. Through this script you can heal your player or increase his experience, which, if it reaches the right numbers, allows leveling up and then increasing his stats, all managed by this script.


Menu

With the "GameMenu.cs" script you manage the In-Game Menu. Besides controlling when to open or close it, it manages all the operation of the menu and the various submenus:

  • Updates the stats of the players in the main menu
  • Opens and closes the submenus
  • Updates the stats of the Stats submenu
  • Displays Items in the Items menu
  • Activates the Use and Discard functions of the Items menu
  • Allows you to close the game with the Quit button

Items

With the "Item.cs", "ItemButton.cs" and "PickUpItem.cs" scripts, the objects are managed.

The "Item.cs" script represents the various objects by containing all the information and functions that the game and the player need to use them.

The "ItemButton.cs" represents the item in the various menus that can be used in the game (Menu Items, Shop and the Battle menu Items).

The "PickUpItem.cs" allows the player to pick up items from the ground.


Shop

The "Shop.cs" and "ShopKeeper.cs" scripts run the store system. "Shop.cs" manages the menu:

  • Opening and closing the menu
  • Opening and closing the Buy and Sell submenus
  • Allows the use of the Buy and Sell buttons.

The "ShopKeeper.cs" script is used to activate the "Shop.cs" by passing it the items that can be purchased by the player. The list of items can be wired or received via API.


Battle System

It is probably the most important and longest part in an RPG so it is necessary to analyze it by part

Battle Manager

The "BattleManager.cs" script is the heart of the Battle System and contains most of the functions needed to make battles work:

  • Contains references to all the windows and other objects that the Battle System needs
  • Contains all the information pertaining to the current battle
  • Brings up the battle screen
  • Creates the various Battle Characters, both player and NPCs
  • Advances turns
  • Updates the status of the battle
  • Decides what NPCs are doing
  • Manages the damage taken and done
  • Updates the stats window
  • Manages the moves that can be used by players
  • Opens the battle menus: Target, Magic and Items
  • Updates the items in the battle menu Items
  • Activates the function to use items
  • Activates the End of Battle and GameOver Coroutines

Battle Characters and Boss

The script "BattleChar.cs" manages the various players and NPCs that are in the battle, contains their statistics, what moves they can use, and some useful information and functions for the program to function.

This script can be used to create some special enemys, like boss and similar, by creating a new classes that inherits from a BattleChar and then by overriding the ChooseAttack method

Battle Move

The "BattleMove.cs" is a className that handles the various moves, both the normal Slash and the various spells.

Attack Effect

The script "AttackEffect.cs" handles the on-screen effects of attacks

Select Target

The script "BattleTargetButton.cs" handles the target on which the player wants to make an attack

Select Magic

The script "BattleMagicSelect.cs" handles the player's choice of magic

Battle Notification

The script "BattleNotification.cs" handles notifications that may appear during battle such as the death of a player in the party or lack of mana to do a spell

Battle Starter

The script "BattleStarter.cs" is used to start a battle. Depending on the three Boolean fields it will call "BattleManager.cs" passing it the list of enemies and rewards to appear by randomly taking one of several saved enemy sets.

Battle Rewards

The script "BattleReward.cs" is called at the end of a battle in case of victory. When called it opens the rewards menu showing the player what he got from the battle, when the menu closes the script will add the various rewards to the inventory and add experience to the players

Game Over

The "GameOver.cs" is called at the end of a losing battle. When it's called it recall the GameOver scene

Gameplay:

Online Demo

You can try the game online. The porting is only a beta, so it can have bugs.