On Thu, Aug 6, 2009 at 4:15 PM, Jonas Elfström<[email protected]> wrote:
> On Thu, Aug 6, 2009 at 7:05 PM, Seth Thomas
> Rasmussen<[email protected]> wrote:
>> On Thu, Aug 6, 2009 at 12:52 PM, Seth Thomas
>> Rasmussen<[email protected]> wrote:
>>> 2009/8/6 Juan Andrés Gebhard <[email protected]>:
>>>> Hi everyone! I'm trying to make a chess game. To draw the board, I thought
>>>> of placing 8 flows, and 8 stack inside of each flow. And finally, each 
>>>> stack
>>>> would have a PNG image inside.
>>>
>>> This is an aside, but why have a flow for each row? The top level slot
>>> is a flow, so you could just pile in stacks of appropriate width and
>>> they should wrap to create your new rows.
>>
>> They should, but they don't! Alas!
>
> But images do. I know because I used that fact in a Memory game I did
> last year. I'm not proud of the source code at all but you can check
> it out at http://plea.se/me/remember-shoes.html
> The gist is that I create a shoes.app with a width of 1280 and then 16
> images of width 320. 1280/320=4, wich gives me a playing field of four
> by four.

Cool, good to know! That would probably be a nice little optimisation
anyway. You could create two distinct images and reuse them and Shoes
nice image caching, rather than generating 64 widgets with copies of
their guts everywhere.

-- 
Seth Thomas Rasmussen
http://greatseth.com

Reply via email to