Skip to content

Created "Engineer" based on Issue #218#229

Open
JerryLin828 wants to merge 9 commits into
Yao-class-cpp-studio:mainfrom
JerryLin828:engineer-branch
Open

Created "Engineer" based on Issue #218#229
JerryLin828 wants to merge 9 commits into
Yao-class-cpp-studio:mainfrom
JerryLin828:engineer-branch

Conversation

@JerryLin828

@JerryLin828 JerryLin828 commented Jan 15, 2025

Copy link
Copy Markdown

Introduction

Based on Issue #218, I created 2 units, "Engineer" and "Small Turret", which function as described below. This is built on my first PR, #224, where I implemented the "Double Shrinker".

Engineer

  • Appearance: Unlike a tank, the engineer is a single person. The icon is inspired by the classic game surviv.io: a large circle represents the person's head, while two small circles represent their hands. The head is painted red for better distinction.
  • Moving: Since the engineer does not have a turret, there is no need for rotation. Therefore, the keys W, S, A, and D are used to move the engineer upwards, downwards, leftwards, and rightwards, respectively.
  • Health: As the engineer is only human, their maximum health is limited to 20 points.
  • Creating Small Turrets: The engineer has a special skill that allows them to build small turrets (half the size of tank turrets) at their current position. After each building action, the skill must cool down for 5 seconds (fire_count_down = 5s) before it is ready to be used again.

Small Turret

  • Appearance: The small turret looks identical to a tank turret but is half its size.
  • Rotating: The player cannot manually rotate the turret. Instead, the turret automatically identifies the nearest enemy (another player) and points in their direction.
  • Shooting: Similar to the tiny_tank, the turret has a fire_count_down of 1 second, and it shoots a regular cannonball (normal bullet as described in Create an "engineer" unit that places attackable obstacles #218). The player can press P to fire.
  • Health: The turret has a maximum health of 100 points. When it is hit, the cannonball disappears.
  • Disappearance: The small turret disappears 10 seconds after being built. As a result, there can be at most 2 small turrets in the area at any given time.

You can see how they function in the video below:

Engineer.Video.mov

Closes #218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create an "engineer" unit that places attackable obstacles

1 participant