[cairo] Re: Lander Game

Alex Mac lots.of.mailing.lists at gmail.com
Thu Jan 25 15:50:41 PST 2007


I've revamped the whole app now and release 0.2.1 now caches the
background and the ship. Also I've stopped it from updating the whole
screen every frame.

So basically it runs at around 70fps for me even fullscreen, and uses
a whole lot less cpu while running.

> As for jerkiness. I see that in all three versions. I would suggest
> not re-drawing all those parts of the background that haven't changed
> at all.

try running 0.2.1 and then run it again with "--native-surfaces" this
causes the background to be cached as an xlib surface rather than an
image surface. Although not as noticeable now the xlib surface does
cause the occasional jerk... I'll try and get a test to replicate it
properly

> -Carl
>
> PS. Your tutorial fails to mention the keys to control the ship. The
> first tutorial level is trivially solved by just pressing once on the
> up arrow (never doing any laps). As for any other levels---I've never
> landed safely---remind me never to fly in any spacecraft with controls
> like these.

yeah its by no means a real game yet, but at least now I've got it
running at a decent framerate I can focus on that a bit more.

I'll probably let the player choose if they want to use the old easy
ship or the new slightly harder more realistic one.

Alex


More information about the cairo mailing list