Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I tween in Java? [closed]

Tags:

java

animation

I'm looking into making a 2D game in Java and I've run into a problem with animation: how do I do tweening in Java? Are there any libraries or maybe something I can find bindings for?

Also, please understand that I do not want to simply move an image, I want to do morphing in a way that when making drawings for animation I can use a few keyframes to fill in the in-between frames to generate the animation.

like image 940
Tore Avatar asked Jun 20 '09 10:06

Tore


2 Answers

I built an Universal Tween Engine for Java: http://code.google.com/p/java-universal-tween-engine/

logo

Tweens can be applied to every object (no just graphics objects, everything!), every object attribute can be tweened, and it supports every Robert Penner easing equation too.

Also, the engine is optimized to not instantiate anything at runtime (except during initialization), so it can be used for Android games without fearing the garbage collector.

like image 61
Aurelien Ribon Avatar answered Oct 20 '22 10:10

Aurelien Ribon


The timing framework is what I think you are looking for.

Also I can well recommend the book Filthy Rich Clients if you are it to writing rich apps.

An alternative is also the jgoodies:Animation library

like image 33
Gareth Davis Avatar answered Oct 20 '22 09:10

Gareth Davis