Page 1 of 1

Attack area visualization widget

Posted: 24 Jan 2013, 16:22
by a1983
Image
Here is attack area visualization widget. Currently its work only for cannons and direct fire towers. It's damned slow, so currently it can be used only to place towers. When you build tower, press meta key to see, where your tower can fire.
There are some ugly maths, may be you guys can help to improve that. Also may be to do something with square - made them more smooth.
Any help would be appreciate.

P.S.
This is continue of this topic

Re: Attack area visualization widget

Posted: 24 Jan 2013, 16:26
by smoth
neat!

Re: Attack area visualization widget

Posted: 24 Jan 2013, 16:35
by Jools
What is that interface you have? It looks very nice. Especially the build menu.

Re: Attack area visualization widget

Posted: 24 Jan 2013, 20:10
by danil_kalina
Can Lua calculate some stuf in other thread and return result by callback when it is done ?

Re: Attack area visualization widget

Posted: 24 Jan 2013, 20:31
by jK
Strange I always worked on the related engine code & visualization for ages now. And just a few days ago commited the most important changes. So 92.0 will be able to show a bad attack cursor for positions static defense cannot hit.
I also experimented with the attack range circle, to switch from the estimation function to the 100% correct TryTarget function. But it's damn slow. So won't come with 92.0 yet. Your visualization is great btw :D

Re: Attack area visualization widget

Posted: 25 Jan 2013, 08:24
by a1983
Thx, JK. Waiting for 92 version then :)

Re: Attack area visualization widget

Posted: 01 Feb 2013, 23:41
by el_matarife
Could you break it out into multiple threads? Seems like it should be able to be parallelized pretty easily since the results of each calculation don't depend on each other.

Re: Attack area visualization widget

Posted: 01 Feb 2013, 23:55
by jK
Who uses OMP more and more across the whole engine? ;)

Also mt'ing just gives a n-speedup, but the code is like ~100x too slow to be usable, so you need more than threading ;)

Re: Attack area visualization widget

Posted: 29 Jun 2013, 15:41
by jseah
I made a similar widget, mine only works on 94.0+ though

http://www.mediafire.com/?6b2r5rxfu5brhw5

Similar work using new 94.0 TryTarget functions. Was not aware of this when I made it.

Pics:
http://i253.photobucket.com/albums/hh47 ... n00006.png

Re: Attack area visualization widget

Posted: 29 Jun 2013, 18:43
by PepeAmpere
jseah wrote:ONLY WORKS ON SPRING 94.0+
Maybe you should specify, that YOUR widget works only with spring 94+, not a1983's work. Otherwise it can cause missunderstanding 8)

Re: Attack area visualization widget

Posted: 03 Jul 2013, 04:07
by jseah
PepeAmpere wrote:
jseah wrote:ONLY WORKS ON SPRING 94.0+
Maybe you should specify, that YOUR widget works only with spring 94+, not a1983's work. Otherwise it can cause missunderstanding 8)
Agreed, I have edited my post.