Grid Pathfinding

Post your Construct-made creations!

Post » Sun Oct 25, 2009 12:31 pm

This is a simple grid pathfinding system.

Grid pathfinding


The controls are:
Left click mouse botten to set a goal.
Double left click to path find.
Right click to clear.
B
21
S
4
G
4
Posts: 280
Reputation: 2,934

Post » Tue Oct 27, 2009 11:08 am

I notice that the .exe I posted the pathfinding was a little off.
I fix it and added a NPC sprite that is using the grid movement behavior to move along the path.
The controls are the same.

To here it is.

http://download938.mediafire.com/fygmnl ... vement.exe

and a pic.



And if any one is interested in knowing how it works.
I will post cap.
So leave a comment and let me know what you guys think of it.
B
21
S
4
G
4
Posts: 280
Reputation: 2,934

Post » Tue Oct 27, 2009 12:22 pm

I always wondered how one would be able to do this. :>
B
2
S
1
G
3
Posts: 118
Reputation: 1,336

Post » Tue Oct 27, 2009 9:38 pm

Looks interesting, now if you have a way to add multiple waypoints that would be nice.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Wed Oct 28, 2009 2:00 am

I was thinking about doing just that.
That might be easy to do.
I have some questions.
What would you it used for?
How many waypoint do you won't?
B
21
S
4
G
4
Posts: 280
Reputation: 2,934

Post » Wed Oct 28, 2009 8:01 am

It might work nice for a chess or similar type of game, perhaps even a top down tactics type.
As to the way points I would guess you would want that to be as many as needed. In other words the player would decide.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Thu Oct 29, 2009 6:07 pm

[quote="newt":at745zf8]It might work nice for a chess or similar type of game, perhaps even a top down tactics type.
As to the way points I would guess you would want that to be as many as needed. In other words the player would decide.[/quote:at745zf8]

Well, for a chess you don't even need to use pathfinder at all.
The grid movement behavior is all you need, the rest is just AI.
As for the top down tactics type game way point would be useless in the sense that the grid based ones are all turn based.
So on each of the NPC turn just reevaluate the goal based on conditions to change the path or keep the path the same.

At this point I don't see a reason to add way points.
But if I find a need for way points I will make it.
B
21
S
4
G
4
Posts: 280
Reputation: 2,934

Post » Thu Oct 29, 2009 7:06 pm

I'd be very interested in multi pathfinding, but what you have their seems quite good already, what I'm interested in is this:

I'm working on a kind of turn based story based game (with retro graphics, dos like) but I would like to have npcs move around as I like according to the events of the story, moving around obstacles ether by me directly creating the path or with a simple pathfinding gist so the npc finds its own way once through obstacles, multi pathfinding would not be essential for this example I'd assume?

ideas I would like to try at a later date:

- turnbased trading and/or sim game
- strategy game like master of orion, yes that sounds scary, just throwing it out
- the story thing above would probibly just be story, no puzzles and what not

I'm slightly new to constuct but have been learning/dabbling/experimenting for a couple months now, haven't hit the forums as of yet, till now : )
B
1
G
3
Posts: 6
Reputation: 837

Post » Thu Oct 29, 2009 10:42 pm

[quote:umr5tys9]At this point I don't see a reason to add way points.
But if I find a need for way points I will make it.[/quote:umr5tys9]
realeyes2 said it, obstacles.
Unless we're talking about two different things.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Thu Oct 29, 2009 11:01 pm

yea basic obstacles for say an npc to find their way around, unless this is already implemented
B
1
G
3
Posts: 6
Reputation: 837

Next

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 2 guests