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

Top down Hologram Track

Archive: 5 posts


Hi everyone,

So after a while of nothing I've come back to work on my level and all the while have had some new ideas. In my level, there is a top down driving sequence through a city (with levitating vehicles). You operate the car in every way, and you have to obey rules like in real live to not "get into an accident". Anyways, I've always had trouble creating the AI drivers like you see in GTA games because of the thermo.

I've tried recorded sackbots which works, but it takes up a lot of thermo because of the amount of cars. I want to make a sackbotless car that follows a hologram track. Is there any way to do this? I'm kind of stuck making it.

Thanks, i would appreciate any advice!
2011-09-25 15:23:00

Author:
kuppokid
Posts: 79


I would ask Oslter5000 (http://www.lbpcentral.com/forums/member.php?8696-Ostler5000) since he's in the middle of a racer that uses about 20+ AI (https://lbpcentral.lbp-hub.com/index.php?t=61792-Velox-Nation-(Trial-testers-and-Audio-needed)). I for one have NEVER figured it out sadly... :/ I suck at all AI.2011-09-25 15:33:00

Author:
Speedynutty68
Posts: 1614


I just replied to your PM, but perhaps it would be easier, and more convenient to discuss it in this thread instead.

Like I said in the PM, is it a proper race-track, or free-roaming vehicles? Your mention of GTA makes me think it could be the latter. It doesn't matter either way, I should still be able to help, but it'd require just a little screwing about on my part first.


The way Velox Nation AI works, (For the sake of anyone curious enough to read this) is much like a scalextric.
Each Vehicle comes with it's standard Microchip where all it's speed and cornering logic and whatever else it needs is located. The vehicle should have no turning-logic, other than to do things like avoid other vehicles in close proximity, the rest of the time, it should be using a Look-At Rotator to face towards a waypoint. It also has a piece of hologram with a Microchip on it, which is not attached to the vehicle itself, containing the waypoint logic, which I'll come back to in the next paragraph.

The track has a number of labelled tags running around the path the vehicle needs to take. I use 3 separate Tags for breadcrumbs. Let's call these 'TrackWP1' 'TrackWP2' and 'TrackWP3'.
Each vehicle has it's own unique Waypoint mounted on a piece of hologram. When the vehicle is close to it's designated Waypoint, the holograms movers navigate the track. A Follower Mover heads to TrackWP1. Once the Holo reaches TrackWP 1, a Tag activates a Selector, which activates a new Mover heading to TrackWP2. Then WP3 and back to WP1. This way your vehicles Waypoint always navigates to the nearest Track Waypoint in sequence.

To clarify, this means you have 2 sets of Waypoints - Track Waypoints which are arranged in sequence, and a unique vehicle waypoint for each vehicle to follow.

For separate lanes, which gives the AI an appearance of having a unique racing line for each vehicle, as opposed to them all getting right behind each other, you would place a couple of Vehicle Waypoints on a wide strip of Hologram, and toggle or randomise the activate waypoint Tag.

So, to recap all your waypoints -
3 Track Waypoints arranged in a loop around your track. You can have more if you feel it would help, but 3 is the minimum.
1 or more Vehicle Waypoints for each vehicle to follow. These are mounted on a piece of non-collide material and they move from TrackWP to TrackWP.

The Waypoint moves along the trail as the respective vehicle approaches, and stops if it gets too far ahead, or speeds up if the vehicle is actually managing to overtake it. The distance you need your waypoint to be from your vehicle will vary greatly on your games speed, cornering and all manner of other things, so you'll need to play around and find that sweet spot first.

There are 2 ways to set up how your Waypoint actually follows the Tag trail.
The first is, have the Waypoint use a Basic Mover heading forward, and a Look-At Rotator to keep the Waypoint navigating the road. (The reason you have a separate Waypoint navigating the track, as opposed to just making the vehicle follow the trail itself, is because Vehicles are solid objects, effected by outside objects. The Waypoint on the other hand, can navigate the trail perfectly without interuption. An example is that solid vehicles can be spun around by outside objects, but they're too dense to realise this, and will go backwards around the track.)
The second way to do it, is to use several Follower Movers, as I covered before. Let's say, 4. Each Follower should take turns to be on, based on which Tag is next in line. So, Follower1 goes to Tag1. Have Tag Sensors wired into a Selector and have the Selectors 4 outputs wired into each Follower. When the Waypoint reaches Tag1, Follower2 is active. When it reaches Tag2, Follower3 is active. So on and so forth. When it reaches Tag4, Follower1 has another turn.
The first option is much faster to set up, and slightly easier to adjust your tracks trail, but the latter allows you far more control in how tight your corners can be or how complex the bends can get, at the cost of it being much more painful to set up.
It's your preferance, really, but I recommend the latter.



Oh, and Speedy, thanks for that - this is sort of sweet actually. D'awww. Nobody ever seems to ask for my help specifically.



EDIT - (09/01/2013)
Made several remediations to this post based on a new Velox Nation I'm putting together.
2011-09-25 18:57:00

Author:
Ostler5000
Posts: 1017


If I don't know how to do it, then I refer people to the 'most-qualified' person that I know would help. You are very 'qualified' to help here because of Velox.2011-09-25 20:46:00

Author:
Speedynutty68
Posts: 1614


Thanks for helping out! I appreciate it.
About the type of track- It would be an urban setting however I've had to really downgrade the amount of streets because of thermo (the buildings take up a lot) so right now there is a road that diagonally meets a larger road at it's very tip (like a triangle minus the third side). At the end of that larger road is another road and from there it turns into a highway where vehicles have to merge onto it (from other non-accessible roads). That's basically it. Oh and the lanes really only have room for two vehicles going in opposite directions

Thanks for that summary, and I'll see if I can implement some of your techniques.
2011-09-26 12:53:00

Author:
kuppokid
Posts: 79


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.