Advertisement

TD Mechanic Advice Wanted

Started by July 30, 2018 01:29 AM
2 comments, last by Tom Sloper 6 years, 1 month ago

I am working on a prototype of a game for a class, which might turn into a side project afterwards. I am building a game in Unreal (4.18) using both code and blueprints. My plan is to make a tower defense game in which you place 5 random towers down before each round and then select one to keep, unless 2-3 of the 5 towers can combine to make a stronger tower (a oneshot). The player can also combine towers during the round if possible. Combined towers end up replacing the tower selected to allow the player to choose the most strategic spot for the tower. The unselected or combined towers then turn into impassible blocks, establishing the maze. (side note, enemies have 4 points on the map they must hit in order, before moving to the base and damaging it, hence the reason for the player making a maze)
 

My hope in this post is to get some guidance/suggestions on to how best turn enemies into blocks when they aren't selected. I was thinking of using some bool or maybe enums that when false would replace the tower with a block. I am not sure what code or blueprint would best handle that replacement. Any advice or resources would be greatly appreciated!

32 minutes ago, Brandon Segraves said:

best turn enemies into blocks when they aren't selected.

Unselected towers to blocks?

Well the best I can think of is to have some kind of manager object that all these towers are parented to. Then a For Each loop can be used to check if a child was selected or not; by checking a bool. This manager object will then hide the towers not selected, and instead replace them with a block. The reason i would use a manager object like this is so that all the blocks can be batched.

Because if you don't batch them, each block will cast it's own shadow; slowing down the game. If you made a single batch it would just need one shadow.

 

Maybe if you explained exactly where your problem is, I could help you better. Do you know how to program?

Advertisement
12 hours ago, Brandon Segraves said:

I was thinking of using some bool or maybe enums that when false would replace the tower with a block. I am not sure what code or blueprint would best handle that replacement.

This isn't a Game Design question, then (it isn't a "what to do" - it's a "how to do, in code"). Moving to another board. 

-- Tom Sloper -- sloperama.com

This topic is closed to new replies.

Advertisement