lundi 1 février 2016

Pico Sprint

My second Pico-8 game is a tribute to Super Sprint...
You can play it here.
Enjoy!

vendredi 6 novembre 2015

Succer

I made a Pico-8 game! It's a soccer game inspired by Kick-Off and Sensible Soccer...
You can play it here or here.
Enjoy!

vendredi 5 juin 2015

Pathfinding optimization

Just a quick note to say I've implemented Jump Point Search as an optimization to the A* algorithm.
I've searched into such an optimization as I was finding my path-finding code was quite slow (it could take up to one second in certain cases!)
I must say I'm quite happy with the results as the searches are now one or two orders of magnitude faster! JPS is very well suited to the big empty zones (for now!) that my continents are made of.
The best resource I've found to help me in this task was the comprehensive step by step guide here.

Finally, I've deported the path finding code onto another thread using a job system that I may talk about later :-)




lundi 25 novembre 2013

Pathfinding!


I implemented some kind of hierarchical path finding...

Hierarchical because as the planet is in fact a curved cube, each face of the cube has its own grid. So to move from one face to another there need to be a high level graph telling if a point on a given face can reach another point on another face (or on the same one!)

Constructing this high level graph need only be done when the terrain is modified and can be done partially to only reconstruct the parts that changed.

So the first step is what I call: Island detection. It consists in finding for each face the walkable tiles and regroup them in separate sets. Each set containing all the tiles of an island. (I know I might not be the clearest here. :-)) This is done by a simple fill algorithm.

Next step is : Neighbor islands linking!
It consists in creating links between islands that are connected but from different faces of the cube. (Two islands connected on the same face is not possible : they are ONE island.) It's easily done by querying neighbour faces for islands that touch on or more borders of the face. It allows to construct an important data for the pathfinding to come : links between islands and their intersection!

Here we can see what I call "Islands" and how several islands are connected between the planet's faces.

With this information available we are now able to generate a path linking several faces. First we find the start and end islands. With the island graph, we do a brute force search for the end island starting from the start island. We're looking for the smallest path linking the two islands in term of the number of faces traversed. This could be unoptimal as a path traversing three faces could be shorter than one traversing only two faces. But for now, I live with it and maybe I'll look for a better solution if problems arise (Murphy tells me they'll do and certainly at the worst possible time).

Then, we launch several consecutive path searches: First from the start position to the intersection zone with the next island on the next face. Then from the insertion point to the intersection zone with the next island on the next face. Rinse and repeat until we reach the last island where we can search from the insertion point to the end position.


First pathfinding test from green dot to red dot... or maybe from red dot to green,  can't remember :-)

Fun bug! Not exactly the shortest path...

Coming next : Path following!

samedi 23 décembre 2006

Screenshots... again


By that time (circa 2007) I used AntTweakBar as a minimal interface.
(I even contributed a small feature to the lib!)





1st screenshots



vendredi 22 décembre 2006

Planet

Planet project...

A tube:



Some screenshots: