Point'n'click adventure pathfinding

Get help using Construct 2

Post » Tue Sep 15, 2015 3:22 pm

Hi everybody,

I'm developing a small graphic adventure and I got most of the base "engine" created. But I have a problem driving the character where I want without getting him stuck somewhere.

I tried to use the regular pathfinder but it's slow calculating. Do you know an alternative path finder that works with this kind of game?

Thank you! =)
B
5
S
1
Posts: 34
Reputation: 512

Post » Tue Sep 15, 2015 4:25 pm

A node based system is probably what would work well like this, https://www.scirra.com/store/royalty-free-game-templates/nodepath-90.

The available paths are hidden from sight, and the nodes are placed at points of interest on the screen, then when the player clicks the mouse the man moves to the closest node along the path.

There maybe a similar example kicking around the forums, maybe by R0J0hound.
B
43
S
23
G
21
Posts: 735
Reputation: 12,132

Post » Tue Sep 15, 2015 4:32 pm

You may attempt to make the astar algorithm directly with events. I have made a few you can find. If you use connected nodes instead of a rectangular grid you can reduce the number of positions needed to compute through thus making it faster.

You could also look at this:
quadralant-path-finding-optimization-solved_p632343?#p632343
Basically you put down a bunch of sprites that you setup before hand with the directions to the next cell to get to any other cell. So all the paths are manually inputted before hand so the pathfinding takes no time at all. The only drawback is you'll want to keep the number of cells as low as possible to keep the amount of setup time down.
B
94
S
33
G
117
Posts: 5,392
Reputation: 75,345

Post » Tue Sep 15, 2015 5:01 pm

You might want to take a look at this plugin I made.

behavior-easystar-js-pathfinding-for-tilemap_t129056

An invisible tilemap with small enough tiles could probably work for a point'and'click game.
B
75
S
31
G
27
Posts: 1,014
Reputation: 20,763

Post » Wed Sep 23, 2015 3:45 pm

Thank you all, and sorry for answer this late. I'll check everything out as soon as I can and let you know if they were good for my project =) Thanks again.
B
5
S
1
Posts: 34
Reputation: 512

Post » Fri Feb 05, 2016 7:39 am

If anyone fancies building a complete working template that includes dynamic z-positioning, inventory, dialogue system and path finding walk areas, Id buy in a heartbeat. In fact, a plugin to go with this would be best, options for "talk to [chaaracter], pick up [object], which would sequence smaller events like walking to objects destroying them/adding to the inventory managed by plugin and walking to characters and starting the dialogue system, which could also be done via plugin.

I'd pay quite a bit for a plugin/template combo like that.
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests