[cairo] Lander Game
cworth at cworth.org
Mon Jan 8 17:20:04 PST 2007
On Mon, 08 Jan 2007 17:08:14 -0800, Carl Worth wrote:
> As mentioned before, the speed gets much better if I simply disable
> the re-rendering of the entire background every time, (then I get to
> see the very cute vectorized, fading, emissions from the rocket---well
> done). You should be able to get an almost identical speedup by simply
> caching the background and then only updating parts of the background
> that are dirtied.
Oh, and I should also point out the following "prior art":
cvs -d :pserver:anoncvs at cairographics.org:/cvs/cairo co cairo-demo/svgspacewar
(Use 'a', 'd', 'w', and left 'control' keys to control the blue
ship. You might succeed at controlling the red ship if you have a
numeric keypad (I did not)).
That program is quite fast for me, and examining its code might be
instructive for you.
It's worth noting that in spite of its name, it's not actually using
any SVG in the program, but simply making direct cairo calls to draw
the background and the spaceships.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070108/cab7b70c/attachment-0001.pgp
More information about the cairo