Scenario: You are hired by a game development company. Your task is to create an RPG hack & slash console game. The game will have a movement system that will be based on the x, y, z coordinate system. You will need to start with creating 3 classes. 1. A class that represents a player 2. A class that represents an enemy 3. An abstract class that contains the movement logic. Step 1: Start by creating the superclass which defines the movement system for both enemy and player. The movement system is based on the Coordinate system. Imagine an x, y, z plane, the y coordinate is used to move forward and backward in the virtual plane, x to go left and right, z to go up and down. For example, A player with coordinates x, y, z with values -5, 10, 0 represents a player -5 units to the left, 10 units forward, and 0 z units mean on the ground. (0, 0, 0) are the base units which means the player or enemy is at the start of the level. Step 2: Create a class to represent the player which is derived from the movement logic superclass. A player will have health, attack power, jump power. You should also be able to show the stats of the player. Step 3: Create a class for the enemy which will be identical to the player class but will have an additional attribute of enemy type. An Enemy type can be anything you want but will give unique attributes to that enemy. For example, an enemy with the type of "Mage" that deals attack power damage to the player. Step 4: Create a system that allows the player to attack an enemy. Step 5: Create an interactive menu. Step 6 (Bonus): Create a jump system for the player which increases the z coordinate of the player based on its jump power, then brings the player back to the ground concerning acceleration due to gravity -9.8 m/ Note : ALL Code Must be in OOP (JAVA)
Scenario:
You are hired by a game development company. Your task is to create an RPG hack & slash
console game. The game will have a movement system that will be based on the x, y, z
coordinate system. You will need to start with creating 3 classes.
1. A class that represents a player
2. A class that represents an enemy
3. An abstract class that contains the movement logic.
Step 1:
Start by creating the superclass which defines the movement system for both enemy and
player. The movement system is based on the Coordinate system. Imagine an x, y, z plane,
the y coordinate is used to move forward and backward in the virtual plane, x to go left and
right, z to go up and down.
For example, A player with coordinates x, y, z with values -5, 10, 0 represents a player -5
units to the left, 10 units forward, and 0 z units mean on the ground. (0, 0, 0) are the base
units which means the player or enemy is at the start of the level.
Step 2:
Create a class to represent the player which is derived from the movement logic superclass. A
player will have health, attack power, jump power. You should also be able to show the stats
of the player.
Step 3:
Create a class for the enemy which will be identical to the player class but will have an
additional attribute of enemy type. An Enemy type can be anything you want but will give
unique attributes to that enemy. For example, an enemy with the type of "Mage" that deals
attack power damage to the player.
Step 4:
Create a system that allows the player to attack an enemy.
Step 5:
Create an interactive menu.
Step 6 (Bonus):
Create a jump system for the player which increases the z coordinate of the player based on
its jump power, then brings the player back to the ground concerning acceleration due to
gravity -9.8 m/
Note : ALL Code Must be in OOP (JAVA)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images