Speed test update
Shari
gypsyware at earthlink.net
Wed Apr 16 13:55:01 EDT 2003
I tried Tereza's idea and it was slower than my fastest (which was
620 milliseconds). (Sorry Tereza, I wanted yours to work :-) I am
working with a 350 mhz G-3, so your results may vary, but comparing
each handler on my computer, the results are as follows:
on moveUnit gRow, gCol # 667 milliseconds
global aMap,gTemp
put the milliseconds into tit
put 1 into z # image z of grp "underlay"
put ((gRow - 1) * 43) + gCol into tStart
put tStart + (43 * 8) into tEnd
lock screen
repeat with x = tStart to tEnd step 43
repeat with y = 0 to 10
set the filename of image z of grp "Underlay" to aMap[x + y]
add 1 to z
end repeat
end repeat
unlock screen
put the milliseconds - tit & comma after gTemp
end moveUnit
I am currently working with Scott Rossi's suggestion, and it looks
like this is the fastest way. Instead of using images, I am using
buttons, and setting the icon of the button to an imported image. I
imported the images into their own stack, and embedded the stack into
the "map" stack. I need to fine tune it a bit, but this is my
current test run.
on moveUnit # 65 milliseconds
global gRow,gCol,gTemp,bMap,dMap
put the milliseconds into tit
put 1 into z
lock screen
repeat with x = gRow to (gRow + 8)
repeat with y = gCol to (gCol + 10)
set the icon of cd btn bMap[z] to (the id of image (line y of
dMap[x]) of stack "images")
add 1 to z
end repeat
end repeat
unlock screen
put the milliseconds - tit & comma after gTemp
end moveUnit
--
--Shareware Games for the Mac--
http://www.gypsyware.com
More information about the metacard
mailing list