This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Performance and the fly likes Java game application slowing down Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Java game application slowing down" Watch "Java game application slowing down" New topic
Author

Java game application slowing down

Adam Miszczak
Greenhorn

Joined: Sep 24, 2012
Posts: 24
Hi,

I have a simple game set up, not yet finished, and only using basic rectangles for graphics right now.

The problem is, that when start the game for the first time after starting up eclipse (or my computer) the game runs at over 160 FPS, after a while though, it drops to 100, and if I launch it again, it stays at 100 FPS and occasionally speeding up to 167 FPS and slowing down again. Can anyone explain why this is happening, I can provide my code if necessary, if it is a problem with its efficiency.

Thanks in advance!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
How much CPU time is your game getting?

Assuming Windows, use the Windows Task Manager to find out what is going on.

Bill
Adam Miszczak
Greenhorn

Joined: Sep 24, 2012
Posts: 24
Not exactly sure how I would go about checking where it says that.

EDIT: I assume you mean the CPU field. In that case, it is 00 and goes up occasionally but it has not gone higher that 04. The memory usage is just below 46,000K
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
If this was my problem I would next try to run the game outside the eclipse environment.

<rant>thats my long-running problem with IDEs like eclipse - you never can tell what they are doing behind your back</rant>

Bill
jake lopez
Greenhorn

Joined: Jul 03, 2013
Posts: 13
100 fps is still fast right?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java game application slowing down
 
Similar Threads
fps is slowing down
Abruptly closing appliation
JoGL slow spots
basic question...
Occasional random pauses during game