Hi all,
I've been working on my gamepack component package for a long time
(nearly 4 years now) and it's quite a nice set. Not perfect of course,
but it's two components for gametype graphics do work very nicely.
Gamepack provides the following components:
TDoubleBuffer: A doublebufferd drawing area. Changes are made to a
memory buffer, and not shown on screen until you call the
TDoubleBuffer.flip method, allowing for flickerless animations. Much the
same kind of structure as the doublebuffered screen in SDL.
TDoubleBuffer can be drawn to with all standard LCL drawing functions,
and can load a background image from file straight of the bat.
Additionally two blit methods are provided, one blitting any canvas you
want, with a bunch of parameters to control how it gets blitted, and one
blitting a tsprite and taking all those parameters from the properties
of the sprite so you can control animations by ONLY updateing the sprite
objects. Finally the there is mask method, which takes a tsprite as a
parameter, on run it will automatically blit the background over the
sprite's current location, so that the next sprite blit will not leave a
trail.
TSPrite: A sprite handling component that can handle multiframe animated
sprites automatically. It encapsulates a TImage which holds the actual
sprite image. Sprite images are made by placing each frame alongside the
previous one from left to right. The only restriction is that they
must all be the same with. The TSPrite.Framewidth property is then set
to this value, and by controlling tsprite.frame you can cycle or swith
between frames instantly with no overhead.
For example if you have tsprite.frame set to 3 and you call
tdoublebuffer.blit(tsprite) then it will automatically blit frame 3 for you.
The components are fully documented and an example is included, also my
tappytux game was written using it and I will soon start working on a
loderunner clone using it as well.
My question then is whether other people are interested in these lgpl'd
components. If so, would you like it to be included with lazarus ? I
will happily contribute it if people want it.
Ciao
A.J.
--
"Any sufficiently advanced technology is indistinguishable from magic" -
Clarke's law
"Any technology that is distinguishable from magic is insufficiently
advanced" -Gehm's corollary
"Any technologist that is distinguishable from a magician is
insufficiently advanced" - My corollary
The worlds worst webcomic: http://silentcoder.co.za/scartoonz
The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za
begin:vcard
fn:AJ Venter
n:Venter;AJ
org:Global Pact Trading Pty. Ltd.;OutKast Solutions
email;internet:[EMAIL PROTECTED]
title:Director of Product Development
tel;work:+27 21 554 5059
tel;fax:+27 11 252 9197
tel;cell:+27 83 455 9978
url:http://www.outkastsolutions.co.za
version:2.1
end:vcard