Tiny images, mega headache
David Kwinter
david at kwinter.ca
Sun Jul 27 01:31:31 EDT 2003
I'm in the middle of making a map-editor for a new 2-D game. It's a grid of
8x8 pixel tiles, designed to fill a 1024,768 screen. Each tile can be one of
28 different images.
There are 96 columns and 128 rows.
On both my 667mhz G4 and 1.9ghz Pentium 4 the following repeat, designed to
set each tile to the default "water" background, stalls about 70% of the way
through.
repeat with y=1 to 96
lock screen
repeat with x=1 to 128
put x&"c"&y into iName
set the fileName of image iName to pgmRootDir&"images/water.png"
if the capslockkey=down then exit repeat
end repeat
unlock screen
if the capslockkey=down then exit repeat
end repeat
True, there are 12,288 separate images, but c'mon we're talking 1.9ghz
w/800mhz Rambus here!
The images are 3,700 bytes. I've got 256mb ram. I notice my WinXP page file
balloons to 700MB before it stalls. On the Mac I just get the spinning
lollipop of death.
Any tips, tricks, techniques?
David Kwinter
More information about the use-livecode
mailing list