kyle9217 Posted January 27, 2013 Author Share Posted January 27, 2013 **(solved! for some reason this problem only existed it the server was run on windows xp, tested on windows 7 it worked normal)**OK not sure where to start to fix this so i will describe it.when there are multiple people on the same map the person with the highest index number has no lag while everyone with lower index numbers lag, the lag is more of a spike where people move for a sec then it freezes then 3 seconds later it updates everything at once then freezes again and so on.while the person with the highest index moves there is no lag for anyone else, but as soon as he stops moving it lags again.I have tested this locally on 2 computers, and over the internet with 3 other people. and the same problems existis there a way to have the client send information even though the person is not moving, to remove the lag for everyone else?**HAPPENS ON: EA, EO2.0, And 3.0**[media]http://www.youtube.com/watch?feature=player_embedded&v=7NSOPTlOnO0[/media][media]http://youtu.be/yeMTwR2_t1I[/media] Link to comment Share on other sites More sharing options...
tracker97 Posted January 27, 2013 Share Posted January 27, 2013 Change your index number so that they each have the same index number you can do that in vb6 Link to comment Share on other sites More sharing options...
JohnPony Posted January 27, 2013 Share Posted January 27, 2013 > Change your index number so that they each have the same index number you can do that in vb6Don't post if you have no idea what you're talking about. Link to comment Share on other sites More sharing options...
Guest Posted January 27, 2013 Share Posted January 27, 2013 > Change your index number so that they each have the same index number you can do that in vb6What the hell… Link to comment Share on other sites More sharing options...
Matt Posted January 27, 2013 Share Posted January 27, 2013 > Change your index number so that they each have the same index number you can do that in vb6Oh my goodness… That would screw everything up. Its extremely vital that each online player has a different index number. Please don't post advice about something you don't fully understand. Link to comment Share on other sites More sharing options...
Ryo Posted January 27, 2013 Share Posted January 27, 2013 Hhhh that made my day XDAnyway on topic, can you please post your serverloop if you changed it(or changed the subs it calls)? so we may help you, Link to comment Share on other sites More sharing options...
kyle9217 Posted January 27, 2013 Author Share Posted January 27, 2013 heres my loop```Sub ServerLoop() Dim BuffTimer As Long Dim i As Long, x As Long Dim Tick As Long, TickCPS As Long, CPS As Long, FrameTime As Long Dim tmr25 As Long, tmr500 As Long, tmr1000 As Long, tmr5000 As Long Dim LastUpdateSavePlayers, LastUpdateMapSpawnItems As Long, LastUpdatePlayerVitals As Long Dim PT100 As Long Dim ML As Long ServerOnline = True Do While ServerOnline Tick = GetTickCount ElapsedTime = Tick - FrameTime FrameTime = Tick If Tick > tmr25 Then For i = 1 To Player_HighIndex If IsPlaying(i) Then ' check if they've completed casting, and if so set the actual spell going If TempPlayer(i).spellBuffer.Spell > 0 Then If GetTickCount > TempPlayer(i).spellBuffer.Timer + (Spell(Player(i).Spell(TempPlayer(i).spellBuffer.Spell)).CastTime * 1000) Then CastSpell i, TempPlayer(i).spellBuffer.Spell, TempPlayer(i).spellBuffer.Target, TempPlayer(i).spellBuffer.tType TempPlayer(i).spellBuffer.Spell = 0 TempPlayer(i).spellBuffer.Timer = 0 TempPlayer(i).spellBuffer.Target = 0 TempPlayer(i).spellBuffer.tType = 0 End If End If ' check if need to turn off stunned If TempPlayer(i).StunDuration > 0 Then If GetTickCount > TempPlayer(i).StunTimer + (TempPlayer(i).StunDuration * 1000) Then TempPlayer(i).StunDuration = 0 TempPlayer(i).StunTimer = 0 SendStunned i End If End If ' check regen timer If TempPlayer(i).stopRegen Then If TempPlayer(i).stopRegenTimer + 5000 < GetTickCount Then TempPlayer(i).stopRegen = False TempPlayer(i).stopRegenTimer = 0 End If End If ' HoT and DoT logic For x = 1 To MAX_DOTS HandleDoT_Player i, x HandleHoT_Player i, x Next End If UpdateEventLogic Next frmServer.lblCPS.Caption = "CPS: " & Format$(GameCPS, "#,###,###,###") tmr25 = GetTickCount + 50 End If If Tick > BuffTimer Then For i = 1 To Player_HighIndex For x = 1 To 10 If TempPlayer(i).BuffTimer(x) > 0 Then TempPlayer(i).BuffTimer(x) = TempPlayer(i).BuffTimer(x) - 1 If TempPlayer(i).BuffTimer(x) = 0 Then TempPlayer(i).Buffs(x) = 0 End If End If Next Next BuffTimer = GetTickCount + 1000 End If ' Check for disconnections every 30 second If Tick > tmr5000 Then For i = 1 To MAX_PLAYERS If GetPlayerVital(i, Vitals.HP) = GetPlayerMaxVital(i, HP) Then If frmServer.Socket(i).State > sckConnected Then Call CloseSocket(i) End If End If Next UpdateMapLogic tmr5000 = GetTickCount + 30000 End If If Tick > tmr1000 Then If isShuttingDown Then Call HandleShutdown End If tmr1000 = GetTickCount + 1000 End If If Tick > PT100 Then For i = 1 To Player_HighIndex If IsPlaying(i) Then For x = 1 To MAX_PLAYER_PROJECTILES If TempPlayer(i).ProjecTile(x).Pic > 0 Then ' handle the projec tile HandleProjecTile i, x End If Next End If PT100 = GetTickCount + 50 Next End If ' Checks to update player vitals every 15 seconds - Can be tweaked If Tick > LastUpdatePlayerVitals Then UpdatePlayerVitals LastUpdatePlayerVitals = GetTickCount + 15000 End If ' Checks to spawn map items every 5 minutes - Can be tweaked If Tick > LastUpdateMapSpawnItems Then UpdateMapSpawnItems LastUpdateMapSpawnItems = GetTickCount + 300000 End If ' Checks to save players every 5 minutes - Can be tweaked If Tick > LastUpdateSavePlayers Then UpdateSavePlayers LastUpdateSavePlayers = GetTickCount + 300000 End If If Tick > ML Then UpdateMapLogic ML = GetTickCount + 300 End If If Not CPSUnlock Then Sleep 1 DoEvents ' Calculate CPS If TickCPS < Tick Then GameCPS = CPS TickCPS = Tick + 1000 CPS = 0 Else CPS = CPS + 1 End If LoopEnd Sub``` Link to comment Share on other sites More sharing options...
blkcrow Posted January 27, 2013 Share Posted January 27, 2013 hmmm lets see if i get this right the time you tested it you had 5 people online 2 of those were connected to the server over a lan network while the other 3 over the internet. Have you checked the ping the players are getting the 2 players connected over lan shouldnt have high ping so it might be only a coincidence that the player with the highest index is one of the 2 players connected over lan. Whats the internet speed in the pc you are hosting your server also are you running your server though the exe or though the IDE (vb6)? Link to comment Share on other sites More sharing options...
kyle9217 Posted January 27, 2013 Author Share Posted January 27, 2013 ok ill try to explain this the best i canwhen there is 2 or more people on the server at once, the player with the highest index value will have no lag.when the player with the highest index does not move npc will not move and damage will not show on lower index players screens, but the high index players game will run like normalwhen the player with the highest index moves then it will update all other players npc locations and battle dmg will appear, as long as the high index player moves the game seems normal to lower index playersso if the high index player dosnt move its like all the lower index players games are frozen except they can still walk around.here is a video of me trying to explain ans show you the problem [http://www.youtube.com/watch?v=7NSOPTlOnO0&feature=youtu.be](http://youtu.be/7NSOPTlOnO0) Link to comment Share on other sites More sharing options...
GrimReaperReborn Posted January 27, 2013 Share Posted January 27, 2013 It looks like the map update is not sent after the NPC moves to ALL the players on the map. You said you tested this on the other versions of eclipse, how did it go? Link to comment Share on other sites More sharing options...
kyle9217 Posted January 28, 2013 Author Share Posted January 28, 2013 ill upload a video of my findings here in a sec but it went the same, even over the internet, i used a fresh copy of EA to test it[media]http://youtu.be/yeMTwR2_t1I[/media] Link to comment Share on other sites More sharing options...
Matt Posted January 28, 2013 Share Posted January 28, 2013 i found this issue in Eclipse Origins 2.0 as well. I'm going to look into this. Link to comment Share on other sites More sharing options...
Ryo Posted January 28, 2013 Share Posted January 28, 2013 You re updating maplogic twice every 30seconds and every 0,3sec why? Link to comment Share on other sites More sharing options...
kyle9217 Posted January 28, 2013 Author Share Posted January 28, 2013 yo i was but it has nothing to do with the issue, i was testing somthing Link to comment Share on other sites More sharing options...
Matt Posted January 28, 2013 Share Posted January 28, 2013 > You re updating maplogic every 30seconds U_u``` ' Check for disconnections every half second If Tick > tmr500 Then For i = 1 To MAX_PLAYERS If frmServer.Socket(i).state > sckConnected Then Call CloseSocket(i) End If Next UpdateMapLogic tmr500 = GetTickCount + 500 End If``` Link to comment Share on other sites More sharing options...
Ryo Posted January 28, 2013 Share Posted January 28, 2013 change this[background=rgb(248, 248, 248)]' Check for disconnections every 30 second[/background]If Tick > tmr5000 ThenFor i = 1 To MAX_PLAYERSIf GetPlayerVital(i, Vitals.HP) = GetPlayerMaxVital(i, HP) ThenIf frmServer.Socket(i).State > sckConnected ThenCall CloseSocket(i)End IfEnd IfNextUpdateMapLogictmr5000 = GetTickCount + 30000End Ifto ' Check for disconnections every half secondIf Tick > tmr500 ThenFor i = 1 To MAX_PLAYERSIf frmServer.Socket(i).State > sckConnected ThenCall CloseSocket(i)End IfNextUpdateMapLogictmr500 = GetTickCount + 500End Ifand deleteIf Tick > ML ThenUpdateMapLogicML = GetTickCount + 300End Ifsent from mobile check the synthax. Link to comment Share on other sites More sharing options...
kyle9217 Posted January 28, 2013 Author Share Posted January 28, 2013 as i said that dosnt fix the problem and i already put it back to that. Link to comment Share on other sites More sharing options...
Ryo Posted January 28, 2013 Share Posted January 28, 2013 send me the source in a mp (client+server)i'll debug it for you as soon as i can Link to comment Share on other sites More sharing options...
kyle9217 Posted January 28, 2013 Author Share Posted January 28, 2013 its not just my client and server, its all E2.0 EA E3.0 the problem happens in all versions, download a fresh copy and test it. Link to comment Share on other sites More sharing options...
kyle9217 Posted January 28, 2013 Author Share Posted January 28, 2013 Here is the same problem on EO 2.0 Fresh Copy[media]http://youtu.be/sAlGpqAXzwo[/media] Link to comment Share on other sites More sharing options...
kyle9217 Posted January 28, 2013 Author Share Posted January 28, 2013 its funny that this is a major issue with Eclipse an no one has seen this and attempted to fix XD Multiplayer is not even possable until this is fixed. Link to comment Share on other sites More sharing options...
Alerd Posted January 28, 2013 Share Posted January 28, 2013 I have same problem ;]In all version :<[http://www.touchofde…ags#entry502305](http://www.touchofdeathforums.com/community/index.php?/topic/98343-my-fix-for-the-desyncing-problem/page__hl__lags#entry502305)Fix for Eclipse Stable Link to comment Share on other sites More sharing options...
hisherwin Posted January 28, 2013 Share Posted January 28, 2013 Did you try to use more than 1 computer? sure it does lag when you have multiple client open -.- Link to comment Share on other sites More sharing options...
Alerd Posted January 28, 2013 Share Posted January 28, 2013 No , i test on 2 laptop. Link to comment Share on other sites More sharing options...
hisherwin Posted January 28, 2013 Share Posted January 28, 2013 > No , i test on 2 laptop.I don't seem to have those problem at my engine .. i guess it's my host ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now