I started to convert everything over to a floating point coordinate system, to get rid of this "two layer" thing I was doing, trying to keep DK as a sorta overlay of the Real World, 'cause DK uses nice solid integers for everything (its a grid with 500 rows and columns), and the Real World uses the ultra-hideous latitude and longitude coordinate system, where the city of Chicago is at Negative 86.something longitude (or you could say West insteada Negative) and positive 41.something (or North insteada Positive), and Russia is like, Positive Long and Positive Lat, and Brazil is Negative Long and Negative Lat, and Australia is Positive Long and Negative Lat.
So the Earth map is a Cartesian plane with good ole 0.0 sitting in the water off the west coast of Africa, and four positive-negative pairing quadrants, where north and east is positive, -180 West to 0 to 180 East, and 90 North to 0 to -90 South.
That seems nice and everything at first but then you get into some problems with game programming.
Like, it makes Bounding Box logic (for sql queries and stuff) really complicated and messy looking.
And you gotta do special cases for anything near the Zero and 180 East-West switchovers.
And conversions between different programming syntax things are a total headache even without that junk (I was using "lat" and "long" as variable names, y'know, nicknames for "latitude and longitude" until I was politely reminded by the Robot that "long" was a keyword for a couple of the older programming languages, y'know, the hard way ahaha), especially if you wanna make something that's gonna work internationally (which I've been doing my best to keep up on 'cause I got a lotta buddies from all over and that's one of the coolest things about this stupid game heh).
Oh man I got so much work ahead of me now.
I'm thinking about tricks I could do to make the whole thing easier.
Like, not using floating point, or using "fake" floating point numbers that are really integers, and then converting 'em to something that looks like floating point my own way, so that I can always be sure they'll look right and match up.
And getting rid of the positive and negative junk with the map, in the background of the game where I mess with stuff, by adding 90 to north-south stuff, and 180 to east-west stuff, and then just switching it back when I display it to users.
But then there's still the problem of the Zero lines and the brand new 360 degree overlap thingie I woulda made heh.
And the DK code ain't helping, the way it checks to see if you are in a town is by checking to see if your characters latitude and longitude is equal to the latitude and longitude of the town, and that's a no-no with floating point numbers, even if you were doing something simple, which I'm not heh.
So I started to redo all that by making a "bounding box" around the towns, so I could do a "greater than less than" type of thing, instead of an "is equal to," and that's how I got into thinking about all this messy map stuff.
And now I'm just trying to think of whether I wanna switch to a totally different trick or just keep trying to make the floating point stuff work.
I like the floating point stuff, I don't really wanna have to play around with that, and the resolution of the google map shit is crazy awesome, like no map that's ever been used for a game, y'know, its the Game Map of the Gods, man, and the floating point shit actually works really good for that, 'cause it adapts to it.
Plus I gotta do a lot of trig and I don't even wanna think about inventing my own mathematical framework thingie so that I could do all that with integers.
If I could just keep the "floaters" in line it'd be great heh.