Move territorial calculations to the init screen
Bug #1818402 reported by
Toni Förster
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
We changed the calculations for woodgnome and especially for territorial for build_20. Currently These calculations are done after the initialization screen. This can result in a black screen for big maps especially on old computers. Currently we handle this by displaying a message to the user, to keep him informed that of what's going on.
Ideally these calculations should be done while the init screen is shown.
We currently have the problem that this increases loading time, since creating the savegames takes longer now.
Related branches
lp://staging/~widelands-dev/widelands/speedup_saveloading
- Toni Förster: Approve
-
Diff: 958 lines (+361/-170)21 files modifieddata/scripting/win_conditions/territorial_functions.lua (+10/-42)
data/scripting/win_conditions/territorial_lord.lua (+5/-3)
data/scripting/win_conditions/territorial_time.lua (+5/-3)
data/scripting/win_conditions/win_condition_functions.lua (+32/-0)
data/scripting/win_conditions/wood_gnome.lua (+13/-39)
src/game_io/game_cmd_queue_packet.cc (+4/-0)
src/logic/game.cc (+5/-1)
src/logic/map.cc (+40/-16)
src/logic/map.h (+26/-5)
src/logic/player.cc (+9/-0)
src/logic/player.h (+5/-0)
src/logic/playercommand.cc (+6/-6)
src/map_io/CMakeLists.txt (+2/-0)
src/map_io/map_saver.cc (+9/-0)
src/map_io/map_wincondition_packet.cc (+75/-0)
src/map_io/map_wincondition_packet.h (+34/-0)
src/map_io/widelands_map_loader.cc (+9/-0)
src/scripting/lua_game.cc (+1/-11)
src/scripting/lua_map.cc (+60/-38)
src/scripting/lua_map.h (+3/-2)
test/maps/lua_testsuite.wmf/scripting/cfield.lua (+8/-4)
To post a comment you must log in.
I have dug into the saveloading code. There are some small tweaks that could be done for some of the packages, but the scripting packet, which is eating up most if the saveloading time on big maps cannot be speeded up because it depends on the Eris backend. We would have to dig into Eris itself.
One final thing we could try is when saveloading the replay writer on game start, to copy over the map file system from the emergency backup rather than creating a new one.