Advertisement

Libgdx animation stutter

Started by April 26, 2016 01:48 AM
7 comments, last by Tanay Karnik 8 years, 7 months ago

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

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

Advertisement

I am speechless!

LOL,

Question Posted at 07:48 PM

Answer Posted at 07:53 PM

(no offense)

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.

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

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.

Advertisement

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.

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.
How do I delete this post? It was duplicated by mistake.

This topic is closed to new replies.

Advertisement