[Plugins/Behaviors] Rez Repo

Post your completed addons to share with the community

Post » Mon Aug 20, 2012 12:27 am

@rexrainbow, great examples and will be referring to them as I work out some example demos, thanks.

[QUOTE=rexrainbow] @alspal

I had made another plugin to get path in tile game like this.
- click any purpole tile, then you will get path in yellow tiles.

Capx
dependence
slg movement
instance group
board
hexTx[/QUOTE]
B
28
S
4
G
3
Posts: 70
Reputation: 4,879

Post » Tue Aug 21, 2012 2:20 pm

[QUOTE=dEspadas] Hi, first of all, great plugins! Unfortunately I'm running into some problems.
I'm not sure if I'm doing something wrong, but I created a simple logic for a moving NPC using Astar and Pathfinder plugins, it works, but as the "simulation" goes the NPC starts to "cut corners", moving inside the collision sprite. I've tried to increase the resolution of the cell size, but it keeps going inside as time passes.
I've attached a simplified capx to make my point clear, you can see that as simulation goes, the block starts to ignore the corners more and more, but not all corners. Any ideas?

My NPC astar test[/QUOTE]

Sorry been very busy lately, new job, family, work, courses, etc. When I get chance I'll look into this.
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Tue Aug 21, 2012 7:00 pm

[QUOTE=00Rez]Sorry been very busy lately, new job, family, work, courses, etc. When I get chance I'll look into this.[/QUOTE]

Hi @00Rez, no problem at all, I imagined that you might have been busy! I myself had been busy the last couple of days and I did not push my project far, so there were no reason for me to try to hurry you.

I've tested the project a little, and it seems that it is something related to "diagonals", not sure if it is of any help. If I choose "no diagonals", it behaviors as expected, never entering any of the blocked paths. Unfortunately, the "no diagonals" path tends to form very long, and ugly, stair-shaped paths on many situations, so I was avoiding it.
I am also using "moveto" behavior, might have hit some corner case with the use of both together, I dunno.

Anyway, thanks for you attention!
B
16
S
7
G
4
Posts: 29
Reputation: 4,957

Post » Tue Aug 21, 2012 8:52 pm

[QUOTE=dEspadas] [QUOTE=00Rez]Sorry been very busy lately, new job, family, work, courses, etc. When I get chance I'll look into this.[/QUOTE]

Hi @00Rez, no problem at all, I imagined that you might have been busy! I myself had been busy the last couple of days and I did not push my project far, so there were no reason for me to try to hurry you.

I've tested the project a little, and it seems that it is something related to "diagonals", not sure if it is of any help. If I choose "no diagonals", it behaviors as expected, never entering any of the blocked paths. Unfortunately, the "no diagonals" path tends to form very long, and ugly, stair-shaped paths on many situations, so I was avoiding it.
I am also using "moveto" behavior, might have hit some corner case with the use of both together, I dunno.

Anyway, thanks for you attention![/QUOTE]

Make the blockers invisible then use a smaller object which is visible as the perceived blocker. The player will only see the smaller objects so it will look OK to the player. This is quick fix. I'll look into it.
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Thu Aug 23, 2012 11:41 am

New version (0.24, see first post) of the pathfinder and astar plugins. Object blocking now works correctly. New expressions: GetBlockAt and GetCostAt - useful for debugging or whatever. New example showing these new features and fixes.

Methods can be used to provide almost real time path finding with blocker movement (see new example).

Check it out! And as always let me know of any bugs and issues.

Thanks.00Rez2012-08-23 11:41:32
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Sat Aug 25, 2012 7:49 pm

Thank you, Rez, it seems like it's all working as expected now!
I've done some tests here and the overlapping now happens on a predictable way, so I can adjust my blockers and art to it. Your suggestion of using the blocker bigger than the art was already my approach, but it was not working since the path's behavior was kind of unpredictable.
Even a minor misalignment between the path's end and the object seems solved now, that's nice! I did not bring it up since for my project it was just some minor issue, not so important.

I'll be back to my project in the next week, so will let you know if any problem arises. Thank you very much for the ace work!

PS: I really liked the new example and possibilities, will think about them when doing my project.
B
16
S
7
G
4
Posts: 29
Reputation: 4,957

Post » Sun Aug 26, 2012 11:15 am

[QUOTE=dEspadas] Thank you, Rez, it seems like it's all working as expected now!
I've done some tests here and the overlapping now happens on a predictable way, so I can adjust my blockers and art to it. Your suggestion of using the blocker bigger than the art was already my approach, but it was not working since the path's behavior was kind of unpredictable.
Even a minor misalignment between the path's end and the object seems solved now, that's nice! I did not bring it up since for my project it was just some minor issue, not so important.

I'll be back to my project in the next week, so will let you know if any problem arises. Thank you very much for the ace work!

PS: I really liked the new example and possibilities, will think about them when doing my project.[/QUOTE]

Thanks! The new GetBlockAt would help to create a push out at solid type behavior for real time movement.
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Fri Aug 31, 2012 12:47 am

Hey there! So I'm having an issue with the Pathfinder behavior. I have it set up for some NPCs to follow the player around after some interaction. There's a checkpoint system in place, and when the player dies the game recreates the positions of all the NPCs and inventory, etc...

However, after dying and having the stage restart, when the NPCs try to set their path to the player, the game gives this error:

Javascript error!
Uncaught TypeError: Cannot read property 'ts' of null
http://localhost:50000/RezPathfinder_behavior.js, line 141


and a little bit about it being a bug in Construct 2 or a problem with the plugin.

This occurred in both the latest and previous releases of your behavior.TL222012-08-31 00:48:19
B
58
S
20
G
7
Posts: 305
Reputation: 8,804

Post » Fri Aug 31, 2012 10:20 am

[QUOTE=TL22] Hey there! So I'm having an issue with the Pathfinder behavior. I have it set up for some NPCs to follow the player around after some interaction. There's a checkpoint system in place, and when the player dies the game recreates the positions of all the NPCs and inventory, etc...

However, after dying and having the stage restart, when the NPCs try to set their path to the player, the game gives this error:

Javascript error!
Uncaught TypeError: Cannot read property 'ts' of null
http://localhost:50000/RezPathfinder_behavior.js, line 141


and a little bit about it being a bug in Construct 2 or a problem with the plugin.

This occurred in both the latest and previous releases of your behavior.[/QUOTE]

I'm working on fixing this issue or at least making it clearer what is occurring. The problem is when you create a new object it loses its association with the "astar" plugin so you need to do that again. If this doesn't make sense then I can upload an example for you.
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Fri Aug 31, 2012 6:40 pm

Hmm, that makes a lot of sense actually. One could say too much sense.

Hope you get it figured out soon! It's a brilliant plugin. Many props to you!
B
58
S
20
G
7
Posts: 305
Reputation: 8,804

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: Axiomaltd and 2 guests