Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How do i start building a python turn based battle game? I understand that it involves using lists, classes, functions. Would appreciate any help how

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

How do i start building a python turn based battle game? I understand that it involves using lists, classes, functions. Would appreciate any help how to start.

Project: Developing a Turn-Based Battle Game Your team has been assigned to develop a console or GUI turn-based battle game. The game allows player setup his/her team which made up of a numbers of units (default is 3). Each unit has a name, health point (HP), attack point (ATK), defence point (DEF), experience (EXP) and a rank. On top of that, a unit can be either a Warrior or Tanker which having different strength in different range for ATK and DEF point. The initial value for each attribute point are describe in the details requirement in Part A - Table 1. The game will then setup another team belongs to Al which made up of same number of unit as the player's team. The type of unit will be assigned randomly by chances. The name of each unit will be specify by the player while the name of each unit for Al team will be defined with prefix with "AI" follow by 2 random digits i.e. Al87. A player can select a unit from his/her team and attack the other unit (the target) in the opponent / Al team. Unit which are severely damaged (i.e. HP equals to less than 0) will be defeated and removed from the team. The team (player/Al) which destroy all the opponent units first will be declared as winner of the game. Features Game Setup Description This features allows player to setup a team of 3 units and select which profession (Warrior / Tanker) each unit will be. This features allows player assign name for each of the unit. The initial point for each attributes within a unit are assigned with the following rules: Attribute Warrior Tanker Health Point 100 100 Attack Point Range between 5 - 20 Range between 1 - 10 Defence Point Range between 1 - 10 Range between 5 - 15 Experience Point (EXP) Rank/Level > or 1 > or 1 Table 1: Example of initial value for each attribute point within a unit. Student may define their own range for AIK and DEF based on their game setting This features then will setup the Al team which consist of 3 units with random name and profession as mentioned earlier. This features allows player to select a unit from his/her team to attack and then select another unit from the opponent team as the target. The program will then initiate an attack based on the selected unit and the target. The attack resulting the health (HP) of opponent being deductedo effect and both selected unit and targeted unit will gain experience (EXP). Player Attack The following are sample calculation / game rules when an attack take place: Damage = attacker.ATK - target.DEF + (random between negative 5 to 10) target.HP deducted based on the calculated damage point. attacker.EXP increase based on the calculated damage point. Target.EXP increase based of its DEF point. Extra EXP i.e. 20% - 50% gained by the targeted unit when the following incident happens: o Damage point more than 10 (gain extra 20% EXP) o Damage point equal or less than 0 (gain extra 50% EXP) A unit will be promoted (level up) when the EXP point reached 100. Rank will be updated upon promotion. EXP will be deducted by 100 point. A unit will be removed from the team when the HP become 0 or less. Al / Opponent Once the player completed an attack, the Al team will then take its turn Attack to initiate an attack. Same rules applied on the damage and experience point calculation above. User Interactivity You as the game developer will need to define your own logical/creative algorithm for the Al team to make the unit and target selection. The program allows player (user) to interact via console/python shell by asking question(s), getting input from keyboard, and provide options for actions. Note: Higher marks can be obtained if GUI application is develop (See enhanced features below) Game Message Event Log The program should display necessary messages i.e. status of all unit at the point of request, battle information, etc The program should record all game event, timestamp and its details and save in a plain text file on the local machine. Appropriate in-code commenting Documentation Enhanced features, concept and packages applied (10%) Features Description Game Setup & On top of the core features for battle mode specified above, the Game Play program can be enhanced by the following features Each team can collect/earn coin based on the damage point applied to the opponent units. Each team can recruit/hire a new unit with the collected coins to strengthen the team. Allowing user to save the state of the game and resume later when the program is loaded. Any other interesting game play / battle rules can be applied. OOP Concept Appropriate use of Object-Oriented Programming paradigm covering the abstraction and encapsulation concept, object collaboration as well as separation of concerns. User The enhance user experience, the program shall provide decent Interactivity Graphical User Interface for interaction. (Recommended packages are tkinter, pygame, turtle, PyQt, Kivy) Technical Specification and Guidelines: You are expect to apply the concepts learn in this module when developing this game. You may use List to store the collection of units. Even better if you uses Object Oriented Programming concept to manage the units and team in the game. You may use other python libraries/packages for the development and must be included into your individual portfolio

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Power Of Numbers In Health Care A Students Journey In Data Analysis

Authors: Kaiden

1st Edition

8119747887, 978-8119747887

More Books

Students also viewed these Databases questions

Question

Contrast the differences between coaching and feedback.

Answered: 1 week ago