Wednesday, September 21, 2011

Cartographer Update!

Just a minor update to let ya'll know I'm still alive.

I am having hell getting the hexes to work right.  My math skills suck, and I couldn't figure out a formula for getting all hexes within a specified range, and hard coded 0, 1, 2, and 3 hex radius.  This means you can create a hex grid of as little as 10 LY, or as much as 30 LY, but nothing else.  I also broke the square/offset square grids, well, deleted the code actually.  I'll re-add them once I get the hex stuff working, those 2 methods are far easier.

I do kind of have the hex stuff working though, here is a map, with 10 LY hexes, drawn dynamically (so changing ownership of a system changes that hex background color as well).  There are a few orphaned worlds around, and a few gaps where no system is within a jump.  The grey hexes are "contested", meaning 2 or more factions have a system within that hex.  I plan on making the hexes break down into smaller chunks until there is only 1 faction per hex, but its not real easy, and I'm tired :(

If anybody can help me out with a hex algorithm that'd be awesome.  Simple stuff, like take a battletech mapsheet, pick a hex, and give me a formula to determine all the hexes within a specified radius.  I don't think its that hard, but it was eluding me tonight.

I still have a *lot* of very minor bug fixes (like the app crashes when you cancel an inputbox, instead of cancelling the function, stupid easy to fix stuff) before I get this sucker launched, but it is chugging along.

A new screenshot showing the hex based influence mapping thingy:

Here is a big version, though it'll be slow off my crappy TW cable modem.  The dots on it are little black circles around the systems so I could see them while testing.  You'll be able to toggle them on/off in the release.  The black gaps are just that, areas where no system is within a jump.  However, there are uninhabited systems everywhere, 110000 of them, so you'll be able to find *some* path through there!

Oh, my algorithm for determining jump paths seems pretty decent, but its just looking for the nearest systems.  If anybody could help me out with a hex based A* that'd be great too.

I want to try to get printing to PDFs done really soon, I want to print this map out on a 44" plotter ;)

No comments:

Post a Comment