Master template tower
At the moment there are eight different tower types in the game that all function the AI work and a basic level in that they attack the players towers take health away from them and return back to the spawn points and repeats. as well there are an infinite number of waves the player can go on they do carry on and the AI becoming more difficult as the waves go on and once all the players towers destroyed and they do not have enough resources to construct any more the game ends.
Now is the time to implement and upgrading system into the game which is going off my own design. The way i wanted the upgrading system to work is by depending on other towers around the the idea was by using the grid system we could interweave and upgrading system with it.
The idea of the upgrading system is that when a tower is surrounded in a grid as the picture demonstrates after a certain about time the tower will upgrade itself and will gain stronger and stronger base properties these will be depending on what type towers for example the tree tower will become stronger or sunflower tower will be able to gather more resources per second.
The final idea for the upgrade was that every time the tower upgraded itself there was a chance that would gain a special ability or a "mutation" these will be individual special upgrades but all give the tower's new special abilities over than the ones they have. As when a cow upgrades it only goes up interior and its default properties are changed but when the talent gets a mutation this is one against a special ability.
Blueprint:
The way the tower works out what towers around it are it uses a box collider which is a square shape around the tower which will pick or any towers in a 3 x 3 grid radius around the Tower.
When a tower is spawned in the range of another towers over the last range the first takes that events checks to see if the object has a tower target if true it then goes through the branch and sends an event to that tower with a self reference.
with the nature of a system like this is imperative that all towers act as a the supplier of this event and also the receiver as they will both be receiving and sending these events to multiple towers. So once this event it's the tower it uses the self reference and compares it with itself the check of equals true. This is more an place as a redundancy to make sure that towers don't protect themselves or possible glitching with collision. If the branch is false it then adds this variable to an array called tower around itselfit then changes the tower around itself counts and adds one point to it. A branch then checks to see if the tower around itself count is equal to 8 this would mean that the tower is surrounded by all the towers if this branch equals true and then set a variable called this tower can mutate and now the tower has the ability to gain tier levels over time. It next goes into an retriggerable delay which takes the variable mutation week time before it finishes this is so that it can be adjusted and balanced accordingly. Once this delay has completed it then finally checks with a branch of the variable this tower can mutate as a redundancy and if equal true it then proceeds to upgrade the tower.
a continuation of the previous blueprint it then sets the Tower health to 0 this is a quick way of getting the Tower to delete itself by going through the proper channels which means it will correspond with the camera not messing with its ability of tracking towers to make sure the game ends when it's a posted. We then fire the events checked our health to kickstart the destruction of the Tower we then send a message events to the ground plate Tower it's on this sends through all the required information to construct the Tower every single piece of information about this tower is sent through. finally we send a macro events called one tower has mutated what this does is to reset the reach trigger events for all towers meaning that the only one tower can mutate at a time and it reset the timer is for all of the towers this is so that players cannot have multiple towers mutating at once this means it takes the player's time in order to have their towers upgrade.
On the Ground plate blueprints and then started to activate the construction of the new template tower in place of the old tower. upon receiving the events tower has mutated to me then send all of this information into a macro called some properties to new towerafter this we also take the new tower variable and set this to a tower on plates and then use the event sex ground plates for tower sending a self reference then saying the plate used from real to true
inside this macro takes all the variables that it has imported from the events it then constructs a template tower with the spawn at the nood it then spawns this actor at the same location and because all the variables related to the template tower are on exposed the spawn this means they received important information from the previous tower. Meaning that once this corresponds it will have all the same variables as in previous tower which gives a seamless import into one blueprints making it easy to centre all of the changes that need to happen afterwards.
This design is to make its easier to adapt towers rather than having many different blueprints are each separate type tower converting them all into one central blueprints allows for a lot more change as well as easier to keep track of in the editor.
Blueprint:
The way the tower works out what towers around it are it uses a box collider which is a square shape around the tower which will pick or any towers in a 3 x 3 grid radius around the Tower.
When a tower is spawned in the range of another towers over the last range the first takes that events checks to see if the object has a tower target if true it then goes through the branch and sends an event to that tower with a self reference.
with the nature of a system like this is imperative that all towers act as a the supplier of this event and also the receiver as they will both be receiving and sending these events to multiple towers. So once this event it's the tower it uses the self reference and compares it with itself the check of equals true. This is more an place as a redundancy to make sure that towers don't protect themselves or possible glitching with collision. If the branch is false it then adds this variable to an array called tower around itselfit then changes the tower around itself counts and adds one point to it. A branch then checks to see if the tower around itself count is equal to 8 this would mean that the tower is surrounded by all the towers if this branch equals true and then set a variable called this tower can mutate and now the tower has the ability to gain tier levels over time. It next goes into an retriggerable delay which takes the variable mutation week time before it finishes this is so that it can be adjusted and balanced accordingly. Once this delay has completed it then finally checks with a branch of the variable this tower can mutate as a redundancy and if equal true it then proceeds to upgrade the tower.
a continuation of the previous blueprint it then sets the Tower health to 0 this is a quick way of getting the Tower to delete itself by going through the proper channels which means it will correspond with the camera not messing with its ability of tracking towers to make sure the game ends when it's a posted. We then fire the events checked our health to kickstart the destruction of the Tower we then send a message events to the ground plate Tower it's on this sends through all the required information to construct the Tower every single piece of information about this tower is sent through. finally we send a macro events called one tower has mutated what this does is to reset the reach trigger events for all towers meaning that the only one tower can mutate at a time and it reset the timer is for all of the towers this is so that players cannot have multiple towers mutating at once this means it takes the player's time in order to have their towers upgrade.
the way this macro works is it casts to every different type of Tower there is in the game it then gets all these actors and sends the re-trigger mutation time events top all of them this is how the mutation time is reset once one tower goes of the tear.
this event tower has been destroyed happens when a tower with in the overlap area is destroyed. It comes through with a self reference and this is then checked against the reference of the tower with a branch and if false proceeds it then takes this self reference and removes it from tower around itself array and then changes the tower round itself counts to -1 and then we take the tower around itself counts and if it is less than or equal to 7 it then changes that this power can mutate variable to false. This then stopped the tower from upgrading.
On the Ground plate blueprints and then started to activate the construction of the new template tower in place of the old tower. upon receiving the events tower has mutated to me then send all of this information into a macro called some properties to new towerafter this we also take the new tower variable and set this to a tower on plates and then use the event sex ground plates for tower sending a self reference then saying the plate used from real to true
inside this macro takes all the variables that it has imported from the events it then constructs a template tower with the spawn at the nood it then spawns this actor at the same location and because all the variables related to the template tower are on exposed the spawn this means they received important information from the previous tower. Meaning that once this corresponds it will have all the same variables as in previous tower which gives a seamless import into one blueprints making it easy to centre all of the changes that need to happen afterwards.
This design is to make its easier to adapt towers rather than having many different blueprints are each separate type tower converting them all into one central blueprints allows for a lot more change as well as easier to keep track of in the editor.
No comments:
Post a Comment