Late game lag
Moderators: firepowerjohan, rkr1958, Happycat, Slitherine Core
-
- General - Carrier
- Posts: 4745
- Joined: Sun Jul 08, 2007 4:13 pm
- Location: Oslo, Norway
Late game lag
I noticed in some games I got for bugproofing that there were some lag (1-2 seconds) from you click on a move destination hex to the time the unit starts moving. It seems the later the game has progressed the bigger the lag. E. g. you might expect 1 second lag in a 1942 game and a 2 second lag in a 1944 game.
If you start a new game from 1944 you will not see the lag.
I would like to hear if you have also experienced this lag?
If yes, then when did the lag start to occur? Are you playing PC vs PC, MAC vs MAC or PC vs MAC? How long is the lag? What is the current turn?
If no, then what is the current turn?
If you start a new game from 1944 you will not see the lag.
I would like to hear if you have also experienced this lag?
If yes, then when did the lag start to occur? Are you playing PC vs PC, MAC vs MAC or PC vs MAC? How long is the lag? What is the current turn?
If no, then what is the current turn?
Re: Late game lag
I confirm that. I am around turn 50 and I say the lag is 1-2 seconds (i click several times). I notice java exceptions in the cmd box.
Never in the field of human conflict was so much owed by so many to so few.
-
- Captain - Heavy Cruiser
- Posts: 928
- Joined: Fri Oct 03, 2008 12:38 am
- Location: Connecticut, USA
Re: Late game lag
I notice the same thing.
-
- General - Carrier
- Posts: 4745
- Joined: Sun Jul 08, 2007 4:13 pm
- Location: Oslo, Norway
Re: Late game lag
Is it the same in the vanilla game?
-
- General - Carrier
- Posts: 4745
- Joined: Sun Jul 08, 2007 4:13 pm
- Location: Oslo, Norway
Re: Late game lag
If you get java exceptions then it's good to see the messages so we can use them to debug. Sending a save game will help too.
I'm not sure what causes this, but wonder if it has something to do with eliminated units. The units are actually not eliminated, but moved to hex -1 and thus out of play. Maybe it takes a lot of extra time to scan through a lot of invalid units before you can use the real units? I'm not sure.
All I remember is when I decided to alter the delete code so the units were completely destroyed we got the bug where units weren't able to move due to pointers becoming offset.
Should we try to look into this or just release as is? Slitherine has finally said they can start on the installer next week.
Searching for such a bug can take quite some time and will require testing. We might not even find it at all. Maybe the best solution is to release what we have and let Ronnie and I look for a solution to this lag and then post a patch to the public with the fixed file. Then we can just use it within the beta group when we have the solution so it becomes bug free.
It may be we don't find the cause of this problem. There is a reason why few games are made in Java (memory leaks etc.). If you look at the save game at the end you see that it's quite a bit bigger than the start save game. So I wonder if garbage is stored turn after turn taking it longer to read etc.
I'm not sure what causes this, but wonder if it has something to do with eliminated units. The units are actually not eliminated, but moved to hex -1 and thus out of play. Maybe it takes a lot of extra time to scan through a lot of invalid units before you can use the real units? I'm not sure.
All I remember is when I decided to alter the delete code so the units were completely destroyed we got the bug where units weren't able to move due to pointers becoming offset.
Should we try to look into this or just release as is? Slitherine has finally said they can start on the installer next week.
Searching for such a bug can take quite some time and will require testing. We might not even find it at all. Maybe the best solution is to release what we have and let Ronnie and I look for a solution to this lag and then post a patch to the public with the fixed file. Then we can just use it within the beta group when we have the solution so it becomes bug free.
It may be we don't find the cause of this problem. There is a reason why few games are made in Java (memory leaks etc.). If you look at the save game at the end you see that it's quite a bit bigger than the start save game. So I wonder if garbage is stored turn after turn taking it longer to read etc.
-
- Sergeant First Class - Elite Panzer IIIL
- Posts: 419
- Joined: Thu Jan 15, 2009 5:51 pm
- Location: Hyattsville, Maryland USA
Re: Late game lag
My Take? It's a minor irritation at best - I say "RELEASE THE HOUNDS!"Stauffenberg wrote:If you get java exceptions then it's good to see the messages so we can use them to debug. Sending a save game will help too.
I'm not sure what causes this, but wonder if it has something to do with eliminated units. The units are actually not eliminated, but moved to hex -1 and thus out of play. Maybe it takes a lot of extra time to scan through a lot of invalid units before you can use the real units? I'm not sure.
All I remember is when I decided to alter the delete code so the units were completely destroyed we got the bug where units weren't able to move due to pointers becoming offset.
Should we try to look into this or just release as is? Slitherine has finally said they can start on the installer next week.
Searching for such a bug can take quite some time and will require testing. We might not even find it at all. Maybe the best solution is to release what we have and let Ronnie and I look for a solution to this lag and then post a patch to the public with the fixed file. Then we can just use it within the beta group when we have the solution so it becomes bug free.
It may be we don't find the cause of this problem. There is a reason why few games are made in Java (memory leaks etc.). If you look at the save game at the end you see that it's quite a bit bigger than the start save game. So I wonder if garbage is stored turn after turn taking it longer to read etc.
Jay
Re: Late game lag
Confirm aswell - see this no matter how "fast" hardware is.
Re: Late game lag
I think the reality is that we've taken this fan based, and free, expansion as far as we can given the java game engine. To take it any further (besides patches) will, I think, require that it be turned over to the professionals.Plaid wrote:Confirm aswell - see this no matter how "fast" hardware is.
-
- Captain - Heavy Cruiser
- Posts: 928
- Joined: Fri Oct 03, 2008 12:38 am
- Location: Connecticut, USA
Re: Late game lag
Good point. I've learned to live with the lag. It's a minor irritant; turns just take longer.rkr1958 wrote:I think the reality is that we've taken this fan based, and free, expansion as far as we can given the java game engine. To take it any further (besides patches) will, I think, require that it be turned over to the professionals.
Re: Late game lag
I'm in a game now where this lag is a good 5 to 7 seconds (between selecting a hex to move to and when the unit moves). It's almost unbearable and I think it needs to be address; either in the upcoming release or, at worse, in an immediate patch right after release.joerock22 wrote:Good point. I've learned to live with the lag. It's a minor irritant; turns just take longer.rkr1958 wrote:I think the reality is that we've taken this fan based, and free, expansion as far as we can given the java game engine. To take it any further (besides patches) will, I think, require that it be turned over to the professionals.
The problem is we haven't found the root cause, which makes fixing it a bit of an issue.
-
- General - Carrier
- Posts: 4745
- Joined: Sun Jul 08, 2007 4:13 pm
- Location: Oslo, Norway
Re: Late game lag
We wonder if the problem is mostly in cross PC / MAC games. We therefore want you to comment on the la in games you have played till at least 1943.
Please answer these questions
1. Current game turn
2. Average lag time from clicking on a unit destination hex until the unit moves
3. Axis player PC or MAC
4. Allied player PC or MAC
Please answer these questions
1. Current game turn
2. Average lag time from clicking on a unit destination hex until the unit moves
3. Axis player PC or MAC
4. Allied player PC or MAC
-
- Sergeant First Class - Panzer IIIL
- Posts: 365
- Joined: Mon Aug 16, 2010 12:43 am
Re: Late game lag
I'm on a mac (allies) vs Axis (pc). I find the game takes a longer time to load when I first open my turn, and I need to wait especially before I can change the zoom and move around to check things out. But it's tolerable and once sorted out, subsequently there's no delay at all between clicking and moving units.
-
- General - Carrier
- Posts: 4745
- Joined: Sun Jul 08, 2007 4:13 pm
- Location: Oslo, Norway
Re: Late game lag
How far in the game have you come?
Re: Late game lag
I found the cause and a workaround to the time lag! I'm playing on an older computer and the time lag I was seeing was 10 to 15-seconds in one of my games in 1943. I had to reform my defensive line a bit further to the west in Russia and it took me 10-minutes to move my units! This wasn't thinking about anything; this was 10-minutes to move units after I had decided to move them all west. I would clicking on a unit, then click on a hex to move to, and wait 10 to 15-seconds for that unit to move! I was getting so frustrated that I knew this had to be addressed.
The cause of this is a check on whether or not a given faction's oil level is low, and if so by determined by the game, a message to this effect would be shown to the player. Personally, I have seen this message as both the axis and allies when my oil stockpiles were rather healthy. And personally, I keep track of my own oil level and really don't pay this message any attention. This check serves no other purpose than to alert the player when the game thinks their oil levels are getting low. My disabling this message, I completely eliminated the lag and now my units move like they should when I select a hex for them to move to.
While no means official, I'm proposing that this check be disabled in GSv2.10, which eliminates the lag. I can make this game.class file available (PC only for now) for those folks experiencing a lag and would like to try it out.
The cause of this is a check on whether or not a given faction's oil level is low, and if so by determined by the game, a message to this effect would be shown to the player. Personally, I have seen this message as both the axis and allies when my oil stockpiles were rather healthy. And personally, I keep track of my own oil level and really don't pay this message any attention. This check serves no other purpose than to alert the player when the game thinks their oil levels are getting low. My disabling this message, I completely eliminated the lag and now my units move like they should when I select a hex for them to move to.
While no means official, I'm proposing that this check be disabled in GSv2.10, which eliminates the lag. I can make this game.class file available (PC only for now) for those folks experiencing a lag and would like to try it out.
Re: Late game lag
This change and no more lag is such a breath of fresh air. The game plays like it should. The lag had slowed it down such much for me that playing my turn had become chore; now it's fun again! It's only after this fix that I now realize how much of a burdened the lag was putting on my play.
The funny this is that the culprit is from the vanilla game in which every time a unit is moved a check is made whether or not to display a low oil warning message. The check served no other purpose and disabling both the check and message removes the lag.
The funny this is that the culprit is from the vanilla game in which every time a unit is moved a check is made whether or not to display a low oil warning message. The check served no other purpose and disabling both the check and message removes the lag.
-
- Senior Corporal - Ju 87G
- Posts: 80
- Joined: Sat Jan 02, 2010 11:35 pm
Re: Late game lag
Well done! I think it makes a lot of sense to just disable the check. I never noticed this delay in the vanilla game, maybe it became more of an issue with the increased functionality of later versions?rkr1958 wrote:This change and no more lag is such a breath of fresh air. The game plays like it should. The lag had slowed it down such much for me that playing my turn had become chore; now it's fun again! It's only after this fix that I now realize how much of a burdened the lag was putting on my play.
The funny this is that the culprit is from the vanilla game in which every time a unit is moved a check is made whether or not to display a low oil warning message. The check served no other purpose and disabling both the check and message removes the lag.
Re: Late game lag
Check could be moved to the beginning of the turn. Interesting that it took so long on your computer anyway.
Never in the field of human conflict was so much owed by so many to so few.
-
- Captain - Heavy Cruiser
- Posts: 928
- Joined: Fri Oct 03, 2008 12:38 am
- Location: Connecticut, USA
Re: Late game lag
Great job with this fix, Ronnie. But I have a problem. I am unable to end my turns with the new game.class file. It just hangs after the partisans appear. Here is a screenshot of java showing the error message.
Once I switched back to the old game.class file (with lag), I was able to end my turns fine. Is anyone else having this problem?
I don't know how to read this, so I have no idea if the root cause is with the game.class file or some kind of relationship between files. All I know is that it works with the old game.class and fails with the new one.
Once I switched back to the old game.class file (with lag), I was able to end my turns fine. Is anyone else having this problem?
I don't know how to read this, so I have no idea if the root cause is with the game.class file or some kind of relationship between files. All I know is that it works with the old game.class and fails with the new one.
Re: Late game lag
Joe, can you email the turn and your password and I'll give it a look. Wait ... are you playing with a version that's fully update to date or is this from your game against Morris with an older version? If the latter, then that's the issue; the game.class if only for the latest version.joerock22 wrote:Great job with this fix, Ronnie. But I have a problem. I am unable to end my turns with the new game.class file. It just hangs after the partisans appear. Here is a screenshot of java showing the error message.
Once I switched back to the old game.class file (with lag), I was able to end my turns fine. Is anyone else having this problem?
I don't know how to read this, so I have no idea if the root cause is with the game.class file or some kind of relationship between files. All I know is that it works with the old game.class and fails with the new one.
Re: Late game lag
Joe,
Sorry. I know what's going on. There's a final patch that we've not released yet that includes a minor update at the end of the turn. It had to do with correcting a minor issue where a player could gleam some information about his opponent if he has the right thing selected (can't remember exactly what it was; but he could see things when the turn ended that should have been shrouded by the fog of war). I've sent the latest (last patch) that has this change and now everything should work.
Sorry. I know what's going on. There's a final patch that we've not released yet that includes a minor update at the end of the turn. It had to do with correcting a minor issue where a player could gleam some information about his opponent if he has the right thing selected (can't remember exactly what it was; but he could see things when the turn ended that should have been shrouded by the fog of war). I've sent the latest (last patch) that has this change and now everything should work.