This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Sprite Animation" Watch "Sprite Animation" New topic
Author

Sprite Animation

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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?

Thanks.


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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Sprite Animation
 
Similar Threads
Why does a char value also have an integer value?
Sprite Animation
Using a spritesheet
Getting pixels from a Graphics instance
basic sprite question