Client source code

Forum for alternative clients, mods & discussions on the same.

Re: Client source code

Postby kmarad » Tue Apr 27, 2021 11:33 pm

Yea overlay is a cool example.
And I already translated a few.

Then there is a little bunch :
Image

Now really let's get back to the question : I was wondering if there was a trick to NOT translate everything.
As an experienced developer I know I code bugs. And a single bug in any of these means real unstable code.
Like mistake an unsigned 16 bits integer by a 8 bits one, and the whole interpretation of the message is fucked up.

I would love to be able to use as little of these functions as needed. Hence avoid all the brainfuck when I make a little mistake or there is a small update...

By the way I can understand that there is no magic trick to this. And I know how to work it out the hard way. I'm simply wondering :p
kmarad
 
Posts: 132
Joined: Mon Jan 06, 2020 7:46 pm

Re: Client source code

Postby shubla » Wed Apr 28, 2021 12:05 am

kmarad wrote:Yea overlay is a cool example.
And I already translated a few.

Then there is a little bunch :
Image


Now really let's get back to the question : I was wondering if there was a trick to NOT translate everything.
As an experienced developer I know I code bugs. And a single bug in any of these means real unstable code.
Like mistake an unsigned 16 bits integer by a 8 bits one, and the whole interpretation of the message is fucked up.

I would love to be able to use as little of these functions as needed. Hence avoid all the brainfuck when I make a little mistake or there is a small update...

By the way I can understand that there is no magic trick to this. And I know how to work it out the hard way. I'm simply wondering :p

No there is not. You are either hopelessly lazy or then not skilled enough to make headless client if you think that translating them is a major problem, because that is one of your least concerns when making such client when you think of the all other fun things that you will have to deal with like custom hidden code files in res files that are only loaded in demand etc.
Image
I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
User avatar
shubla
 
Posts: 13043
Joined: Sun Nov 03, 2013 11:26 am
Location: Finland

Re: Client source code

Postby kmarad » Wed Apr 28, 2021 12:15 am

shubla wrote:No there is not. You are either hopelessly lazy or then not skilled enough to make headless client if you think that translating them is a major problem, because that is one of your least concerns when making such client when you think of the all other fun things that you will have to deal with like custom hidden code files in res files that are only loaded in demand etc.


Please give some room to wizards mate. You didn't find the spell, okay, but that doesn't mean that it doesn't exist.
By the way, friendly advice : be careful about this kind of "truth", when you'll be proven wrong you'll look stupid.

Then yes I'm lazy. I'm a developer. I code machines to work for me. And always try to find the laziest way to code these.
But then, what kind of developer isn't lazy ?
kmarad
 
Posts: 132
Joined: Mon Jan 06, 2020 7:46 pm

Re: Client source code

Postby shubla » Wed Apr 28, 2021 12:41 am

kmarad wrote:[ You didn't find the spell, okay, but that doesn't mean that it doesn't exist.
By the way, friendly advice : be careful about this kind of "truth", when you'll be proven wrong you'll look stupid.

Well you can read the code and see if there is some way, to my knowledge there is not, sorry if it sounded rude.
The code in client is not too friendly, but it was never intended to be used like this.
kmarad wrote:I code machines to work for me. And always try to find the laziest way to code these.

Well yes I guess its quite common attribute.
Image
I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
User avatar
shubla
 
Posts: 13043
Joined: Sun Nov 03, 2013 11:26 am
Location: Finland

Re: Client source code

Postby kmarad » Wed Apr 28, 2021 1:23 am

That's alright mate, no hard feelings. :)
I understand your point, translating everything properly is a good solution.

I'm pretty sure there is some dark-magic to try though.

For a first try, I think that I'll give some "unwanted" messages a flat number of bytes.

Like for instance OD_LINBEG seems to be 32x4 bits.
OD_LUMIN looks like 32 + 32 + 16 + 8 bits.
There are a few messages like that, that can just be translated to a length, and ignored.
Then of course, that's the easy part.

There are also some conditionally sized ones. That's when it gets funny. I particularly love those layered ones.

An interesting parameter is that data type ids seem to be sent sorted for a frame. That can certainly help "scan" the frame for the next data object.

Also a solution would be to scan the frame, byte per byte, for the ids you are looking for. And when you've got one, "try" to build a message out of what's next...

Nothing's impossible for wizards my friend ;)
kmarad
 
Posts: 132
Joined: Mon Jan 06, 2020 7:46 pm

Previous

Return to The Wizards' Tower

Who is online

Users browsing this forum: No registered users and 10 guests