Sign in to follow this  
Vendetta8247

Libgdx animation stutter

Recommended Posts

Hello, gamedev.net.

I have started learning libGDX and have encoutered an issue with animating my sprites. I have very little experience in gamedev so you might see some stupid things in my code. Here is my code. It is all in one file but I hope it won't be very difficult to read. I've done some search in the net and tried using (and not using) delta time and vsync. But it doesn't seem to help at all. Any help would be apretiated

Share this post


Link to post
Share on other sites

After about 5 hours of working on the issue (and immediately after I've posted here) I've figured out what my problem was. I was incorrectly dealing with refresh time and FPS. I had 1000/60 (wut) instead of 1/60. This completely solved my issue

Share this post


Link to post
Share on other sites

Explaining the process to someone else often helps.

 

By taking the time to explain it you need to generally break down each individual step, and in the process you can verify that each step is working. By explaining it step by step, frequently you'll discover the flaw yourself.

 

It is frequently called Rubber Duck Debugging due to a popular programming book.

Share this post


Link to post
Share on other sites

hey vendetta, glad you sorted your issue out!

 

just wondered if you could give your opinion on libGDX, im currently learning java atm and are planning on using libGDX latter on...

 

just wondered how you were finding it? some people say you need to be experienced in java to use it... also im going to be doing games with lots of animation, in your opinion how is java handling animations so far for you? 

 

thx in advance

 

Rick

Share this post


Link to post
Share on other sites

I am speechless!

 

LOL,

Question Posted at 07:48 PM

Answer Posted at 07:53 PM

 

(no offense)

 

Happens to me all the time. Often when I am carefully describing the problem and reading over it a answer pops up, other times it just feels like witchcraft :D.

Share this post


Link to post
Share on other sites

hey vendetta, glad you sorted your issue out!

 

just wondered if you could give your opinion on libGDX, im currently learning java atm and are planning on using libGDX latter on...

 

just wondered how you were finding it? some people say you need to be experienced in java to use it... also im going to be doing games with lots of animation, in your opinion how is java handling animations so far for you? 

 

thx in advance

 

Rick

 

LibGDX is awesome for 2D and simple 3D games, I find the common engines better suited for 3D since you just need a scene builder for it. You code everything in Java so you do need to be comfortable with the language and OOP but if you have coding experience you can code a basic 2D game like pong or Arkanoid in a couple of hours with it. Unless you are trying to match the next Halo game I would not bother with performance. Java and C# are slower then C++ because it manages your resources for you, but using a popular engine generates a ton of overheat as well. One thing is for sure, learning LibGDX or any other framework, API or engine does not hurt you.

Share this post


Link to post
Share on other sites

Explaining the process to someone else often helps.
 
By taking the time to explain it you need to generally break down each individual step, and in the process you can verify that each step is working. By explaining it step by step, frequently you'll discover the flaw yourself.
 
It is frequently called Rubber Duck Debugging due to a popular programming book.

 
That's what I was going to suggest but thought it would be off topic. Edited by Tanay Karnik

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this