ID:154144
 
I'm developing (or just starting to develop) a game that takes place on a 96x48 isometric map.

 <><><><><><><>
<><><><><><><><>
<><><><><><><>
<><><><><><><><>
<><><><><><><>
- is basically what you'll see.

Now the problem is that some of the objects I place on the map go above their square, and I need to make sure that the layer of the object below is always higher than the layer of the object above. Anyone have a quick mathmatical solution that'll get me positive numbers for the layer, but numbers that will get higher the lower the Y coord gets?

Basically, I need a simple solution for this but it eludes me. Thanks for the help.
Tried something like a mouse picker or mouse over?

LJR
[link]
If you need more clarification, let me know.
In response to Shadowdarke
That's not quite how this game works. It doesn't require any kind of movement, it's basically a simcity class game where you just build stuff. But, I don't want buildings in front to be behind buildings in back, so I need to adjust their layer according to their Y coordinate.

Actually, I could probably just do something like layer = (y/y)/y, which would make the larger numbers into smaller numbers... But I'm not sure if that's compatable with the layer stuff. Probably, but I haven't tried it to be sure :oP

Oh, and if anyone has a better way to setup a 96x48 isometric map, I'd be happy to take a look at it. Mine's pretty choppy right now, because it just consists of selecting turfs in a pattern then modifying their pixel offsets based on their x/y coordinates from there.

It's ugly, but at least it works. Still, I'd rather find a nicer way of doing it.
In response to Foomer
Ugh...this is one of those few occasions when the graphics are working out better than the game...
In response to Foomer
Actually, I could probably just do something like layer = (y/y)/y, which would make the larger numbers into smaller numbers... But I'm not sure if that's compatable with the layer stuff. Probably, but I haven't tried it to be sure :oP

Er... that simplifies to just 1 / y. It should work, but why not just do layer = world.maxy - y + some arbitrary constant?