File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Game Development and the fly likes Sprite Animation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Game Development
Bookmark "Sprite Animation" Watch "Sprite Animation" New topic

Sprite Animation

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

This thread and the fact that I have started looking into some rudamentary 2D Graphics type games make me start wondering how to handle sprite animation in Java. I'm not talking about simply moving an image around on the screen but actually loading several images that when looped over make an animation, say, of a guy walking, or whatever. Does anyone have any links to the best methods for handling this in Java?


GenRocket - Experts at Building Test Data
saager mhatre
Ranch Hand

Joined: Dec 20, 2000
Posts: 61
Hey Gregg,
It's just an idea, but wouldn't this kind of sprite animation be better off included in the Image Producer/Consumer API ??
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
I got started with the old Sun tutorial which had a page on animation. It has been retired but (they say it) is available for download on this page: Download the Java Tutorial. I think you want the Online Tutorial link. The rest I learned on my own.

For background information on painting you might check the currrent tutorial page: Implementing a Custom Component.

Here's an example of animation in Swing:

[ June 27, 2004: Message edited by: Craig Wood ]
I agree. Here's the link:
subject: Sprite Animation
jQuery in Action, 3rd edition