Coder Social home page Coder Social logo

FPS cap about unciv HOT 9 CLOSED

trudnorx avatar trudnorx commented on September 13, 2024
FPS cap

from unciv.

Comments (9)

SeventhM avatar SeventhM commented on September 13, 2024

Maybe I'm overreacting, maybe another dev will come and correct me but uh...

What the hell do you need an fps cap for? This is a 2d game that typically displays a flat screen. I wouldn't be surprised if it often is running at less than a frame per second. Is this an AI post or something real?

Now... Some optimization for ram or cpu usage I'd understand, but gpu usage should rarely be a factor

from unciv.

trudnorx avatar trudnorx commented on September 13, 2024

Game runs at unlimited FPS, therefore stressing GPU at very high levels even if the graphics the game draws are simple.
Need for FPS cap does not depend on graphical complexity.

from unciv.

SeventhM avatar SeventhM commented on September 13, 2024

So a quick double check on a machine with integrated graphics (Intel i5 10210U)
Building Unciv in Android Studio (more or less the control situation): about 2% gpu usage
Sitting on the main screen: a worrying 20% usage
New game screen: 2% usage
World screen of a new game: 30% usage immediately which drops to 2% usages. It rapidly increases to 20-30% when there's a screen update

Again, not my area of expertise, but it seems like

  1. Redrawing the world screen is surprisingly expensive (though I doubt is stressing things nearly as much as this issue implies). Probably worth looking into where to optimize
  2. The main screen does seem to redraw the world screen rapidly

Game runs at unlimited FPS, therefore stressing GPU at very high levels even if the graphics the game draws are simple. Need for FPS cap does not depend on graphical complexity.

2d graphics isn't a new concept. How to optimize it isn't that difficult and it shouldn't be expected that a frame limit would do... Anything. Typically, if you're sitting on a flat screen, most of the time most of the screen shouldn't even redraw with a particularly good graphics engine. Again. I'd bet in an actual game, you're often not getting too much more than 5 fps despite not having a frame cap because there's no reason the game would update the screen. An fps cap sounds extremely redundant in these cases. If this was a 2d game with constant movement (say, a platformer, or so), this might be a more notable concern. But this is a game where there shouldn't be an expectation that any screen updates more than once a second unless you're scrolling rapidly

from unciv.

yairm210 avatar yairm210 commented on September 13, 2024

Frame rate limiting is already in effect, fyi

from unciv.

yairm210 avatar yairm210 commented on September 13, 2024

Main screen at 20% - hmm, could be due to fade-in and face-out, we switch maps every X second to make things interesting

from unciv.

SeventhM avatar SeventhM commented on September 13, 2024

Main screen at 20% - hmm, could be due to fade-in and face-out, we switch maps every X second to make things interesting

Probably, though it seems to stay steady at that percentage which implies we're doing redraws even when we aren't fading

from unciv.

SomeTroglodyte avatar SomeTroglodyte commented on September 13, 2024

Gdx always runs on a loop re-rendering everything - it's here. On 'roid, it's different, but similar - there's gotta be somewhere where the Gdx Runnables are managed and the main render method is called...

Frame rate limiting is already in effect

Exactly - can be read at that first link. IIRC, you can't even turn it off to more than 60fps, but I may be wrong.

Yes, mapgen might be what eats cycles - but I suspect OpenGL forced to software rendering. Can we test that? Do we have something or could do something in SytemUtils.getSystemInfo()?

from unciv.

github-actions avatar github-actions commented on September 13, 2024

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.

from unciv.

github-actions avatar github-actions commented on September 13, 2024

This issue was closed because it has been stalled for 5 days with no activity.

from unciv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.