Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Tutorials
#1

Waypointing

Archive: 13 posts


After year Awesome Cat decides to make the next.... awesoem tutorial in HD! thanks for shining awesome power of Galaxyyyyy.... S II.

Some tutorial is soemthing requested from help thread, it's about waypointing system that can be expanded in many ways from board games, partroling system to complex AI systems. So here you go:


http://www.youtube.com/watch?v=ZuvGvxmYbjo&feature=youtu.be

http://www.youtube.com/watch?v=gzhEfhGuHPk

Since my new camera allows to throw videos faster i might back on making tutorials
2012-02-15 02:51:00

Author:
Shadowriver
Posts: 3991


sweet! This looks great!2012-02-15 07:30:00

Author:
Mr_Fusion
Posts: 1799


Awesome.. My solution was right Good job bro 2012-02-16 02:05:00

Author:
Wolffy123
Posts: 406


Brilliant Shadowriver!

Just to add I have now created some logic that follows a path of IDENTICAL tags, I will upload tutorial A.S.A.I.C, for now you can check the images of it on my lbdp.me page! (3 chips on the main board each one with the same 3 components but different ranges, chip1 near range, chip2 mid range, chip3 far range wire each chip in series from NOT gate to next chips On/Off, place high speed rocket rotator on main board, lay a path of identical tags and go!) again check my lbp.me until I have enough time to write this up properly!
2012-02-22 02:20:00

Author:
CloaknBlagger
Posts: 78


I look forward to it 2012-02-22 23:35:00

Author:
Shadowriver
Posts: 3991


Hi Shadow, it's been a while! I've been taking a long break from LBP but now I'm back

Anyway. I've been thinking about path-finding for a long while and I like how you've solved a finite path via waypoints. Very elegant! Something I've been trying to get my head round for a long while though is dynamic pathfinding, as in having no 1 set path to the destination and having an algorithm determine the shortest route, such a system would also take in environmental obstacles and be able to update dynamically if, for example, the destination was a moving target (e.g. the player in a top down scenario).

Everything I'm about to say is all completely theoretical by the way as I've not got as far as testing anything or actually getting into the specifics of the logic but I do believe its technically achievable.

The idea is to map out 'nodes' [tags] over the layout of the enviroment at key points of difficult manoeuvrability (corners e.t.c.)
have a tag/sensor combination on the player and any enemies, that both output and receive an analogue signal based on distance from target [closeness]. These signals interact with every node in range which are also constantly checking range from player and enemy with the intention of becoming 'active'.
The entire system would decide the minimum amount of active nodes it would take to connect each end of the chain with the rule that only the currently closest node to the enemy along the currently selected chain would qualify for becoming digital on, the rest would be carried out in analogue signal addition/subtraction.
The enemy follow logic would then head towards that node which upon reaching would trigger the next closest node to become active.

I can see that this can potentially be carried out with a few magnitude comparators, bit[/signal?] registry, subtraction and min/max() function, comparing the signal strengths of all nodes in a near vicinity to the player and any enemies, combining the strength of signal between the player and enemy and subtracting the strength from node [x] from the total, the node with the lowest signal would be the most direct absolute route from the player to the enemy. That node would then 'act' as the player/enemy and the algorithm would repeat from that position, both taking into consideration its distance from the player and the enemy and finding the closest node to itself with the lowest signal after the sum-check. This would be carried out by all nodes with a check being stored for how many steps [active nodes] it takes to reach a very close vicinity of the target, over all. then only the sequence of Nodes using the lowest number of steps would be selected as 'active', with the closest nodes to any enemies on the field being currently active.


So there's the theory, It's taken loosely from Dijkstra's path-finding algorithm and my major concern is clock speed, considering the sheer amount of clock ticks this would potentially take, it might end up too cumbersome to be of any use. Ideally it would update instantly in real time, would that be doable?

I might well be shooting the dark trying to make something like this in LBP to be honest, but it's been on my mind for a while and it's something i really feel, if cracked, would add a heap of realism to the current trend of top down style games in LBP.

How realistic do you reckon something like this could be? Shooting in the dark or worth a shot?
2012-02-25 20:45:00

Author:
Epicurean Dreamer
Posts: 224


Well as i said ;p that just a basis you can a lot of stuff with it 2012-02-26 02:53:00

Author:
Shadowriver
Posts: 3991


[ideas about optimal pathfinding]

I've actually built something along this line a long while back for a tower defense game I was working on. You could lay out your towers as you please and the enemy bots would find the optimal path to your base through the maze you create. So it's definitely possible and it works great. The biggest challenge I faced is thermo impact, but after some refinement I've got a grid of about 300 nodes for about 1/3 the total thermometer, and I as I recall that was with at least two path finding channels (to support critters with different goals). My implementation also allows for variable impedance terrain, which let me do things have my critters prefer to go get on roads if the traversal distance was great enough, or just trudge through the grass if their destination was close at hand. I can show you my design if you like sometime, and I'd love to see it get put to good use. In fact I'd be happy to help someone do it if they had a serious game in mind. I don't have a ton of time for LBP these days and when I do I'm working on a different project, but if there's some interest in this I might publish a demo/toolkit level. Send me a friend request if interested.
2012-03-11 00:50:00

Author:
LittleBigDave
Posts: 324


