Polaris: The 4 Cardianls

This is a gallery of images, design frameworks and demo for Polaris: The 4 Cardianls.

portfolio img
portfolio img
portfolio img
portfolio img
portfolio img
portfolio img
portfolio img
portfolio img
portfolio img

Technology

portfolio img

Unity is a cross-platform game engine developed by Unity Technologies, and be able to use for developing 2D, 3D video games. It is cited as a easy to use for beginner developer. For the game design, script, AI design for Polaris: The 4 Cardianls are all developed on Unity Enegine version: 2020.1.16f1. The product is built for both Windows and OS X platforms

Design frameworks

portfolio img

The framework for this project (as shown in Figure 1), is broken down into 5 major components/modules: Quest Manager, Game Manager, Game Logic, and Enemy Manager. The quest manager gives players appropriate quests at specifiedpoints based on game progress. The game manager takes inputs from the game API and player to change and alterthe game based on their inputs, while working alongside the quest manager and game logic to make the game flow. The Enemy Manager controls the movement of the enemy AI. Finally, the game Logic handles the value in the battle and outside of battle, and is the trigger of transferring items in the system

portfolio img

Game Logic and Enemy manager, is an extended framework from the Game Framework (shown in Figures 1). Game Logic affects the value in the battle, outside battle, and the triggers used for the items system. First, the Enemy manager controls the movement of the enemy AI, and there is an enemy library with different types of enemies. This manager is also responsible for what types of enemies will have battle with the player.

Level system and Classes system will affect both the player state and enemy AI; Level system directly affects the strength of the player and enemies, and the Classes system affects the combat style of both sides. Business system, Treasure system and Random loot system are the systems that can directly give items, such as equipment that can improve the strength of the player. Business system represents all the stores and Merchants in the game, these are the places for players to buy equipment or other helpful items. Treasure system provides treasure boxes with equipment and items on different stable places for player to hunt. Random loot system means after the player wins a battle, there is loot from the defeated enemies, such as money and equipment. For these three, they are all about trigger mechanisms.

For mission triggers, it manages stable spots or Non-Player Characters that provide quests for players. Enemy encounter controls when and where a player should have a battle, After Trigger the battle, the player’s view will become a 2D scroll camera instead of a 2D Top-down camera. In the battle, the yellow box, Battle state will manage and calculate the immediate values that happen during the battle, such as player and enemies’ Health Point, Magic Point, etc. After that, it will go to the next yellow box, Combat result. This will determine if the player wins or loses the battle; if the player wins, it will directly go to the random loot system. Else it will be game over.

portfolio img

Here, we show the whole behaviour transition of short range enemy. The initialized state for short range enemy is Move state; when the enemy detects a wall or ledge, it will change state into Idle state, and stops at the edge of the wall and ledge. Once the wait time of Idle state is over, it will change back into Move state. In Move and Idle states, when the enemy detects the player in the minimum range, it will change into Player Detected state, and is going to decide the next step. If the enemy detects the player is in the charge range, it will change into Charge State; the enemy would charge up for a speed boost and run into the player. If the enemy has already charged up, and the player is out of charge range, it will change back into the Player Detected state. After the charge up, if the player is in close range, the enemy will change into Melee Attack state and perform short range combat. In Player Detected State, when the player is in close range, the enemy will also change into Melee Attack State. When the enemy has already charged up and the player is out of close range, it will change back in Player Detected state; however, if it cannot detect the player, it will change into Look for Player state, and starts to look for the player in left and right direction. When the player is found, it will change back into Player Detected state. In any state, the enemy takes damage that is dealt by the player, and we have two important values for the enemy. The first one is health, and the second one is stun resistance. We can decide how many health and stun resistance an enemy owns, and when the health is less than or equal to zero, the enemy game object will be destroyed. Stun resistance is a value that calculates how many hits dealt by the player will change the enemy’s state into Stun state, which the enemy is stunned and has no action for a specific amount of time. When the enemy exits from Stun state, if it detects the player, it will change into Charge state; if not, it will turn into Look for Player State.

portfolio img

And here, we show the whole behaviour transition of long range enemy. It has the same transition on Move and Idle states as short range enemy, also when it reaches Player Detected state, it is going to decide the next step. If the enemy detects the player is in the close range, it will change into Dodge State; it will perform a dodge action toward its opposite facing direction. After that, if the player is still in close range, it will change into Melee Attack state, and performs close range combat. If the player is not in the close but is still in the maximum range, the enemy will instead change into Range Attack stage, and perform a long range attack. If the player is not even in the maximum range, it will change into Look For Player state, and start looking for the player. When the enemy is in Player Detected state, which it detected the player. After a specific amount of wait time, it will also change into Range Attack State, and performs long range attack. Also if the player is still in maximum range after the long range attack, it will change into Player Detected state again. Again in Player Detected state, if the enemy has already dodged, and the player is in close range, it will change into Melee Attack state. When the player is not in the maximum range after the short range attack, it will also change into Look for Player state. Long range enemy has the same Look for Player state behaviour as short range enemy. Also has the same health and stun mechanism. In the Stun state, there are significant different behaviors. If the player is in close range after the stun, the enemy will change into Melee Attack state. If the player is not in close range but in maximum range, it will change into Range Attack state. If it cannot detect the player, it will change into Look for Player state.