I currently have a module (and am starting another) that uses dice…rather a lot of dice.
I have images of the dice in the main window tied to the values of the hidden dice roller that is run from a trigger when a button is hit. This works great.
One thing that would be nice, however, is the ability to maybe add a 1-3 second long animation on the dice so the player knows they’re rolling…I tried to do this by simply having the trigger roll the dice 10 times and take the final result…then 20 times…then 50 times…Problem is, the rolls happen so fast, you can’t really tell! Is there a way to add a delay between triggers so that each roll could be timed to happen, say, 250ms apart? Some sort of a ‘wait’ statement?
I brought up something similar in the Feature Requests section at one point. Personally, I think it would be a great feature …not just for graphics for other timing issues as well.
No, it doesn’t, because everything in the graphics pipeline is a
BufferedImage. Animated GIFs are problematic because they’re represented in
the Java API by a private subclass of Image (they’re not BufferedImages) and
as a result we have no access to their internals. The major issue is that
once you load an animated GIF there seems to be no way to stop the thread
which animates it. It will chew up CPU cycles until you quit, even if the GIF
isn’t being displayed.
Animated GIFs won’t work when we switch to JOGL, anyhow, so there’s really
no way for this feature to come back.
What are people trying to use animated GIFs to do? Maybe we can provide some
other way to achive the same thing.
My particular use was to provide an extremely high-visibility animated marquee to particular units to make them easier to locate.
In the end, I decided the animation was an overkill and just went with a high-contrast yellow border.
I believe Skorpio wanted to provide some animation feedback to the user clickong on a Dice Button Action Button - Show the rolling Dice to indicate something has happened.
Maybe we can provide some
other way to achive the same thing.
–
J.
Which gives me this idea for a RFE
Back in DOS and other programming languages / scripts I’ve toyed with they
all seem to universally have a method of pausing “x” whatever.
A wait state would be a very neat feature to have. we could then simulate
the changing state of pieces / components in a stop-gap motion cinematic
type of way etc…
As a trait layout goes it might look something like this:
The animation could be active only when the mouse cursor is over the
counter itself – or something like that. We should have some
animation capability.
With respect to JOGL, having animation is certainly possible. I don’t
see how it is more technically difficult than much else.
–
Michael Kiefte, Ph.D.
Associate Professor
School of Human Communication Disorders
Dalhousie University
Halifax, Nova Scotia, Canada
tel: +1 902 494 5150
fax: +1 902 494 5151
It’s certainly not trivial. We would have to add that functionality.
I’m working on a general solution to JOGL that’ll get us going quickly on this. I’m taking the longer road right now don’t I don’t have to use as many braincells later on. Hopefully, we should be able to get JOGL up and running transparently and then we can tweak it later.
Not at all. I wouldn’t really know where to start with that.
What I’m working on is extending com.sun.opengl.util.texture so that it is actually useful to us. This may or may not actually get used in VASSAL, but it’s worth doing and I would definitely like to see if it will work with VASSAL. If it doesn’t, then fine. If it does, then retrofitting VASSAL to work with JOGL will get a whole lot easier.
As for the model-view stuff, I’m really not sure how to go about that. That means going through every element that actually displays something and tearing it apart. Nothing will work until it’s all done, right?