UQcsse3200 / 2023-studio-3

MIT License
1 stars 4 forks source link

[Team 2] Towers Feature Ticket #5

Closed The-AhmadAA closed 1 year ago

The-AhmadAA commented 1 year ago

Description

The game revolves around the defense of human resource extraction operations on various planets. This is carried out by defensive installations we call "towers". This ticket is for the implementation of the towers feature. This feature relates to the tower installations, their creation, destruction, phyiscs, visuals, and input handling. Projectiles and attacking are handled in feature #7 Projectiles.

SubFeatures

This feature is broken up into the following subfeatures:

Creation - 2 members

Handles the creation and destruction of the tower entity and associated actions, such as UI triggering (showing which tile is being occupied, initiating render), Map interaction (occupying tiles, marking tiles unavailable), Economy interaction (Checking and deducting 'cash') and tower health.

Graphics and sound - 1 member

Handles elements such as creation of the render component, tower image, tower animation, and sound effects.

Physics - 1 member

Handles the physics elements of the tower such as physics component and collider component.

Input - 1 member

Initial implementation of the input handling, in preparation for future upgrade functionality. Process and register inputs and trigger tower stats' display.

Examples (optional)

Tower creation example

The intent is that towers are created by selecting them in the build menu <insert task?>. If the player's resources are sufficient to construct this tower, then a transparent tower UI element is shown wherever the mouse pointer is, and highlights the tile onto which the tower would be placed if the player clicks in that location . A tower entity would then be created at that location, occupying the selected tile and initiating all the components of the tower (render, physics, collision, and so on). The tower upon taking damage would reduce health until reaching 0, at which point the tower would be removed from the map (with the appropriate pyrotechnics).

Physics example

The intent is that the tower, once placed, will occupy the tile space it is on, and prevent movement through the tile. Mobs will not be able to traverse the tile, and will attack the tower instead, until they destroy the tower or are killed by it. The tower will also be susceptible to ranged attacks from Mobs. However, if towers are placed in a row along the lane, their projectiles should....

Input example

The player should be able to click or hover on a tower and see information displayed about its health, attack damage, (maybe other stats such as number of enemies destroyed or upgrade status?). This feature should pave the way for a pop-up upgrade menu that allows upgrading of the tower's attack damage, attack speed, or hp.

Dependencies

Creation team will have dependencies in the scope of the economy and map teams. Update with reference

UI elements and Input will have dependencies in the scope of the interface team. Update with reference

List any features on which this ticket relies. If there is already an existing ticket, reference it using #xx. If a feature needs to be implemented and the issue does not already exist... make a new ticket and leave it unassigned for someone else to take on.

e.g. Random game mode relies on random map seed generation(#xx).

Milestones

List of sub-features you intend to have done and in Master by the end of the sprint.

Extras (optional)

Documentation

Members

The-AhmadAA commented 1 year ago

Edited feature ticket to replace 'UI Elements' with 'Graphics and sound'.

Mohamad11Dab commented 1 year ago

I've developed the TowerFactory class which includes a base function to produces a standard tower entity, intended to serve as a foundational entity for more specialized tower creation processes. I've also integrated the CostComponent to cater to entities requiring cost allocation, typically for towers. Additionally, I've set up blank files: baseTowerConfigs (located at: entities/configs) and tower.json, which are earmarked for storing tower properties and subsequently loading them into TowerFactory. For a comprehensive understanding of configuration, please refer to the "Configuring Entities" section on the wiki.

Mohamad11Dab commented 1 year ago

Added JUnit tests for TowerFactoryTest and CostComponentTest

Mohamad11Dab commented 1 year ago

I've developed Walltower and WeaponTower as Towers sub features, with their configurations located in entities/configs. Walltower serves as a barrier against mobs, while WeaponTower shoots at mobs (but integration with projectiles is still needed). Additionally, I've added new JUnit tests in TowerFactory to validate the functionality of these new features.

The-AhmadAA commented 1 year ago

This Feature has been implemented and merged into main - some tasks have been covered by other teams and bonus tasks in this feature will be taken forward into future sprints.