C++代写:CS204 A Talent Tree

代写RPG游戏中的技能树逻辑,可以对天赋、技能等进行加点,重置等操作。

Description - A Talent Tree

In many Role-Playing Games (RPGs), characters are developed by going through a talent tree. A talent tree is a collection of “nodes” arranged in a tree form structure. Players could decide how their characters develop by picking different paths. To access each node, certain cost is required. Cost for accessing nodes is different according to their “node level”. Usually, nodes at higher levels require higher cost.

The nodes are categorized as attribute increment and skill learning. Attribute increment nodes help enhance players’ attributes in different areas: Health Point (HP), Magic Point (MP), Strength (Str), and
Intelligence (Int). The skill learning nodes help players equip with new skills.

Tasks / Requirements

The tasks is composed of TWO parts: application and documentations. The application weighs 80% and documentations carry 20%. Both application and documentations will be further decomposed to smaller tasks. Among the 80% of the application part, 15% will be graded in the prototype demonstration phase (in week 13) and the rest (65%) will be graded on the final product.

You are required to develop an application that simulates the given talent tree and be able to perform the following action:

Requirements for Programming Parts

  1. To create a character with random attribute points in those 4 areas mentioned above: (5%)
    • You may ask players about how they wish their character be (like warrior, mage, or somewhere in middle).
    • If players pick warrior, attribute points like HP and strength should be allocated more. MP and intelligence would be allocated more for mage. An average character should have their attribute point averagely allocated, no need to be exact though.
    • Total point of attribute points should lie between 80 to 85.
    • You may assume only 1 character is created for each operation.
  2. To create a node class: (5%)
    • A node should contain all its necessary data
    • Design of node class is flexible. You may assume each node has at most THREE next pointers, except the Origin node.
    • To access each node, a cost is required. The rule of cost computation is as follow:
      • i. Cost of each node is computed according to the distance from the Origin.
      • ii. The minimum cost is 3. For every 2 nodes away from the origin, an additional cost (+2) is required. For every 4 nodes away from the origin, additional cost (+4) is required, and so on. You may refer the attachment for details.
  3. To implement the design of the given talent tree (see attachment): (15%)
    • To enable players to print out the “map” of the talent tree
    • The design of talent tree is one-way and is in a tree structure. Loop does not exist in this talent tree structure. This means you may assume no new node could be assessed from more than one previous node, if you build your tree from the Origin.
  4. To show the path to players if they wish to learn new skills: (15%)
    • To produce an interface1 to players of a collection of skills that they wish to learn
    • To show the minimum cost that they players must earn in order to acquire the skill
    • To show the path how the player could learn the skill from his/her current position
  5. To implement an application that enable users to modify the nodes: (15%)
    • To add nodes to the existing given talent tree. Nodes could only be added to the tail node. If the node is added, its accessing cost has to be computed according to the rule.
    • To delete nodes from the existing talent tree. Only tail nodes could only be deleted.
      Deletion of tail nodes only happens if a node is wrongly added. Under such scenario, if a character has learnt that skill or earned that attribute, your application should be able to do roll-back.
  6. To simulate a character’s growth: (15%)
    • To provide simulation to players so that they could develop their characters. You may assume cost is unlimited.
    • During the simulation, the application should show all available node(s) and their costs to players at their current situation.
    • The application should also display the total cost required to reach to their current node from the Origin.
  7. To produce a user-friendly interface: (10%)
    • Both console and window form interfaces are accepted.
    • Window form interface could score all 10% but console interface could score at most 5% of the mark.
    • Your application should provide a menu and sub-menus for users so that people could understandyourflow

Implementation and Marking Criteria

Implement your design in C++ and document your program with clear description (comments). Test your program.

Even though the requirements have not mentioned, you should implement your design in O-O fashion. Otherwise, marks would be severely deducted. Marks will be allocated according to following criteria:

Application

  • Design of classes and its relations with other classes
  • Completeness and accuracy of functions
  • Efficiency of algorithms
  • Choices of data structure
  • Usage of object-oriented concepts
  • Feasibility of proposed solution
  • Error handling
  • Programming proficiency
  • Programming styles like comments, indentation and naming convention, etc.

Documentation

  • Clarity of your idea presentation
  • Completeness of your description
  • Styles and formats