Pages

Tuesday, November 4, 2014

I think we are out of Whale puns

Sorry for the late update this week guys.

As I mentioned last week I said I would be working on tower placement and territory.  Here it is:


You start with some territory around your base.  As you place towers in that territory around your base, your territory will expand.  The current implementation also takes care of invalid tower placement too.  Before you could place towers anywhere, like on ramps, or on top of other towers.  Resources must also be in your territory before you can claim them.  All of this is also networked so you can only see your territory.

We playtested this on Friday and I was pretty happy with the results.

Time Breakdown for the Week:

  • Tile Manager (turns each valid 1x1 area into a "tile" and adds them to a data structure) ~6 hours
  • Visual representation of territory.  This took a few iterations.  First iteration was to instantiate a quad on every valid tile.  This caused an enormous amount of draw calls even with batching and was scrapped.  Second iteration was to draw all of the quads at runtime and then combine them into 1 big mesh.  The plan was to edit the UVs to support one big texture across the entire mesh.  After quite a few hours of unsuccessful attempts I looked at a different approach.  The third and final approach was to draw a big transparent plane with the same dimensions as the map for each height level of the map.  In the image above there are 3 different height levels so 3 different planes were made.  Once I had the planes I would generate a new texture for each of the planes with a resolution the same size as the map.  For each valid tile I would then set the corresponding pixel of the texture to green.  The result is what you see above.  ~ 10 hours  
  • Add new valid territory when placing towers and remove the territory when the tower unearths.  ~3 hours
  • Only show your territory over the network.  ~ 1 hour

No comments:

Post a Comment