[KTRose Pre-Evo] 150$ job fixing synch

Use this forum to find people to work on your Server

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

[KTRose Pre-Evo] 150$ job fixing synch

Postby aerocoke on Sun May 20, 2018 11:24 pm

I'm gonna go straight to the point.


What i'm looking for :
I want to fix the annoying synchronization errors between the client and the server in KT-Rose.
Often time your character will die when he still has Hps displayed client side but is dead server side.
The issue has been discussed about here by xxx and purple :
viewtopic.php?f=55&t=5519#p56106

About what's causing the bugg there's some speculation but it seems to be because the server doesn't really calculate the attacking rate of the monster the same as the client.

What version of rose will you work on :
KT-Rose 2015 / Rose 112_112 with Ktrose's Trose.exe
https://mega.nz/#!4B1TDYAY!sITpXN9CQeVM ... rQKaI0cYjw (KT rose )
https://mega.nz/#!cQ8XzYzJ!y7M_bhSdLv6f ... gjgYUKZKRc ( Rose112)
We're using KTrose because purple already edited the exe to make the synch easier as discussed here :
viewtopic.php?f=55&t=5519#p56118

What emulator will you work on :
Well KT-Rose duh
https://subversion.assembla.com/svn/ktrose-source/


Paiement done by Paypal / SEPA ( in person if you're in FR/UK )
Contact me by sending me a PM.
aerocoke
Jelly Bean
Jelly Bean
 
Posts: 16
Joined: Wed Feb 24, 2016 2:31 am

Re: [KTRose Pre-Evo] 150$ job fixing synch

Postby PurpleYouko on Mon May 21, 2018 2:55 pm

That is not an easy fix.
As I stated in that other thread and as Raven commented on, The desync is caused by a combination of factors but really boils down to the fact that the original coders must have been on some sort of designer mushrooms or something in order to design the system so badly.
They have two completely different bits of code calculating all the HP, MP, Movespeed, Battle animation speed and so on.
One set in the server and one set in the client
They got so badly screwed up that they added an 0X0EC packet that carries HP and MP (nothing else) from server to client and is sent one per second for every active character on the server (that's a stupid amount of packets BTW)
BUT
As soon as the client receives this information and sets the MP, HP and displays it, it then calls the function that calculates it client side anyway :o
So in effect it completely ignores the 0X0EC packet and uses it's own bullshit calculations anyway.
That's why you see the MP and HP jump around. It's jumping from server calculated values to client calculated values and back. But it never uses server side values to actually have an effect on whether you are dead or not. That's entirely client side.

So in a system such as pre-evo (where we don't have client source code and can't recompile the trose) all we can do is try to code the server calculations as close as possible to the client calculations.
We can do that to a certain point but we are never going to be able to make them match exactly due to factors such as clock speed differences between server and client PCs and things like the server running the calculation codes a little later than the minimum timer set calculation time.
the way the server works is to run around the main loop as fast as possible over and over while checking each client LastUpdatetime against an internal clock. If the elapsed time is greater than the defined interval then it updates the client and sends the packet.
If not then it just continues to check the next one and so on.
The point is that the elapsed time is never exactly equal to the defined interval. It's always a little bigger so those tiny differences add up after a while.
The client does something a little similar but it only has to worry about ONE game object in it's loop. The Player. The server can have thousands of things it's checking for. All the players, all the monsters, incoming AIP requests, Incoming QSD stuff and so on. It's inevitable that there will soon be differences in timing.

One possible but not great solution would be to stop updating existing battles in the server and instead initiate a new combat each and every time an update would be sent. The packet would be much bigger and I'm not quite sure what effect it would have on AIP and stuff. Probably not good.

If we could get hold of the trose source for the pre-evo client we could fix all this crap and then some.
OR if there is somebody out there who is really good with Ollydbg it might be possible to modify the trose to remove the client side calculations of HP and MP. Move speed would be harder since we would have to actually expand the code that receives the 0X07EC packet to receive move speed.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4588
Joined: Fri Aug 10, 2007 2:05 pm

Re: [KTRose Pre-Evo] 150$ job fixing synch

Postby aerocoke on Mon May 21, 2018 3:18 pm

Wow thanks purple, you've explained the situation better than i ever could !

My first approach was simply to spend time to sync the server and the client by calculating everything manually ( a speed & such ) but i lack the knowledge to implement that.

I thought that since we have the irose source and pre-evo was built on it calculating everything would be easier.
Last edited by aerocoke on Mon May 21, 2018 5:12 pm, edited 1 time in total.
aerocoke
Jelly Bean
Jelly Bean
 
Posts: 16
Joined: Wed Feb 24, 2016 2:31 am

Re: [KTRose Pre-Evo] 150$ job fixing synch

Postby PurpleYouko on Mon May 21, 2018 4:57 pm

I have irose and evo source. What I don't have is pre-evo source and it's subtly different than both of the others.
It may be that the calculations are similar to those in irose.
TBH I've never actually compared the sources to see.

It would be really nice if there was an easy way to compile the trose from irose and adapt it to work with pre-evo along with duplicating some of the changes that I have already implemented in project 137.
It could probably be done but I'm not sure how much work would be involved.

Adapting the 137 source to pre-evo could also probably be done but there are so many bugs in it that it would be a massive job to get it anywhere close to being as useful as the 112_112 client already is.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4588
Joined: Fri Aug 10, 2007 2:05 pm

Re: [KTRose Pre-Evo] 150$ job fixing synch

Postby Raven0123 on Mon May 21, 2018 5:51 pm

PurpleYouko wrote:I have irose and evo source. What I don't have is pre-evo source and it's subtly different than both of the others.
It may be that the calculations are similar to those in irose.
TBH I've never actually compared the sources to see.

It would be really nice if there was an easy way to compile the trose from irose and adapt it to work with pre-evo along with duplicating some of the changes that I have already implemented in project 137.
It could probably be done but I'm not sure how much work would be involved.

Adapting the 137 source to pre-evo could also probably be done but there are so many bugs in it that it would be a massive job to get it anywhere close to being as useful as the 112_112 client already is.


If you give me a date for pre-evo, I can look to see if I have them. if I do I may be able to make some changes to make them better or at least give a exe that has the calculations known
User avatar
Raven0123
osiRose dev
osiRose dev
 
Posts: 375
Joined: Tue Sep 11, 2007 11:06 pm
Location: USA, NJ

Re: [KTRose Pre-Evo] 150$ job fixing synch

Postby PurpleYouko on Mon May 21, 2018 6:17 pm

Pre-evo ran from October 1st 2006 until about August 2007 (I think)

Version number started at 112_112 and that is the version compatible with the KTRose server.

The later version (I think 112_124 was the last) had gameguard added and a couple of other things which makes it necessary to modify the KTRose server for it to connect.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4588
Joined: Fri Aug 10, 2007 2:05 pm

Re: [KTRose Pre-Evo] 150$ job fixing synch

Postby XxXshidoXxX on Mon May 21, 2018 9:45 pm

In case raven doesn't have the files you ( or whoever will take the job) can probably use a mix of both the irose and evo leaked sources. I did ask matt from arua if the formula pre-evo uses were different from them and apparently they should be quite similar if not the same.

My guess is that some formulas you can use from the irose source and some from evo, with a little try and error you should find the good combinaison.

And although its not gonna be pitch perfect (thanks to internal clocks ) its gonna be wayyyyyy better than its current state. Some evo servers seems to have worked on the problem ( ie : tsuki / adventure ) and their synch is quite better than a classic DR4.
My collection ( Tools, clients sources...)
https://mega.nz/#F!AdcFnQDL!sKp3O9tWGGdWvLEj_EYfwA
osrose mobile project
viewtopic.php?f=34&t=5787
OsRose Mobile development + Titan Rose redesign
https://github.com/shid0x
XxXshidoXxX
osiRose dev
osiRose dev
 
Posts: 445
Joined: Mon Aug 27, 2007 11:44 am


Return to Recruitment

Who is online

Users browsing this forum: No registered users and 0 guests

cron