Thread: Y-Order
View Single Post
  #39  
Old 09-22-2002, 01:49 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Worth noting -
you can argue until you're blue in the face that layers 1,2,3,and 4 are seperate arrays or one big array, but it doesn't change a thing.

When two objects on layer n overlap, the executable checks the y and the height, whoever has the greatest bottom-position is drawn over the loser.

Using floating point layers will do one of two things. It will reduce the number of times that two objects on layer n overlap, or it will add a single additional check to the system -
when two objects on layer (int n) overlap, the executable checks the (n%1), whoever has the greatest (n%1) is drawn over the loser. If they match, then do the y-check.

If a batcher was run which replaced all layers with layer+(y+(image's height/16))/100, it could replace a lossy compare "y1+height1 verses y2+height2" with the more efficient mask-and-compare operators of int and %1. One would just have to use the layer+etc... method when they want to do things in y-order.

Or, which might be tidier, Stefan could write a new command, changeimgvis float; which frees up changeimgvis int; to continue using the y-order sort - which is, to the exe, just the same thing as changeimgvis float; but with the layer+etc inserted behind the scenes.

In either case, it's more power for a piddling cost. Not that it matters to me much, I'm on my way out anyway, but I've always been altruistic regarding the future of Graal.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote