[0.24][HANGUP]Game freezes on loading

Saved game. Reload. Progress bar crawls and finally freezes.

debug.err extract:

Debug Message:  Stamp Quantity: 13
Debug Message:  Land Mass Size: 10
Debug Message:  Land Mass Min Spawns: 4
Debug Message:  Land Mass Max Spawns: 8
Debug Message:  Forest Quantity: 5
Debug Message:  Mountain Generation Option: 1
Debug Message:  Map Random Seed: 1254426637
Debug Message:  ---------------------------------------------
Debug Message:  ---------------------------------------------
Debug Message:  Map Size:
Debug Message:      Sectors: 9 x 7
Debug Message:      Tiles: 144 x 112
Debug Message:  Tile Vertex Resolution: 3 x 3 vertices
Debug Message:  ERROR: NO LAND TERRAIN TYPES. ABORTING MAP GENERATION
Debug Message:  Creating terrain objects...
Debug Message:  Terrain objects created.
Debug Message:  Placing random goodie huts...
Debug Message:  Placing random elemental shards...
Debug Message:  Placing random resources...
Debug Message:  InitMapGfx Started...
Debug Message:  InitMapGfx finished.
DebugMessage:  Updating ZOC.
Debug Message:  Creating terrain gfx...
Debug Message:  InitMapGfx Started...
Debug Message:  FinishInitMapGfx started.
Debug Message:  FinishInitMapGfx finished.
DebugMessage:  WM_CLOSE message received.

 

I'd like to ask whether you plan to regenerate the map on reload or to save the map as a set of tiles and reload that in the long run? I hope the former is only temporary since I can't see how editing the world could be done otherwise.

1,131 views 6 replies
Reply #1 Top

Post the whole debug at pastebin if you still have it

Reply #2 Top

I get a ctd when loading a game immediately after the game starts.  When I start a new game, then go to the main menu, then try to load a game, I get the loading world screen and the progress bar slowly inches across the screen as LDiCesare reports.

LDiCesare: did you load a game right away? Or did you start another game first?

My debug.err looks very much like yours.

(btw, editing the world could be done by saving the initial seed and a list of changes)

Reply #3 Top

I loaded immediately if I remember well.

Initial seed + list of changes for a map editor where you start by clearing the whole map is not going to be very useful, since the list of changes will be all. Also, it precludes using custom map scripts unless there's version management integrated, and we must hope that the random functions used work equally well on all OS's in case you want to reload your game on another computer.

Reply #4 Top

Does it freeze every time on reload?

I'm not even sure how they plan on doing it, I'm just saying it could be done.  Yes, list of changes is not good for large amounts of changes, but if you just store it as list of changes per grid tile, it's a lot easier.  Don't really understand the custom map script point, sorry.  As for random, if a generator does not give the same sequence of numbers guaranteed with the same initial seed, it's worthless.  Lots of PRG libraries out there, even the C rand() should do it.  They probably use their own generator though.

Reply #5 Top

The C rand() doesn't warrant same results if run on different machines, even with the same seed.

Problems like this caused lots of problems in Civ IV when trying to run MP games on different OSes (usually Vista and XP).

Regarding custom map scripts, consider Civ IV again. Some players designed new map scripts, for instance PerfectWorld. This map script was totally different from the in-game scripts, and redefined random because the game's default random isn't random enough for its purposes. You'd have to know which script was used to generate the map, be sure the computer where you load the game has the same version of the script as the one which was used to generate the map on first time, which means if you want to write a map script you must version it like hell. Of course, custom map scripts may not be in the game, but it would be great if they were.

The hangup isn't systematic, although I systematically crash on first End turn after loading a game.

Reply #6 Top
Right, that does make sense about rand() (just looked up the specs), which is why they use their own random function. I'm not sure why Civ4's PRNG wasn't good enough though, it's not like they were building a statistical simulator or something. Any map script would need to be versioned like crazy, no matter the random generator they used, as any change would change the map. The main reason to use seed+change lists is to keep save file size and save time down to a minimum. It's certainly possible to do, it's just a bit trickier than tile-based systems. On the other hand, they might already be using tile-based system, and the 'generating' being done on game load is simply the generation for all the in-between values, like interpolating height values and such, texture generation, that type of thing.