Parallel 42

The Skypark - Vehicles and persistent objects

The Skypark - Vehicles and persistent objects
Vehicles and persistent objects

Finding the nodes

We started by looking at the airport layout and breaking it into nodes and connections. To validate our code, we decided to create objects directly in the sim that represent each taxiway nodes at the airport. These will be used to guide the vehicles to the desired location.

Finding the shortest path

We looked into multiple algorithms to find the shortest path between a given parking location at the airport and the aircraft’s current location. This is an awesome test that will enable us to create and test scenarios that covers any possibilities we might come up with in the future.

Breaking things

From that point on, we started looking into how we can a vehicle drive along that route. After a few days playing with different methods, we found the right one for the task. Obviously, we have seen lots of weird things happen… This gif is a great example of that.

A smooth ride

Finally, after many many hours playing with the algorithm, we finally managed to get a smooth ride our of our default car! We are still testing edge cases to make sure the care doesn’t reach mach 2 on the way to your aircraft!

Persistent Objects

There is no way we’re going to place thousands of object into the world manually so we had to build a tool. This tool has become what we are going to use internally to create adventures on The Skypark.

It enables us to create objects in bulk using nodes and segments to make our scenes easy to create and maintain.

Lot of planning went into this tool to make it as flexible and capable as possible to be able to create the most insane missions and events imaginable.

Making it to the sim

From that tool, we inject the generated objects into the sim. Here we can see lines of cones, trucks and hundreds of boxes stacked on top of eachother. The direct connection between our tools and the sim enables us to move objects on the fly and create the scene in a visual context.

The world is never perfect

The world we live in is never perfect. You can try to position object inline with one another, it won’t ever be perfect. That’s why, when we make a line of objects, we can input some randomization in their position/rotation. That way, you don’t end up with fences, boxes, trees and cars that look like they were aligned by a machine.

Because we can

In Prepar3D, each object we drop has its own physics. This got us wondering how far we could push this thing…

With 200kt winds, pretty far it turns out!

Best Regards,

Keven Ménard
Creative Director //42

Reading next

The Skypark - Persistence and Purpose
Area 51 Raid - They Can’t Stop Us In Sim!