[Gambas-user] (no subject)

Christopher Brian Jack brian at ...1334...
Fri Jan 27 19:26:59 CET 2006


I was just on the subject of timer controls on another response and a
situation that may be of importance to me is how well code can keep up
with the timer.

I know slow stuff like graphics rendering is going to play havoc with
timing so I know that I need to decouple the beat counter from the
scheduling code.  I believe the easiest way is for the scheduling to
figure out the next beat index it needs notification on and have the
high-speed beatcounter only raise a schedule event when the target beat is
reached.  To get true concurrency would the schedule event need to be in a
separate class.  The best I can glean out of the documentation is that an
event declaration of one class cannot be triggered by a separate class
(mind you a LOT of documentation is incomplete).  What is the best way to
go about this?

I also need another level of separation.  The game dynamics update runs at
a fixed rate but again is decoupled with rendering capacity.  This means
the game logic runs at a constant rate despite a weak link in potential
rednering (eg: operations on Pictures/Images like alpha blends -- thinking
on either unacellerated or systems which do not support acelleration
available on the installed hardware, a constant problem under Linux --
which is another missing image/picture operation -- it's supported but
only if the format is PNG or GIF and told to enable transparency and
images don't do it at all AFAIK - so if I was fading graphics in and out I
would need prerendered "alpha"ized slices of each image and draw them in
sequence to do fade ins or fade outs -- umm, but what if I want to
PictureObject.Grab, and fade the image in the DrawingArea out?)

Any suggestions here?
Maybe a gb.imageops.lib is needed?

But
  DrawPictureWithAlpha(alpha,imageobject,x,y,imgx,imgy,imgw,imgh)
  DrawImageWithAlpha(alpha,imageobject,x,y,imgx,imgy,imgw,imgh)

Would need to be added to the current Image and Picture objects so that
you can use blending levels in order to execute "fade" type effects (it
can also do higlighting type effects as well).

.=================================================.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+================================================='
| brian _AT_ brians-anime _DOT_ com
| brian _AT_ animemayhem _DOT_ com
| brian _AT_ nall.brians-anime _DOT_ com
| brian _AT_ ruby.brians-anime _DOT_ com
| gau_veldt _AT_ hotmail _DOT_ com
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...




More information about the User mailing list