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?
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.
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?