Mar
5th
Map Gui Pathfinding

I admit I’m new to trying to write on a blog regularly, but seems like everyone says the trick is just to talk about anything you work on, so, onward with the overly verbose rambling of the gui work I’m doing…

Part of our UI design called for a world map, that lets the player click on locations to move to them, rather than just having static buttons in a grid on the screen.  As part of this, we needed a tank sprite to travel from location to location.

I didn’t want to have to come up with some sort of dynamic pathing system to find and follow paths on its own, since its just a gui afterall.  So to start with, I created a dozen or so short t2dPath segments, with a long list of variables telling it which paths make up the complete path from location A to location B.  This worked fine when you were going the correct direction, but then coming the other way, the path segments resulted in a back and forth movement as the tank traveled to the far end, followed the path back, then repeated with the next.  Trying to determine the right direction ended up getting complex, as the direction to take on the path segments could change from subpath to subpath.

So I deleted all those paths, and just put in a bunch of t2dSceneObjects (since they arn’t visible) along all the roads and changed my variables listing the subpaths to take, to listing the nodes to moveTo.  Few minutes changing variables and function calls in my previous script, and pathing now works smoothly between all the locations on the map.

To index into my route variables, I gave each location a value following the binary pattern (1, 2, 4, 8, etc) so any two locations added together give a unique number, letting me index in with something like $route[$theNest + $gooGoo]; and then theres a separate set of variables telling me which of the two nodes for each index is the starting point in the list, so I know when I have to go “backwards’ rather than forwards.  Theres a ton more variables doing it this way than I usually like to have, but it was the simplest way to set it up I could think of, and didn’t really take all that long to create everything by hand.

Not really an impressive screenshot since this is code rather than art (and the map Nauris drew is already in the gallery), but what the heck, rather not post without at least one image (I am primarily an artist afterall…)

mappathing
Mar
2nd
Welcome to the Wasteland

From what I’ve seen, its a requisite for all wordpress powered blogs to mention that the first post on the site is in fact, the first post. So…this is it, the first post.  Now, on to the game stuff.

5Tankerz is our upcoming sorta-rail shooter for iPhone, iPad, and PC (and any other platforms we decide to port it to eventually).  The world has ended in fire, but somehow it seems like everyone (except for a few mutants)  has found a tank, in various degrees of disrepair.

mockup1Tankerz is planned to follow an episodic update style, with frequent updates after the initial release.  When will that release be? Not sure just yet, but we hope for sooner rather than later.  To help us get in the habit of releasing stuff frequently, we’re going to aim for being quite open about progress on this game, and try to post pictures, game footage, etc as often as possible…or at least as often as we remember to anyway.

For now, we’ve gone ahead and uploaded some of the concept art and early game art to the Gallery so why not go check that out?  We hope to have the first video of the prototype build up soon, but theres still a few gremlins in the code we have to cage (never kill a gremlin, they can prove quite useful from time to time).