[Kde-games-devel] Rule Writing

Parker Coates parker.coates at kdemail.net
Fri Feb 24 17:30:57 UTC 2012


On Wed, Feb 22, 2012 at 23:55, Parker Coates wrote:
> On Mon, Feb 20, 2012 at 14:43, Parker Coates wrote:
>> On Thu, Feb 2, 2012 at 07:01, Frederik Schwarzer wrote:
>>> For that to happen, those who think their rules are finished, should
>>> make the resulting repo available for download.
>>
>> http://quickgit.kde.org/index.php?p=scratch%2Fcoates%2Fkillbots-conversion-test.git
>>
>> It seems pretty complete to me, but Killbots has a pretty simple
>> history. The rules are simple, but probably appropriate for any other
>> game that was imported after KDE4.0 and has a simple playground/games
>> -> kdereview -> kdegames history. When I get a chance, I might try it
>> out on a few others.
>
> I did Bomber and Bovo using the exact same rules.
>
> http://quickgit.kde.org/index.php?p=scratch%2Fcoates%2Fbomber-conversion-test.git
> http://quickgit.kde.org/index.php?p=scratch%2Fcoates%2Fbovo-conversion-test.git
>
> Bomber, by the way, has the prestigious title of the most quickly KDE
> game of all time. The author's most recent commit was the one moving
> it from kdereview into kdegames. :|

Kapman, KBlocks and KBreakout are done.

http://quickgit.kde.org/index.php?p=scratch%2Fcoates%2Fkapman-conversion-test.git
http://quickgit.kde.org/index.php?p=scratch%2Fcoates%2Fkblocks-conversion-test.git
http://quickgit.kde.org/index.php?p=scratch%2Fcoates%2Fkbreakout-conversion-test.git

I've also been playing around with some of PovAddict's techniques for
reducing repository sizes. In addition to the oft discussed
null-compressed-svgz trick, he showed me how to super aggressively
repack a repository which saves us a bit more.

I also got to try out and idea I had been toying with for quite a
while. In the past Urs Wolfer would run a script called
optimizegraphics on the SVN tree which recompressed SVGZ and PNG files
with higher compression. This made sense in SVN times, but when
converting to Git, it means the repository contains multiple copies of
the same file with identical contents but different compressions. The
null-compress-svgz trick solves this issue for SVGZ files, but not for
PNGs, obviously. So I created a script the pre-optimises PNG files
when they are first added/modified so that later optimizegraphics
commits become no-ops.

Thus far I'm pretty happy with the results, see the table below. Note
that the "before" numbers are after a "git gc --aggressive" has been
done, so they represent about the best that can be done without
getting fancy.The after number represent the result of applying all
three optimisations discussed above.

Game      Before  After
Kapman     5524KB 2340KB
KBlocks    6572KB 2500KB
KBreakout 31104KB 6404KB

I just want to point out here that none of these optimisations affect
the contents of the files they modify, only the binary representation
of those contents. The only downside is that the MD5 sums for a file
will differ from the versions that have been released in the past, but
I think that's a pretty small price to pay.

Parker


More information about the kde-games-devel mailing list