What next?

As the title suggests, I am not sure what to do next. Let me try to see what I want to have.

  • three different characters for each team. They are a tank, a long range shooter and a close combat unit.
  • Tank moves slowly and has a lot of hp. Fires slowly but powerfully.
  • The long range shooter fires from a long distance, powerful shots and low hp.
  • The close combat unit moves quickly, hits hard and has more hp than the long range shooter but less hp than the tank.

Of course, I will have to do a lot of number tweaking and balancing. I should consider migrating this to unity so that I can have builds ported to hand held devices. But since I don’t have a deadline I have time to learn more about BTs. I still have not come to the optimized memory storage or the BT using events yet.

When I have anything to evaluate I’ll start migrating everything to unity. Then I can gather feedback relatively quickly. It will also be interesting to use C# more and learn more about it.

I also want the units to have a sense of other units. I am thinking in the long run that they should both help each other if a team mate is near by and change attack priority from walking to the base and attack it to stop and attack an enemy and if need be, change path to follow the enemy, if an enemy is in range.

I need some collision avoidance/detection as well. Regarding the bases and the agents themselves, a simple range check will do. Since I’ve got the path following the nodes I should be able to skip the target node and a number of nodes depending on what unit is currently wandering. For example, the tank might stop 3 tile distances away and the long range 5 tile distances and the close combat unit stops just one tile distance away. Later on I will not want the units to overlap each other (at least not visibly so).

For now I believe I should start building the distance from base feature and then add the attack. This should be the most straight forward step to take because I only need to adapt the tank itself and the way it receives the path nodes. Then it will become more natural for me to add the attacking because I most certainly will need a base class that knows how much it is damaged by the shots and make a note of when it is destroyed. This design will have to be planned carefully because I want to have a smooth way of pulling this off. Right now, I am considering the observer pattern to send and receive the information needed;

“Tank is attacking you with its current attack power!”

“Ok, I withdraw that amount from my HPs.” and eventually; “OOOps, I’m dead!”

Like I said though, first the distance from the base must be solved.

Take care now!

Oh BTW, Yes I moved that nasty line of code from the creation of the tanks, the one described in the last post that would potentially cause problems during runtime, I simply broke it off the creation function:

https://pastebin.com/aFC9ERVi

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s