Framerate-independent movement

hides from raising Cas’s ire

AFAIK, from everything said threads are a two edged sword. YES, they have their purposes and YES they are very good at certain things. However, when it comes to the main animation thread, when dealing with slower computers and older JVMs, I have personally experienced that more threads = worse performance.

Okay, so this causes a nightmare in arranging your programming, but it’s not that bad, really. Besides, there is no WAY you are having exactly ONE thread in a Java based game with sound, music, networking and such that’s going to be maintainable. You might as well write in C if you’re going to do that. Already I’m at four major threads right now: music, sound, animation, network queue. I think I’m missing one, I may have to have a separate input queue as well, though I don’t see why the animation loop can’t handle that.

Choose wisely, but I tend to agree that minimizing the number of threads touching animation is a GOOD thing.

Besides that I have a question: most of the games that have problems with frame-capping are ones that use a single-frame animated object, where the animation is the movement across the screen of said object. I am thinking Arkanoid, Frogger, MAYBE Pac-Man, etc. What about a game that has walk movements, say a figure that walks, and you’ve only developed eight frames? I have found that if you up the frame rate past a certain point, you are going to experience problems if you try to move that figure LESS pixels as it causes havoc with the distance the leg travels. What this means is, if the character was built to stride at 4 pixels per frame, and you try to limit it to move 1 pixel per frame it looks pretty silly. What then?

(D’oh! Just realized all my image loaders should be in separate threads, since they all load first and there’s no reason not to! D’oh!)