Comments (9)
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.
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.
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
- 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
- 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.
Frame rate limiting is already in effect, fyi
from unciv.
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.
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.
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.
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.
This issue was closed because it has been stalled for 5 days with no activity.
from unciv.
Related Issues (20)
- BUG: all units appear in Nation Civilipedia
- Some TerrainFeature can be removed without its tech HOT 1
- Game crash HOT 3
- Declaring war with open borders HOT 1
- City overview not updating when city properties are changed from within overview HOT 2
- Feature request: Make XP for promotion programmable HOT 1
- Feature request: Make circular technology better HOT 3
- Developer console fails to show possible options
- Unrecoverable error
- ConcurrentModificationException in automation - SOLVED 4.13.3 HOT 1
- Add Swedish Language HOT 1
- Feature request: Consider changing autoAssignCityProduction default to false HOT 3
- Great prophet purshased with faith will have civ founding religion instead of city religion HOT 3
- Remove misleading warning dialog when purchase a great prophet in a city that doesn't follow civ founded religion
- some of citties didnt demand resources for celebarating we love the king day HOT 6
- Feature request: Change Carthage Nation Entry For Localization HOT 3
- Happiness of buildings from policies is handled differently HOT 1
- Resource density in editor on Android failing HOT 4
- Is this expected behaviour?
- City map is dark during WLTK HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unciv.