Results 1 to 10 of 10
Thread: How to limit FPS in Java game?
- 08-15-2012, 01:31 PM #1
Member
- Join Date
- Aug 2012
- Posts
- 5
- Rep Power
- 0
How to limit FPS in Java game?
Hello! So the problem is that game uses more resources than it really need. I want to limit rendering to 30 FPS.
The game uses LWJGL and has a special file named extra.txt, where could be added additional options like "-server" "-XX", "-Dorg.", etc. I can enable VSync and FPS will be limited to 60, but it's still too much.
Is there any command to limit FPS or limit cpu usage?
Thanks!Last edited by ewbte; 08-15-2012 at 01:42 PM.
- 08-15-2012, 01:47 PM #2
- 08-15-2012, 01:48 PM #3
Member
- Join Date
- Aug 2012
- Posts
- 5
- Rep Power
- 0
- 08-15-2012, 04:42 PM #4
Re: How to limit FPS in Java game?
Hmmmm, yeah, sorry, this is not a place for people to ask questions on video games they have found. Even though it runs on java, you did not program it, and unless you are making a private server and you are attempting to reprogram the source of the game, this is not the place for video game help. This is a place where Java programmers come to discuss their PROGRAMMING problems, questions, theories etc.
I would suggest checking out some forums that Spiral Knights has and asking your question there. I have played the game as well. Maybe someone has the answer, or maybe the answer does not exist. The problem might be merely in the programming of the game or the hardware you are using to run it.My API:Java Code:cat > a.out || cat > main.class
- 08-15-2012, 04:53 PM #5
Member
- Join Date
- Aug 2012
- Posts
- 5
- Rep Power
- 0
Re: How to limit FPS in Java game?
Oh.. excuse me so. I already asked on game's forum, and nobody knows.
I thought guys who know a lot about java will help.
I just wonder maybe there could be casual java command like "-Xms1g -Xmx4g" (changes memory that game can use) but for limit FPS.Last edited by ewbte; 08-15-2012 at 04:57 PM.
- 08-15-2012, 05:01 PM #6
Re: How to limit FPS in Java game?
Well, the problem here is that when you create a game, you have total control over the FPS. One could place a file that hold what that value is in a file, but for this particular game, I am not sure. Usually the graphical settings would help or some options, but this would be particular to the game. And yes, something like "-Xms1g -Xmx4g" would have been some thing that I would have suggested but you have already tried that.
I might be wrong here, but I do not believe that LWJGL is naturally found in the Java JRE. So, that "extras.txt" file it uses is dependent on that game. On a programming stand point, I cannot help much.My API:Java Code:cat > a.out || cat > main.class
- 08-15-2012, 05:09 PM #7
Member
- Join Date
- Aug 2012
- Posts
- 5
- Rep Power
- 0
Re: How to limit FPS in Java game?
As I said in first post the following commands works in this extra.txt: all -xx:, -xms, -xmx, -server, -Dorg.lwjgl.opengl.Window.undecorated=true, and all from here Java HotSpot VM Options
but I haven't found a command to limit FPS or CPU usage there.. so I'm asking here.
- 08-15-2012, 05:11 PM #8
Re: How to limit FPS in Java game?
No, there isn't. And as it is now established that the question is off topic, I'm moving the thread to the Forum Lobby.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 08-15-2012, 06:12 PM #9
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Re: How to limit FPS in Java game?
-Dorg.lwjgl.opengl.Window.undecorated=true
That one isn't in that list of java options.
Yes, the -D is, an option, but it is merely a way of sending a property into the application.
In this case, a property that LWJGL uses.
It's not a JVM property.
As kammce says, this is going to be something under the control of the game...possibly LWJGL, but since you seem to have looked up what you can do with that and not foind anything, I would say it's a game-specific thing.Please do not ask for code as refusal often offends.
- 08-15-2012, 07:38 PM #10
Member
- Join Date
- Aug 2012
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
java.lang.OutOfMemoryError: GC overhead limit exceeded
By apraj397 in forum Advanced JavaReplies: 1Last Post: 05-30-2012, 12:17 PM -
date limit Java calendar GUI
By cuti in forum New To JavaReplies: 4Last Post: 01-20-2012, 11:13 PM -
How to limit threads in a Java QuickSort algorithm.
By roise_r in forum Threads and SynchronizationReplies: 6Last Post: 06-02-2011, 07:53 PM -
How to limit characters textbox in java
By rjagan in forum New To JavaReplies: 11Last Post: 03-28-2011, 10:09 PM -
setting memory limit for java?
By MuslimCoder in forum New To JavaReplies: 1Last Post: 08-26-2010, 06:09 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks