[Behavior] Grid based sight

Post your completed addons to share with the community

Post » Mon Sep 26, 2011 9:58 pm

A new version of my grid based sight. Now intergrates a-star pathfinding (broken). (Updated 21 March 2012.)

Edit (21/04/2012): Please note that Astar in this is broken so go to here for my Github repo with a much faster version. I'm currently updating the Grid based sight so expect a new version in the repo linked above.

Rogue (r2.1)

EXAMPLE HERE!

(21/03/2012) Updated. Now the action which creates the cells has an opacity range between 0 and 1. Default is 1. This controls how much opacity is used e.g. setting as 1 is 0-100 opacity drop off. Setting as 0.3 would be 0-30 opacity drop off. Experiment and hopefully it will make sense. The behavior uses inverse square to calculate the opacity using this action to create cells. For more control or to use your own equation use the crossed out code. No more black/white tiles either.

There's an example project in the zip file.

Edit2 (Quite old now): Here is the original thread I started with some examples.00Rez2012-04-21 10:40:11
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Mon Sep 26, 2011 11:57 pm

Been eyeing your examples, and getting more and more excited. Thanks for releasing this into the wild! :D
B
32
S
3
G
2
Posts: 57
Reputation: 3,692

Post » Tue Sep 27, 2011 12:01 am

[QUOTE=flynsk] Been eyeing your examples, and getting more and more excited. Thanks for releasing this into the wild! :D[/QUOTE]

Thanks! If you see any problems or have any ideas for further actions/conditions/expressions let me know!
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Tue Sep 27, 2011 12:16 am

Thanks 00Rez for your work on this. I'll let you know how using it goes.
B
31
S
6
G
7
Posts: 140
Reputation: 5,983

Post » Thu Oct 06, 2011 10:52 am

Just realized when using the "for each cell" actions and then checking each of these cells using the check cell condition you MUST use the expressions which have "Cur" at the start to get the correct coordinates. If you look at the example it shows the expressions to use. I think this might confuse people to how it works because it actually confused me at one point!

Anyway, I'm currently in the process of incorporating pathfinding into this plugin! Demo soon. The pathfinding keeps track of the position in a path to which you can access the current, previous or next position and also move to the previous or next position. This seems to make showing/keeping track of the movement easier.

Currently I'm having issues with enemies overlapping each other, if anyone has any ideas to stop this I'd be very welcome to hear them!

- Rez00Rez2011-10-06 19:36:17
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Fri Oct 07, 2011 7:28 am

Thank you! This looks AWESOME! Will be very helpful in creating nice games =)))
B
17
S
4
G
4
Posts: 94
Reputation: 3,058

Post » Fri Oct 07, 2011 11:28 am

[QUOTE=Spades] Thank you! This looks AWESOME! Will be very helpful in creating nice games =)))[/QUOTE]

Thanks! Looking forward to a dedicated section for plugins/behaviors, not good in here because it falls behind and no one sees it...
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Fri Oct 07, 2011 12:59 pm

it's working super fine here...tnx Rez for this awesome behavior ^^
B
159
S
38
G
11
Posts: 229
Reputation: 17,361

Post » Fri Oct 07, 2011 6:40 pm

Rez, that is really cool. I haven't played with it yet, so this may be obvious, but can the LightCell be any shape and color, or does it need to be a black square.

Also, please develop a game using DrunkGuy. I would play that game! :D

Seeing all of these new behaviors is really giving me the itch to start making my own plug-ins. I do know some JavaScript, although it's mostly been for one-off admin tasks at work. Did you find it easy to figure out?
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608

Post » Fri Oct 07, 2011 6:46 pm

I know the question is aimed at Rez, but I was a bit in the same situation. I didn't know much about JS (but I knew other languages: VB, notions of C/C++, PHP, Lua/python) and found JS quite straight forward to get into.

Especially in the goal of plugin developpement for C2, Ashley made an awesome SDK with links to JS guides and references and from there it was almost like "follow the guide".

In the end, I found it pretty easy and fun to developp plugin or behavior for C2 even if sometimes you will encounter your fair share of headaches, but that's what dev is about in my experience Kyatric2011-10-07 18:46:54
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest