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: 150
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: 150
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: 150
Joined: Mon Jan 06, 2020 7:46 pm

Re: Client source code

Postby xyzzy57 » Thu Sep 26, 2024 7:50 pm

loftar wrote:I just put the client source code up at <git://sh.seatribe.se/hafen-client>. Please proceed and ruin everything. :)


Has this site changed? Is it down? I cloned that repo back in March of this year, but when I tried to refresh it today (with "git pull"), I got:

Code: Select all
fatal: unable to connect to sh.seatribe.se:
sh.seatribe.se[0: 2001:2002:d9d2:45e9::2]: errno=Connection timed out
sh.seatribe.se[1: 217.210.69.233]: errno=Connection timed out
xyzzy57
 
Posts: 160
Joined: Thu Aug 19, 2021 9:41 pm

Re: Client source code

Postby Robben_DuMarsch » Thu Sep 26, 2024 8:54 pm

xyzzy57 wrote:
loftar wrote:I just put the client source code up at <git://sh.seatribe.se/hafen-client>. Please proceed and ruin everything. :)


Has this site changed? Is it down? I cloned that repo back in March of this year, but when I tried to refresh it today (with "git pull"), I got:

Code: Select all
fatal: unable to connect to sh.seatribe.se:
sh.seatribe.se[0: 2001:2002:d9d2:45e9::2]: errno=Connection timed out
sh.seatribe.se[1: 217.210.69.233]: errno=Connection timed out


Been this way a few days. Either it went down and Loftar doesn't notice, or he's keeping some things secret before announcement Sunday during Dev stream.
User avatar
Robben_DuMarsch
 
Posts: 2284
Joined: Wed Sep 28, 2011 2:58 am

Re: Client source code

Postby derkami » Tue Nov 19, 2024 12:03 pm

I've recently re installed my debian on my machine and I'm getting quite funny problems with compilation and running the game.
It looks like it is related to me having the system set to UTF8 locale.

First the LayerUtil (which probably isn't yours) couldn't work right because of the sort order.
Now the game doesn't run whenever if have resources with the same name but having -d and -h suffixe because they come first at least how the system sorts everything.
I don't exactly know what's going on right now but if you linux gurus have some insight, that would be grant.

Meanwhile I'm trying to get my system to sort like I would expect shit to be sorted..
btn.res
btn-d.res
btn-h.res

instead of
btn-d.res
btn-h.res
btn.res

to confirm / prove that this infact is the problem or not... I'm kinda confused.
PS: the game precompiled is running just fine, but when i try to compile it, it fails on loading resources, even though, they are there...


Edit:
I reinstalled debian with C locale and it everything works now.
Funny how shit breaks just because of this.
Image
Image
Image
User avatar
derkami
 
Posts: 145
Joined: Thu Jun 02, 2016 11:28 pm

Previous

Return to The Wizards' Tower

Who is online

Users browsing this forum: No registered users and 95 guests