[Kde-games-devel] Re: Re: Re: new KDE game: dominoes

Jay Glascoe kde-games-devel@mail.kde.org
Fri, 8 Nov 2002 11:29:28 -0800 (PST)


I decided to follow Rob Kaper's advice and move the
domino creation into the application itself. Big, big
win for disk space, and (surprisingly) only a small
performance hit. (I'm surprised because the shell script
domino creation is a cpu cycle pig). The increase in
launch time is unnoticeable to me (600 MhZ, plenty of
ram), so I'll have to insert some debugging code to
figure out just how much time is spent here.

So now I have seven face values, 0 1 2 3 4 5 6, and
two blank dominoes on which to paste the values (could
decrease to just one). QPixmap.xForm() does a perfect
job at N*90 degree rotations (faces like 2,3,6 need to
be rotated), and QPainter.drawImage()
does a perfect (lossless) job of "pasting" the faces
onto the blanks. This solution added about 100 new lines
of code (fine by me).

There are some extra misc. images (some of which I could
rotate on the fly as well), but the size of all image
files has been reduced by about a factor of 10 (nice!).
So, let's just say that the size of image files is no
longer an issue.

Thanks for the comments, and sorry I didn't try what now
seems obvious before.

-Jay

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2