Akselj Posted June 3, 2009 Author Share Posted June 3, 2009 Everything here is client-sideIn modGameLogic, in the Dim's in Sub GameLoop add:``` Dim TickMapTracker As Long Dim MapTrackTag As Byte```In the same sub, just under``` ' Check if we need to restore surfaces If NeedToRestoreSurfaces Then DD.RestoreAllSurfaces Call InitSurfaces End If```add:``` If GetTickCount > TickMapTracker + 1000 Then If GettingMap And IsConnected Then If MapTrackTag = 1 Then SendData "refresh" & SEP_CHAR & END_CHAR MapTrackTag = 0 End If MapTrackTag = 1 End If End If```That's it!All credits go to unnown for this fix. I just made the tut.–AkselJ Link to comment Share on other sites More sharing options...
BugSICK Posted June 3, 2009 Share Posted June 3, 2009 what do you mean map freezing? Link to comment Share on other sites More sharing options...
Admiral Refuge Posted June 3, 2009 Share Posted June 3, 2009 @BugSICK:> what do you mean map freezing?There are many times, when you warp (switching maps, or warping in general), the system will freeze up and forever say, "Loading Map" or w/e the switching-map msg says.This is a pretty crippling bug for active games. Link to comment Share on other sites More sharing options...
BugSICK Posted June 3, 2009 Share Posted June 3, 2009 @Admiral:> There are many times, when you warp (switching maps, or warping in general), the system will freeze up and forever say, "Loading Map" or w/e the switching-map msg says.> > This is a pretty crippling bug for active games.hmmmm never encounter that in my game. but i will remember this just incase ^_^.off topic: by the way admiral do you know how to fix this., when i warp/enter a map, the monster are gone. then when i return on the same map nor pressf1 then save, they appeared. Link to comment Share on other sites More sharing options...
Admiral Refuge Posted June 3, 2009 Share Posted June 3, 2009 That's a issue with your map reloading (there use to be a /refresh command, but it's not in there anymore). Link to comment Share on other sites More sharing options...
Richy420Rich Posted June 3, 2009 Share Posted June 3, 2009 It usually happened to me when my characters X-Y position goes offset via the SendPlayerData(index) code. Had to go in and put a hotkey in for /refresh lol cause it happened alot. Link to comment Share on other sites More sharing options...
Zawk Posted June 3, 2009 Share Posted June 3, 2009 Thank you for posting the tut.as for the fix, thanks unnown![Warning - while you were typing 5 new replies have been posted. You may wish to review your post.] Link to comment Share on other sites More sharing options...
damian666 Posted June 3, 2009 Share Posted June 3, 2009 finally ^^thank you both, although i was the one to ask for it >.<On a different note, now if only we can fix the offset bug, seems server cant keep upwith the walking sometimes, anybody has any idea what to do about it?Damian666 Link to comment Share on other sites More sharing options...
Devogen Posted June 18, 2009 Share Posted June 18, 2009 I believe credit should go to correct creator of this, and it is Technorobbo, and it can be found about 3/4 the way down this thread:http://209.85.129.132/search?q=cache:j_4eT4DfFmYJ:www.vbforums.com/showthread.php%3Ft%3D555941+Set+DDSurf+%3D+DD.CreateSurface(DDSD)&cd=3&hl=tr&ct=clnk?=trAs far as I knew, techno was not Unnown…Unfortunately that fix only checks the map has loaded or not, and does not actually resolve the problem. If the fix I gave Nikkos works, then it resolves the issue without the need for a timer or more than 2-3 lines of code.My fix works for me, and if it works for him also it may be a better solution, but time will tell. Link to comment Share on other sites More sharing options...
Akselj Posted June 18, 2009 Author Share Posted June 18, 2009 I can't seem to find that fix there… Link to comment Share on other sites More sharing options...
Sowtis Posted June 18, 2009 Share Posted June 18, 2009 I've had this happen to me a couple times, but not with your "Fixed" Eclipse. :azn: Link to comment Share on other sites More sharing options...
Akselj Posted June 18, 2009 Author Share Posted June 18, 2009 Happy to hear that :cheesy: Link to comment Share on other sites More sharing options...
Devogen Posted June 18, 2009 Share Posted June 18, 2009 @AkselJ:> I can't seem to find that fix there…change one word in the coding ;) Link to comment Share on other sites More sharing options...
Akselj Posted June 18, 2009 Author Share Posted June 18, 2009 Well, what if I say unnown wrote the same thing? He might have, just because there is some code out there that is about the same it doesn't mean it isn't unnowns work cuz unnown as I know him isn't a thief. Link to comment Share on other sites More sharing options...
Alster Posted June 18, 2009 Share Posted June 18, 2009 True, codes may be the same but it doesn't mean they're stolen.True, Unknown doesn't steal. Link to comment Share on other sites More sharing options...
Robin Posted June 18, 2009 Share Posted June 18, 2009 This isn't really a fix >_>You're not fixing the actual problem which causes the freezing, you're just checking if it takes more than a second for the map to download, then automatically switching it off.If your server has shit upload speeds, and/or the map is horribly big, then you're gonna cause more problems than fix. Link to comment Share on other sites More sharing options...
Akselj Posted June 18, 2009 Author Share Posted June 18, 2009 I don't know how to fix it then… I got it from unnown Link to comment Share on other sites More sharing options...
balliztik1 Posted June 18, 2009 Share Posted June 18, 2009 @Crimson:> True, codes may be the same but it doesn't mean they're stolen.The variables are named MapTrackTag and MapTracker.Tag. I could understand if it was "x" or "y", but names that close don't appear much. Unless Unnown is this guy, which I doubt (Unnown's not from Chicago), then yes, it is likely a copy. However, Unnown still modified it for Eclipse. It's likely that he could've found that code a while back, modified it, and told AkselJ the reworked code when he asked.But that's not even the real issue, though I'll have to ask you to contact Unnown about the source of this fix, or we'll have to remove it for plagiarism, as much as I don't want to. The real issue, though, is fixing the problems with the maps being sent over. This, for me, only happens when the player's client is out of sync with the server, and this happens usually when another player enters a map. Maybe a refresh is needed upon other players entering. I'll check it out and see what I can come up with. Link to comment Share on other sites More sharing options...
Admiral Refuge Posted June 18, 2009 Share Posted June 18, 2009 @♪♫♪:> This, for me, only happens when the player's client is out of sync with the server, and this happens usually when another player enters a map. Maybe a refresh is needed upon other players entering. I'll check it out and see what I can come up with.Yes, that's the real issue.I usually just solve it by using a "Call PlayerWarp(Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index))" on the sub when a player changes his map (via main.txt). Link to comment Share on other sites More sharing options...
Robin Posted June 18, 2009 Share Posted June 18, 2009 You don't need _any_ refreshing, and you certainly don't need to stop the damn thing after a second.That's like adding a check to any game which stops the process if the loading screen stays open for over 5 seconds.Whenever a player moves, send the player's movement data to _all_ the players on the map. Including the moving player himself.Client-side movement is there to make the game appear smoother. That's fine, but double check the bloody thing. Don't expect the client to calculate anything, or keep itself in check. Link to comment Share on other sites More sharing options...
Devogen Posted June 18, 2009 Share Posted June 18, 2009 @AkselJ:> Well, what if I say unnown wrote the same thing? He might have, just because there is some code out there that is about the same it doesn't mean it isn't unnowns work cuz unnown as I know him isn't a thief.No, Im sure the two of them are psychic and shared their thoughts over a mind meld.Robin, I agree once again - this is scary..Its not a fix as ive said, and only detects if the map has been loaded every second or so, and was absolutely no good for people like me that dont use static maps. Link to comment Share on other sites More sharing options...
Akselj Posted June 19, 2009 Author Share Posted June 19, 2009 Well, could you be so kind that you would share your fix with me? Link to comment Share on other sites More sharing options...
Devogen Posted June 20, 2009 Share Posted June 20, 2009 It's in Nikko Stalwarts tale threak Aksel, and its not really a fix, well it is sort of, it definately improves the problem not happening.For me anyway, it was dependant on the speed of the PC running the server. The slower the PC, the less frequent it would happen. So eventually I put a few sleep commands in the sub joinmap and it stopped happening. I tried various things, but the receiving map problem only seemed to occur on higher end pc's. Im sure a guru programmer will explain how the packets need time to be read before being sent again etc.. but anyway..so yeah just slow down sub join map server side by like .3 of a second. Not ideal, but effective without really doing too much at all.Im yet to see a proper fix for it… as the Sleep timer value is dependant on cpu speed. Link to comment Share on other sites More sharing options...
damian666 Posted June 20, 2009 Share Posted June 20, 2009 hmm… so thast why i have that? its running on a pretty fast PC, and i have to reresh almost evertime i walk to another map.can ya post a example of doing it?or should i downclock my server? less cycles, the best it gets right?Damian666 Link to comment Share on other sites More sharing options...
ZeroIshikawa Posted July 5, 2009 Share Posted July 5, 2009 Ok i gots a question because every time i go to a map it freezes, how would i do this?I don't see where "modGameLogic" is at in either folders? 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