• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Animation performance question

John Wood
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello folks,

I have a GUI project that requires playing out synchronized audio/visual animation to the user, and must allow the user to interact with the animation. This interaction might interrupt an animation, forcing it to either halt completely, or else begin another new animation. Think of a user hitting buttons on a screen, and having the computer respond back depending on what is hit (i.e. a computer/user 'conversation'). And oh yeah, this is a musical application, so I'd like to continue to use my Java Sound API stuff for MIDI output while this is all going on!
I'm new to animation, but I've investigated two approaches (on paper) to this problem:
1) 'Roll your own', whereby you output images to the GUI, and send .wav file snippets assoc. with these images to the sound system. I'd have to handle the proper delays between them all.
2) Use the Java Media API's Player system to stream animated QuickTime/CinePak movies to the GUI.
The latter choice seems to the be slickest one, but I'm worried about the performance (this topic, no?) of all of this. So, if I'm streaming out one animated movie, and the user clicks a button, and I have to stop that animation and start playing ANOTHER movie that says 'you hit the wrong button buddy', will there be a significate delay in the switch over? It appears you can't change data sources on a Player once it is instantiated, and it would be really nasty if I had to have a separate Player cached up for EACH animation sequence I might have to output.
Any ideas or experience out there on this application?
Thanks very much in advance...
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic