Quantcast
Channel: Pedro's Tech Mumblings
Viewing all articles
Browse latest Browse all 63

Game-development Log (7. Attack and explosions)

$
0
0

On my last post I've added interactivity to the units. On this post I'm taking it further by adding an attack option and corresponding explosions :)

First of all I've included an extra tank on the map that's not controllable by the player. Hence, a nice target to be attacked (although non-destructible).

The attack is triggered in the same way as a regular movement, by dragging the unit. When on-top of another unit it changes to an attack cursor, showing additional info.

Live Link: http://site-win.azurewebsites.net/Map/V5



I've implemented the explosion using the particle lib at http://scurker.com/projects/particles/


To place the explosion on Bing Maps I've used the pushpin's "htmlContent" property to create a new canvas where the explosion is rendered.

I've also used a custom html pushpin to display the attack details. For now only the range isn't hardcoded.

And that's it for now.



Viewing all articles
Browse latest Browse all 63

Trending Articles