This is ideal for player dictated paths, but less so for AI driven paths. For the player, we can intuitively determine which path will actually work from a variety of potential directions, but if an AI were to come to a similar situation, it would need to check each direction and determine which will allow it to reach its goal. If you were to then add multiple AI's attempting to move around some world, you'd need a ridiculous amount of logic just to dictate where each AI wanted to go, and then moreso to get there.

For AI, I think the best option is to just give it some ability to react to situations. Eg: Hit a rock, need to get to other side of rock. Use a mover and a rotator to look away from the obstacle for a moment, move away, and then try again. It'll be silly, bouncing around everywhere, but can scale to any number of AI things.

Like shadow said though, it's all relative to the situation. For me, an rts. It'd be unrealistic to apply a waypoint driven pathfinding system to the AI, but for the player, its perfect.

Forgive me for the bump, but this is indeed a useful tutorial. Will probably adopt this system, since it does scale nicely with multiple waypoints.

(My post only applies to uses for pathfinding, shadow's system works perfectly when making a premade path, like shadow already represented)

Thanks for the tut shadow.
2012-07-24 19:03:00

Author:
SSTAGG1
Posts: 1136


For AI, I think the best option is to just give it some ability to react to situations. Eg: Hit a rock, need to get to other side of rock. Use a mover and a rotator to look away from the obstacle for a moment, move away, and then try again. It'll be silly, bouncing around everywhere, but can scale to any number of AI things.

Like shadow said though, it's all relative to the situation. For me, an rts. It'd be unrealistic to apply a waypoint driven pathfinding system to the AI, but for the player, its perfect

Hello
Couple months ago I was working in a RTS level and the IA I create for the unit movement was based on obstacle detection using a hologram over the unit that will detect collisions on any of 4(N,E,S,W) possible directions plus any combination of them
On my test it was not perfect but works. To determine objective location each unit had a compass device always pointing to final target...
I was so excited about this project, but then fatality come. my ps3 die on me and It take away all my levels...

So now I need to start all from scratch again. I may be create a tutorial...

Now talking about this thread topic "Waypointing" it's really nice indeed, I also tested and it's good...

I'm working in a new top down level "Tower Defense" like, and was thinking to use this, but then I ended using another way... that I called "Way follower" or "Track Follower"... talking about bots that only need to go from a pre-defined point "A" to Point "B", I was wondering if it's possible to do a "Follow the track" logic; well after a lot of experimentation I got it.

You make your track using holo in thin layer, then put a tag to this holo called "Track" and the logic I made will follow this track from the beginning until the end.

It has some caveat:

* the holo track must be 4 small block size, then you can draw it on what ever direction you want
* only 90 degree turn are allowed (but follow animation on it is really nice and you did not notice that is 90 degree)
* for now max speed I'm able to achieve is from 2 to 6 more than that follower just get out from track (a bug i'm trying to fix).

I may open a New thread for this. to show to people how I did it.

Regards.
2012-07-27 13:12:00

Author:
xquake
Posts: 73


Hah, I wasn't going to mention this until I published my level, but I just made something similar to what you describe for my upcoming rts.

It's an AI system that, when near obstacles, turns to avoid them, eventually moving around them to a location where it no longer collides on its way to the waypoint. Using shadow's 4-waypoint design, you can place down an unreasonably large number of waypoints, and the unit will follow them, avoiding any obstacles on the way.

So, it does actually work in pretty much any situation. It's clumsy, but so was the pathfinding in every early RTS.

The unit can be any size, move at any reasonably slow speed (0-10), turns until it no longer collides with the obstacle, can turn in both directions based on which side hits the obstacle, and does this for a decently low cost to the thermo.

It's all working nicely. Had 40 Zealots running in circles around a bunch of random obstacles. They also avoid each other, so the pathfinding reacts to units/structures as well.
2012-07-27 13:50:00

Author:
SSTAGG1
Posts: 1136


Hah, I wasn't going to mention this until I published my level, but I just made something similar to what you describe for my upcoming rts.

It's an AI system that, when near obstacles, turns to avoid them, eventually moving around them to a location where it no longer collides on its way to the waypoint. Using shadow's 4-waypoint design, you can place down an unreasonably large number of waypoints, and the unit will follow them, avoiding any obstacles on the way.

So, it does actually work in pretty much any situation. It's clumsy, but so was the pathfinding in every early RTS.

The unit can be any size, move at any reasonably slow speed (0-10), turns until it no longer collides with the obstacle, can turn in both directions based on which side hits the obstacle, and does this for a decently low cost to the thermo.

It's all working nicely. Had 40 Zealots running in circles around a bunch of random obstacles. They also avoid each other, so the pathfinding reacts to units/structures as well.

Yes I know what you mean. My approach also work well; I put over the unit a "Cage" a holo divided in 4 pieces; and below the unit a Compass a 4 tag pointing n,s,e,w with full range on each side to detect target and this will instruct the unit where to go... it was working fine (like you said) unit was bumping over all obstacle shape until it get through... I was so happy

But now I need to re-do all my project again. I was finishing it when my PS3 collapsed... I was working on the resources, that was last thing I was able to do...
2012-07-27 15:10:00

Author:
xquake
Posts: 73


Yahoo!!!

I have a versus game that I haven't been able to publish bcs I couldn't get the checkpoints to work. Your tutorial, a not gate and a player sensor should go a long way into fixing that problem.

Thanks!
2012-07-29 13:06:00

Author:
HeySK
Posts: 54


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.