Geoff Canyon wrote:
>
> Hi,
>
> there's a board game I play that I decided I liked so much, I wanted an
> online version. MetaCard + four hours = prototype --is MetaCard great or
> what?
>
> But now I have a slight problem. The board is simple, but with patterned
> squares, much like a chessboard with marble and ebony squares, for
> example. So I created one tile as a gif, created an image, and imported
> the image as a file reference. The standard board contains over 250
> squares. So I blithely wrote two repeats to get me an arrangement of
> 16x16 of these images, each using a file reference to pull in the same
> gif file. BOOM! goes MetaCard on the Mac. So I up the default partition
> to 20mb, and all is well. Then I decide I want different sizes of board.
> I choose 20x20 as a nice maximum size, and run the board construction
> routine. No crash, but by the time MC is done, the Mac is reporting that
> MC is using over 30mb. Good for MC that it was able to grab what it
> needs, but still--30?
>
> The board construction routine does check and delete previous
> incarnations of the board, so I'm not piling up extra images. So what is
> causing the enormous appetite?
>
> I'd like to be able to support irregular board shapes, so I need to be
> able to construct just about any shape. I'm thinking one way to reduce
> memory usage would be to have an image that was as big as I want to ever
> get--say 25x25 squares, but all in one image instead of in 625 small
> ones, and then use a polygon, setting the points appropriately, to mask
> out the squares I don't want to use. This would be a fair bit of code, so
> I figured I'd ask before undertaking it--is one large image going to use
> a lot less memory than a bunch of small ones that add up to the same
> area? And if so, why in particular?
>
> Thanks to any who have insight.
>
> gc
>
> Archives: http://www.mail-archive.com/metacard%40lists.best.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Hi Geoff,
Use buttons instead of gifs, even if you can use the gifs to customise
the buttons icons. I have a stack that use 576 buttons in a long running
robot (24h/24h) witch run fine in about 10 Mo of Ram.
Regards, Pierre Sahores
CRDP de l'academie de Creteil
WEB, DB, ASP, VPN, B2B design
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.