HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Map Initialization before/after load screen

09-24-2009, 09:17 PM#1
marshall
I have my init trigger which does quite a bit of stuff, and it all works fine.

However, all of a sudden, my init code is being executed after the map has loaded - I'm in the game and it is night time, a flame animation appears at the starting point and after about half a second the game freezes for several seconds. Then everything is fine - it's day time, my dialog is shown and all the map init code has definitely taken place.

I thought map init code was supposed to occur during the loading screen???

I know it's the init code because if I pull out about half of the code I am frozen for about half as long.

The problem seems to have started since a patch (although I hadn't patched for some time. I also added a fair bit of code although I haven't been able to identify any of it as a problem). My friend has tried running the map on his PC and has the same problem.

Anyone else experiencing this, or know of anything that would cause map init code to take place after the loading screen has disappeared?

Btw, I'm using plain Jass, no enhancements.
09-24-2009, 09:35 PM#2
Rising_Dusk
It's after the load screen and there's nothing you can really do about it, otherwise it couldn't do the stuff that alters the game state. (As far as I am aware) The only stuff that really takes place during the load time (related to the game state, anyways) is preloading of preplaced units and such. The load screen also obviously initializes terrain and so forth.
09-24-2009, 09:45 PM#3
marshall
Weird that I'd never noticed before then - I hadn't added that much code to init. Unless I've changed some system or other that has caused other code to run more slowly...
09-25-2009, 03:27 AM#4
TheWye
What if you disable the init trigger as soon as it runs?
09-25-2009, 12:04 PM#5
marshall
What would that achieve? The code has to be run, disabling wouldn't stop that initial delay, and once the code has run there's no more problem.

All I can do is try to streamline the code, but I'm curious as to why the problem has suddenly appeared.
09-25-2009, 12:14 PM#6
Rising_Dusk
The "problem" always becomes noticeable for me if I have other programs running in the background of WC3 when I load maps.