Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2020-11-18 00:00:00Z and 2020-11-19 00:00:00Z
Avatar
Often the motd lines go over the edge, pretty annoying. I have something in mind like going back to the last space character and placing a \n there from the client, if the text goes over
Avatar
@TsFreddie ? :D
Avatar
is it still doing that?
12:14
have a test string i can use?
12:17
12:17
Avatar
you need to add spaces to the text
12:19
and long words
12:20
12:22
Avatar
which server is that
12:24
i dont know how i managed to do that, works if i apply this footer
12:24
its my code
12:24
i'll try to reproduce
Avatar
maybe is \n that is breaking wrapping
12:25
probably
12:25
these links are the steps the message goes
12:25
from entering the cmd "sendmotd" in my mod
12:26
use sendmotd me 1 "any text you like" (edited)
Avatar
are you sure you are on master branch
12:27
for client ofc
Avatar
let me check
12:30
i remember killing half of my total brain cells for a new word wrapping logic.
12:30
thonk if it is broken, i'll probably need to spend the other half as well
Avatar
Okay seems to be working
12:31
I was not on master :o
Avatar
the new text system does a lot of things differently
Avatar
probably double check everywhere just to be safe.
Avatar
i am lost now
12:31
like
12:31
how the fuck can i make a good footer logic now
12:32
serverside
12:32
:(
12:32
that suits all clients
12:32
i cant, right
Avatar
hmm. maybe just try not to go over a certain length.
Avatar
yeah, but then i dont have a lot of space xD
Avatar
and manually placing \n i guess, if it is english only
Avatar
yes, tried that 20 minutes ago
12:33
doesnt work too well
12:33
Can we have something like telling the client which line to go?
12:33
right now we cant just edit the last line for example
Avatar
it is impossible to place a \n before '/taserinfo'
12:34
not really
Avatar
thats not what i want
12:34
i have an algorithm for it
Avatar
the max lines that can be displayed in motd didn't change i believe
Avatar
Can you tell me how your logic works so i can reproduce it serverside to keep track with the client so i can manually insert \n's from the code?
12:35
seems like it changed from 22 to 21
Avatar
oh right
12:35
the 22th goes out of the edge sometime
12:35
we can make the window larger and bring back the 22th line
12:36
since 0.7.6 isn't out anyway
Avatar
just push the text up a bit again
12:36
there is so much space at the top
12:36
and the last line only needs a little more
Avatar
you're right
12:36
Would be cool if that at least could be done :D
Avatar
are you sure that's the 21th line?
12:37
i just believe it
12:37
bcs the old client can show the last line
12:37
let me check
12:37
maybe auto height is broken too
12:38
even weirder
12:38
oh
12:38
there are 24 lines
12:38
yea, the new client only has 23
12:38
jup
Avatar
ok the "haha" on my screenshot is doing something weird
12:39
i'll change the max lines. and fix that too
Avatar
thanks
Avatar
as for the inserting \n thing. as long as you don't make the text too close to the edge and insert \n accordingly it'll work, at least for default font on both master and 0.7.5
12:40
custom font can still break these
12:41
since you can't tell how wide each char is server-side
Avatar
But for the normal font
12:42
can i calculate it for the vanilla font?
Avatar
you'll need freetype. or you can just guess and make a table yourself for ascii at least
12:43
which font is it? can i find anything on the internet?
Avatar
that's what i imagine myself doing if i'm doing it.
12:43
DejaVu Sans
12:44
you can just grab it in the data folder
Avatar
i hate this so much xD
Avatar
personally i might just send broadcast alongwith motd as footer
Avatar
i just wanna give up for real
Avatar
if i'm not doing anything with broadcast
Avatar
the point is i want to have everything inside of the windw
Avatar
thonk or i'll just put it somewhere in the middle lol
12:45
modding do be like that
12:47
the text render layout engine currently is as stupid as possible which is what Microsoft Notepad™️ is doing. (edited)
12:48
plus some logic to prevent non latin sentence being wrapped since they might not have space in between words
Avatar
i hate debugging text lol
Avatar
needs more zalgo (edited)
Avatar
when you inspect a text pointer and it looks like this "0x00007ff63e7fcf2c "啥。hahha"
Avatar
sounds good
12:59
I say hi, you say w}�����G�9M�4U%�]�L��3}��!�ب"�R!/���X����9���v��]M���>��
13:00
Avatar
oh windows
Avatar
thonk ye, i'm a pleb (edited)
Avatar
maybe msvc doesn't show utf-8 correctly?
Avatar
at least vscode doesn't
Avatar
the font has an interesting f
13:02
but just the font in the popup. hmmm 🤔
Avatar
oh yeah, that is a interesting f
13:03
never noticed it
13:03
but windows' font are all of the places all the time
13:03
i'm used to weird fonts lol
13:04
also thanks for ruining my vscode experience from now on.
Avatar
Where is the information for the frame even? I don’t see pText anywhere
14:01
Do you need to hover for it?
14:04
Anyway, microsoft for some reason thinks all text is either ascii or ucs2, which is odd since the last time ucs2 was relevant we were probably still using vacuum tubes
Avatar
i think i found the reason of why the f is funny. I have my main font with ss05 switch on (edited)
14:06
vscode just turn ss05 on everywhere even if the debug popup's font is different
14:06
14:09
Fira Code has this weird @ with ss05 off
14:10
Avatar
@fokkonaut reported that the new TextRender fits 23 lines in MOTD window instead of 24 lines before the textrender update.
  • Reduced the margin of MOTD window and changed to the logic from "fit text inside rect" to "fit rect to contain 24 lines".
  • Flagged MOTD text to use auto ellipsis feature, because the in-game menu can display more MOTD text, so it is nice to have an indicator showing there are more text available.
  • KISSified TextDeferred just because I was working on it.
Pr...
Exported 133 message(s)