Jump to content
  • entries
    13
  • comments
    55
  • views
    20809

Hamster and the drone factory

Sign in to follow this  
eppo

646 views

In the game, transportation of goods is handled by little drones you can build/purchase at factories located across the map. You don't control these directly, so it'll require some pathfinding to get them around.

Because the map is too large to cover with a (dense enough) regular grid, I generate a Poisson field with points packed with a minimal distance based on how close they lie to the underlying scene geometry, with points more densely distributed near the terrain surface.

Next, the 1D ordering of sample points gets optimized by sorting them along a Hilbert-like curve, like this:

Crv1.png

This for two reasons: it improves tree construction times, as nearby points are likely to result in similar graphs when passed through an A* search (while reusing the ordering of points from previous searches). Secondly, if points end up with comparable ordering in whatever lookup table they're referred to in, then these tables can easily be compressed RLE-style. This allows me to store and traverse all n[sup]2[/sup] flow fields describing the fastest route from every point to every other point in the graph.

Nodes (1).png

Here I've set the drones to follow the second camera through the flow field:

Bye!

Sign in to follow this  


2 Comments


Recommended Comments

Thanks. It's a platforming/parkouring game with light strategy elements.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!