Jump to content
  • Advertisement
Sign in to follow this  
Siriion

[java] Dynamic Java Framework

This topic is 4094 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey. Ok, so I've been trying to write a dynamic Java animation framework for a while now. What I mean is a framework which updates itself every x amount of loops depending on how much time 1 loop takes. This would be in a while loop, completely independent of a thread. It's been very difficult for me, because I can't quite figure out how it would work. I have the basic concept, and using System.currentTimeMillis was able to write what I thought would work but ended up just failing. Basically, I was wondering if anyone could point me to a tutorial or layout what I should do. And please don't say Google. I tried.

Share this post


Link to post
Share on other sites
Advertisement
It depends on what you're using; First, System.nanoTime() is a more accurate timer - still, if you're using LWJGL, it has its own timer class that handles issues related to this kind of code.

For examples, you might want to check out some of the source code available for the Slick engine, which presents a good 2D animation system. Also, there are other code examples at Kev's site (www.cokeandcode.com).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!