Goto https://www.stucuk.netGoto https://www.atlanticaonlinewiki.comGoto https://www.game-requirements.com


Menu


It is currently Mon Dec 18, 2017 1:59 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 67 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Little Question for check synchronization system
PostPosted: Sun Apr 10, 2011 7:09 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
Argh, Stu. It now spams that 1 tick is wrong and lasted 0 time.
Even though I synchronized the game back it didn't stop reporting :<


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Sun Apr 10, 2011 7:32 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
Well i don't know how it is meant to respond to your bad code. There is nothing in my code that could cause that behaviour. Only if aSyncLost is false each time its spamming would it do what your saying. So by the sounds of it your getting Failure, Ok, Falure, Ok, Failure, Ok, etc.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Sun Apr 10, 2011 7:35 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
stucuk wrote:
Well i don't know how it is meant to respond to your bad code. There is nothing in my code that could cause that behaviour. Only if aSyncLost is false each time its spamming would it do what your saying. So by the sounds of it your getting Failure, Ok, Falure, Ok, Failure, Ok, etc.

It shouldn't. The code screws it at once and it is preserved so all ticks should be bad then.

Would you kindly re-post the code?

PS: You didn't say what was wrong the last time ;P


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Sun Apr 10, 2011 7:38 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
The im a moron kinda spells out it was a dumb mistake, one which wasn't in any code i posted, it has nothing to do with what your experiencing. Reposting the code is pointless as its practically the same.

Code:
SyncLost := expired or (not chybi and chyba);

    if SyncLost then
    if aSyncLost then
    begin
     if aSyncLastTick <> Tick then
     begin
      Inc(aSyncTicks);
      aSyncLastTick := Tick;

      //DEBUG
      Multi.SendAllChatMsg(Multidef.Players[Multidef.PlayersMyPos].Name + ' Failed Ticks: ' + inttostr(aSyncTicks)+' Time: '+FloatToStrF(aSyncTime,ffFixed,4,4));
      //
     end;

     SyncLostTimer.Refresh;

     //Prevents system freezes/lag from making the frametime too high!
     if SyncLostTimer.FrameTime > 1 then
     SyncLostTimer.FrameTime := 1;

     aSyncTime := aSyncTime + SyncLostTimer.FrameTime;

     if aSyncTime >= 10 then
     chybnymultiplayercrc:=p; //Cause Sync Lost Message!
    end
    else
    begin
     aSyncTicks    := 1;
     aSyncLastTick := Tick;
     aSyncTime     := 0;

     //DEBUG
     Multi.SendAllChatMsg(Multidef.Players[Multidef.PlayersMyPos].Name + ' Failed Ticks: ' + inttostr(aSyncTicks)+' Time: '+FloatToStrF(aSyncTime,ffFixed,4,4));
     //

     SyncLostTimer.Refresh;
    end;

    aSyncLost := SyncLost;

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Sun Apr 10, 2011 7:44 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
Heh, I know this is a stupid thought but what would happen if we split all the check loops into ODD and EVEN?
Maybe control ticks mean something different? Anyway, OW generates more than one message per second.


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Sun Apr 10, 2011 7:48 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
I don't understand...

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Sun Apr 10, 2011 7:50 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
Never mind, I think of some test cases I need to run.

EDIT: I've modified my previous post to be more clear.


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Sun Apr 10, 2011 8:12 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
We have to debug it maximally.
Add printing to chat every time the code reaches this part of code (in front of the first if) so that we could see how many succeed and how many fail to reach the part we need to see working xD


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Mon Apr 11, 2011 8:46 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
I had an idea. Make it so that it has to have 1 second of Sync before it stops the out of sync timer. No clue if there are bugs(more complex code).

Code:
SyncLost := expired or (not chybi and chyba);

    SyncLostTimer.Refresh;

    if aSyncLost[0] and aSyncLost[1] then
    begin
     if not SyncLost then
     begin
      if aSyncLastTick[1] <> Tick then
      begin
       Inc(aSyncTicks[1]);
       aSyncLastTick[1] := Tick;

       //DEBUG
       Multi.SendAllChatMsg(Multidef.Players[Multidef.PlayersMyPos].Name + '(' + IntToStr(Tick)  + ') Good Ticks: ' + inttostr(aSyncTicks[1])+' Time: '+FloatToStrF(aSyncTime[1],ffFixed,4,4));
       //
      end;

      aSyncTime[1] := aSyncTime[1] + SyncLostTimer.FrameTime;

      if aSyncTime[1] >= 1 then
      aSyncLost[0] := False;
     end
     else
     aSyncLost[1] := False;
    end;

    if aSyncLost[0] then
    begin
     if aSyncLastTick[0] <> Tick then
     begin
      Inc(aSyncTicks[0]);
      aSyncLastTick[0] := Tick;

      //DEBUG
      Multi.SendAllChatMsg(Multidef.Players[Multidef.PlayersMyPos].Name + '(' + IntToStr(Tick)  + ') Failed Ticks: ' + inttostr(aSyncTicks[0])+' Time: '+FloatToStrF(aSyncTime[0],ffFixed,4,4));
      //
     end;

     aSyncTime[0] := aSyncTime[0] + SyncLostTimer.FrameTime;

     if aSyncTime[0] >= 10 then
     chybnymultiplayercrc:=p //Cause Sync Lost Message!
     else
     if not SyncLost and not aSyncLost[1] then
     begin
      aSyncLost[1]     := True;
      aSyncTicks[1]    := 1;
      aSyncLastTick[1] := Tick;
      aSyncTime[1]     := 0;
      //DEBUG
      Multi.SendAllChatMsg(Multidef.Players[Multidef.PlayersMyPos].Name + '(' + IntToStr(Tick)  + ') Good Ticks: ' + inttostr(aSyncTicks[1])+' Time: '+FloatToStrF(aSyncTime[1],ffFixed,4,4));
      //

      SyncLostTimer.Refresh;
     end;
    end
    else
    if SyncLost then
    begin
     aSyncTicks[0]    := 1;
     aSyncLastTick[0] := Tick;
     aSyncTime[0]     := 0;
     aSyncLost[0]     := True;

     //DEBUG
     Multi.SendAllChatMsg(Multidef.Players[Multidef.PlayersMyPos].Name + '(' + IntToStr(Tick)  + ') Failed Ticks: ' + inttostr(aSyncTicks[0])+' Time: '+FloatToStrF(aSyncTime[0],ffFixed,4,4));
     //

     SyncLostTimer.Refresh;
    end;

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Mon Apr 11, 2011 8:53 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
kinda helps if i attach the exe.


Attachments:
OwarFull.rar [956.89 KiB]
Downloaded 101 times

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu
Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Mon Apr 11, 2011 8:59 am 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
stucuk wrote:
kinda helps if i attach the exe.

Surely.


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Mon Apr 11, 2011 9:30 am 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
Well, it does better without doubt.
There is always one "good tick" between the bad ones (it's still the same tick number but it tell it's fine LOL).
It seems it compares something different.
We need to investigate it further.

EDIT: In other words, it displays one is bad and the other one is fine every control tick (that is every X game ticks; X is quite random).
EDIT2: Could you make it send the message only to the same player that generates it?


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Mon Apr 11, 2011 11:20 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
All i care about is if it makes it so that your test causes a sync lost and Sali's doesn't. Don't need to waste hundreds of years working out the in's and outs of something if our solution bypasses the problem.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Mon Apr 11, 2011 11:30 am 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
stucuk wrote:
All i care about is if it makes it so that your test causes a sync lost and Sali's doesn't. Don't need to waste hundreds of years working out the in's and outs of something if our solution bypasses the problem.

You don't love OW :<


Top
 Profile  
 
 Post subject: Re: Little Question for check synchronization system
PostPosted: Mon Apr 11, 2011 11:59 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
I just have experience, which tells me that its a waste of time to try and work out how everything in life works. Iv done it in the past and found that you spend hours of your life and learn hardly anything.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 67 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Original War is an RTS / RPG game by Altar Games
Original War Support is not part of Altar Games but is maintaining Original War for Altar Games

Privacy Policy