Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default FPS Limit #178

Open
toqueteos opened this issue Jan 27, 2015 · 12 comments
Open

Default FPS Limit #178

toqueteos opened this issue Jan 27, 2015 · 12 comments

Comments

@toqueteos
Copy link
Contributor

hematite runs, right now, with uncapped FPS which causes it to hog both CPU and GPU.

A default FPS limit would be great for ours fans / hardware, 60 or 120 FPS are pretty good values and anything else above this value is just wasting energy and/or useless work.

I was able to limit FPS with external software which lowered CPU usage from 25% (1 core) to merely 1~3%.

@toqueteos toqueteos added the easy label Jan 27, 2015
@eddyb
Copy link
Contributor

eddyb commented Jan 27, 2015

It used to be capped to 60FPS but I wanted to see what it can do. We should use this occasion to get some proper command-line options via something like docopt.rs.

@toqueteos
Copy link
Contributor Author

Maybe an ini file is better suited for this, so when we have a GUI later (conrod I supose) we have just to parse that and write to file when done.

@eddyb
Copy link
Contributor

eddyb commented Jan 27, 2015

If you want config it should be JSON or Toml.

@toqueteos
Copy link
Contributor Author

@eddyb Do we really need that much features for something as simple as...

fullscreen:false
maxFps:60

?

EDIT: Example is a fragment of what's contained on Minecraft's options.txt.

@toqueteos toqueteos changed the title FPS Limit Default FPS Limit Jan 27, 2015
@fenhl
Copy link
Member

fenhl commented Jan 27, 2015

It might not be as simple with future feature additions. +1 for JSON.

@toqueteos
Copy link
Contributor Author

It seems we are aiming for Vanilla compability, supporting same config format would be a good thing. I always have thought of hematite like a replacement of the MC jar.

Also, no matter what you add to settings, a key:value store should do the work. If you require JSON for game settings then something isn't right.

The Borderlands saga allows a lot of customization with config files and it uses key:value. And a ton more games.

I'm not against JSON but it seems an overkill for this. Some structures are not directly parseable JSON->Rust.

Example:

{
    "key": [
        "something", {
            "meh": true
        }
    ]
}

This is already a pain and it's on the Chat datatype used by vanilla MC. It requires parsing field by field explicitly. Not funny.

@bvssvni
Copy link
Member

bvssvni commented Jan 28, 2015

What about Toml? It looks pretty while still being flexible.

@indiv0
Copy link
Member

indiv0 commented Jan 28, 2015

I think Toml would be a good choice, but @toqueteos brought up a good point:

How could we be a perfect replacement for the MC jar if we already can't parse some of the config to rust data structures?

@bvssvni
Copy link
Member

bvssvni commented Jan 28, 2015

Then I agree with @toqueteos . Let's go for a perfect replacement!

@toqueteos
Copy link
Contributor Author

That's what I thought guys, maybe you had another goals for the project. I'm the newest addition right? You can blame me for free.

@lily-mara
Copy link

I actually came here to suggest the same thing, I tried running hematite, and it consumed all of my cpu power and hung up my display. Before it crashed my system, the window title said that I was getting over 1200 FPS.

@toqueteos
Copy link
Contributor Author

@natemara As a temporal fix you can:

  1. Change this line of code https://github.com/PistonDevelopers/hematite/blob/master/src/main.rs#L188 to a more reasonable value.
  2. Or use external software to limit FPS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants