[Behavior] Grid based sight

Forum Home Forum Home > Construct 2 Development > Plugins for Construct 2
 Post Reply Post Reply Page  <1 23456>
Author
2,480 Rep
Post Options Post Options   Quote 00Rez Quote  Post ReplyReply Direct Link To This Post Posted: 18 Oct 2011 at 4:28pm
@bowiz2

100 - round(min((distance(Sun.X, Sun.Y, Sun.Sight.CurPixelX, Sun.Sight.CurPixelY))/(Sun.Sight.Radius * Sun.Sight.Tilesize),1) * 100)

This above should work set the LightCell effect to "Destination out."

Finally, the drop off effect as I've mentioned (the core bit you talk about) is some elaborate maths which at the moment I can't think of, try Google!
Back to Top
804 Rep
Post Options Post Options   Quote ViLe Quote  Post ReplyReply Direct Link To This Post Posted: 21 Oct 2011 at 11:36am
Hi Rez - I really like what you have done so far and I question whether this can be done even more efficiently without the use of sprites - I wonder if drawing vectors with canvas to create the effect would be better in the end.

something I looked up

I don't know if you'll continue to work on this plugin or not - I just wanted to share that link to see if the second example was possible
Back to Top
2,480 Rep
Post Options Post Options   Quote 00Rez Quote  Post ReplyReply Direct Link To This Post Posted: 21 Oct 2011 at 12:29pm
Originally posted by ViLe ViLe wrote:

Hi Rez - I really like what you have done so far and I question whether this can be done even more efficiently without the use of sprites - I wonder if drawing vectors with canvas to create the effect would be better in the end.

something I looked up

I don't know if you'll continue to work on this plugin or not - I just wanted to share that link to see if the second example was possible


I understand there are vector functions for plugins however I noticed Ashley mention about slow down using to many of these. I wanted to leave the rendering to the designer rather than my plugin as this can be used for many different things.

If I come across a good method I would add it to the plugin believe you me!

I'll have a look at your reference. Thanks Vile!
Back to Top
629 Rep
Post Options Post Options   Quote Beurt Quote  Post ReplyReply Direct Link To This Post Posted: 18 Feb 2012 at 9:29am
Hi,

I just tried to download your behavior, but it appears that the link is no more available? Is there a place where can we find it?

Thank you for sharing your work!
Back to Top
2,480 Rep
Post Options Post Options   Quote 00Rez Quote  Post ReplyReply Direct Link To This Post Posted: 21 Feb 2012 at 2:26pm
@Beurt

Sorry for the delay Beurt.

Seems I may have deleted the original files will sort this out tonight for you.

I'm currently working on a much, hopefully, simpler cleaned up version which also includes path finding. The behaviors new name will be "Rogue" as it incorporates two functions relating to roguelikes; path finding and grid based sight! One thing I don't like with my current release is it's usability and accessibility which will hopefully be much better in this next release.

Speed wise not much difference although rendering is better in the new releases of Construct 2 anyways.

Watch this space, once I've ironed out the bugs a new version will be uploaded!

P.S. Two things eluding me at the moment, a way to have smooth timed movement and shadow rendering from the runtime...
Back to Top
2,480 Rep
Post Options Post Options   Quote 00Rez Quote  Post ReplyReply Direct Link To This Post Posted: 22 Feb 2012 at 9:44am
Originally posted by 00Rez 00Rez wrote:

@Beurt

Sorry for the delay Beurt.

Seems I may have deleted the original files will sort this out tonight for you.

I'm currently working on a much, hopefully, simpler cleaned up version which also includes path finding. The behaviors new name will be "Rogue" as it incorporates two functions relating to roguelikes; path finding and grid based sight! One thing I don't like with my current release is it's usability and accessibility which will hopefully be much better in this next release.

Speed wise not much difference although rendering is better in the new releases of Construct 2 anyways.

Watch this space, once I've ironed out the bugs a new version will be uploaded!

P.S. Two things eluding me at the moment, a way to have smooth timed movement and shadow rendering from the runtime...


The link *should* work now.
Back to Top
435 Rep
Post Options Post Options   Quote seven Quote  Post ReplyReply Direct Link To This Post Posted: 12 Mar 2012 at 9:36pm
@new plugin: I look forward to it.

In the meantime, though, could you upload an example project using this plugin? The download doesn't come with one, and I can't figure out how light cells work. :c
Back to Top
629 Rep
Post Options Post Options   Quote Beurt Quote  Post ReplyReply Direct Link To This Post Posted: 18 Mar 2012 at 4:08pm
@ 00Rez

The link is working perfectly now: thanks !

I'm eager to test your new plugin :-)
Back to Top
2,480 Rep
Post Options Post Options   Quote 00Rez Quote  Post ReplyReply Direct Link To This Post Posted: 19 Mar 2012 at 10:36pm
@seven
@Beurt

New version uploaded still alpha let me know what you think and if any problems occur...

Rez
Back to Top
2,480 Rep
Post Options Post Options   Quote 00Rez Quote  Post ReplyReply Direct Link To This Post Posted: 21 Mar 2012 at 2:43pm
Originally posted by 00Rez 00Rez wrote:

@seven
@Beurt

New version uploaded still alpha let me know what you think and if any problems occur...

Rez


Updated today see first post.
Back to Top
 Post Reply Post Reply Page  <1 23456>

Forum Jump Forum Permissions View Drop Down