Comments (6)
Opening a can of worms..
v1: Show blocking popup with our rotationg arrow animation and a cancel button while it does its job
v2: Break it into small, fast (<250ms) steps, drive from WorldScreen.update - if there's autoplay work to do, launch coroutine that does a step and finishes with worldScreen.shouldUpdate = true, possibly some launchOnGLThread stuff to show where something happened
from unciv.
Let's talk about next turn, since it had the same problem
How does next turn work?
- clone game state
- change worldscreen to be "read only" state - players can explore the current world but cannot take action
- process next turn for clone in another thread
- when other thread finishes, replace the world screen
Sounds like you want something similar - only in your case you can replace the world screen on every turn, but keep it "read only"
from unciv.
That is to say - add a onTurnComplete callback parameter to next turn
NextTurn should not be aware of UI directly, it just clones the game state on every turn end and calls the function - which can be on another thread
The latency cost of cloning the game state every turn is the major cost here
from unciv.
The way we made it "read only" in the past was by changing the viewing civ... Could we set the viewing civ to none and set the selected civ to the original civ like in Spectator?
The spectator needs to view each civ as if they were them without being able to modify them. We might be able to reuse this to apply the locking mechanism.
from unciv.
No, we just set isPlayersTurn to false
from unciv.
Why did I not realize this? AutoPlay already does that in order to lock the screen.
from unciv.
Related Issues (20)
- Promotion crash HOT 3
- Wrong city-state shown in notification log after being destroyed HOT 11
- Automated units and actions HOT 12
- Start new game issues - e.g. Map Type selection sometimes fails HOT 1
- Technology cost discrepancy HOT 5
- éČăăȘă
- RFC: Telling stories - Ideas and related observations HOT 3
- Units without vision cannot be seen when moved into the fog HOT 2
- Game crash on starting new game after deleting mod HOT 20
- Feature request: Put resource point value for worker tile improvement priority in the settings. HOT 1
- Countable scopes approach decision HOT 6
- "Open terrain" goes wrong HOT 2
- Workers don't build roads. HOT 3
- Unable to decide what to do with a city HOT 9
- I can't connect to multiplayer HOT 3
- Simultaneous determination a tile HOT 3
- Declaration of war bug HOT 8
- Translating site bug HOT 4
- Air units no longer show attack and move range HOT 10
- Feature INQUIRY: AI's predisposition on SAM's HOT 1
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.