SkywardRiver Posted May 30, 2015 Author Share Posted May 30, 2015 So, this has long been an issue with Eclipse Engines. If your game is lagging due to too many animated tiles, large maps, autotiles, or whatnot, on a not so great computer you start to notice an increase in movement speed. This tutorial should fix that issue.It should be noted that I'm not completely sure of this at all. This is outside my realm of experience so any input/feedback on the matter would be greatly appreciated.This is all Client Sided:To start off, add these variables to modGlobals```Public TimeGetTimeS As LongPublic TimeGetTimeM As Long```Next head to modGameLogic and add this:```Dim STick As LongDim ComTimeS As LongComTimeS = 120000```Under this:```Dim Tmr1000 As Long```Now add this just below "FrameTime = Tick"```' Trying out a new method of processing movement. This will attempt to use computer time rather than program time. TimeGetTimeS = Second(Now) If TimeGetTimeS > 59 Then TimeGetTimeM = TimeGetTimeM + 1 End If STick = (TimeGetTimeS * 1000) + ((TimeGetTimeM + 1) * 60000) ComTimeS = ComTimeS + 600 'Edit this number to effect speed.```Now find this:```' Process input before rendering, otherwise input will be behind by 1 frame If ComTimeS > (STick) Then For i = 1 To Player_HighIndex If IsPlaying(i) Then Call ProcessMovement(i) End If Next i ' Process npc movements (actually move them) For i = 1 To Npc_HighIndex If Map.NPC(i) > 0 Then Call ProcessNpcMovement(i) End If Next i If Map.CurrentEvents > 0 Then For i = 1 To Map.CurrentEvents Call ProcessEventMovement(i) Next i End If ComTimeS = STick - 1000 End If```Now again, this is just a trial. A test-run, if you will. I'm tired and not sure if I've done this right. Any feedback would be greatly appreciated. Link to comment Share on other sites More sharing options...
Growlith1223 Posted May 30, 2015 Share Posted May 30, 2015 Time based movement within the eclipse engine was more or less an expirement and turned out to be a failure. regardless, good tutorial, I don't see anything wrong with what you have here! Link to comment Share on other sites More sharing options...
SkywardRiver Posted May 30, 2015 Author Share Posted May 30, 2015 @'Growlith1223':> Time based movement within the eclipse engine was more or less an expirement and turned out to be a failure. regardless, good tutorial, I don't see anything wrong with what you have here!What was wrong with Time based movement? Does it not solve the problem of lag-moving? Link to comment Share on other sites More sharing options...
Growlith1223 Posted May 30, 2015 Share Posted May 30, 2015 @'Jaxx':> @'Growlith1223':> > > Time based movement within the eclipse engine was more or less an expirement and turned out to be a failure. regardless, good tutorial, I don't see anything wrong with what you have here!> > What was wrong with Time based movement? Does it not solve the problem of lag-moving?It would cause the player to jump around beyond belief, even with a good computer mind you, the client would desync a lot and cause other players to be at like x 10, to x 33 or something, lol Link to comment Share on other sites More sharing options...
SkywardRiver Posted May 30, 2015 Author Share Posted May 30, 2015 Oh wow. So this ^^^ isn't quite a good option then eh? Link to comment Share on other sites More sharing options...
Growlith1223 Posted May 30, 2015 Share Posted May 30, 2015 im not saying that it's not good, just if the system lags, that timer will jump if I remember correctly, causing the same issue as before, it's a very small chance the system WOULD lock up from anything but it can happen lol Link to comment Share on other sites More sharing options...
SkywardRiver Posted May 30, 2015 Author Share Posted May 30, 2015 Dang xD I thought I was being so clever with this 'fix'.Hmmm, well we'll see if I use it in EOO. As for everyone else, it's here for use haha. Link to comment Share on other sites More sharing options...
Growlith1223 Posted May 30, 2015 Share Posted May 30, 2015 @'Jaxx':> Dang xD I thought I was being so clever with this 'fix'.> > Hmmm, well we'll see if I use it in EOO. As for everyone else, it's here for use haha.owait nvm, ignore what I am saying, I thought this was modifying the movement speed, looking into this further, it looks good for what its doing but I actually don't see any difference using timeGetTime vs this method. Link to comment Share on other sites More sharing options...
SkywardRiver Posted May 30, 2015 Author Share Posted May 30, 2015 This method uses your computer's clock instead of getting your system's time and then running it through the client from there on. Link to comment Share on other sites More sharing options...
Growlith1223 Posted May 30, 2015 Share Posted May 30, 2015 ah, this shouldn't change anything, I haven't tested it though but it looks good! Link to comment Share on other sites More sharing options...
leminhde Posted June 3, 2015 Share Posted June 3, 2015 It doesn't work Link to comment Share on other sites More sharing options...
Officer Johnson Posted June 4, 2015 Share Posted June 4, 2015 @'leminhde':> It doesn't workLol, you need to give more info then that to receive help.What's the issue? 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