Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsShowcase → FPS counter in Java
FPS counter in Java
2008-11-21, 1:48 PM #1
Later in this school year, I'm going to be required to make a game in Java, and I got started by making this little demo.
Attachment: 20562/FPS.zip (6,718 bytes)
2008-11-21, 4:28 PM #2
Works great! Good job dude.

My only suggestion is to change the way you handle the character's movement. Right now you're moving the character in the event handler ( keyPressed() ) which results in the pause at first when you hold down a direction key.

Instead, consider animating the character in your main game loop. keyPressed() would set a new boolean like charMovingLeft to true on keyPress and to false on keyRelease. This will result in smooth movement with no pause.
"it is time to get a credit card to complete my financial independance" — Tibby, Aug. 2009

↑ Up to the top!