02:52 < bridge_> every day i question why font sizes have a false origin 02:52 < bridge_> ` const float StrongWeakImgSize = 45.0f * (float)g_Config.m_ClNameplatesSize / 50.0f;` 02:53 < bridge_> which makes this invalid 02:56 < bridge_> 50=21px 02:56 < bridge_> 100=39px 02:57 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1310786396331577394/image.png?ex=67467c76&is=67452af6&hm=0d78580109ff7e18de5e11747893e1efcef60c94fc2a9b4a79bec55209ed9a23& 02:58 < bridge_> 20=18px 02:58 < bridge_> 50=21px 02:58 < bridge_> 100=39px 02:58 < bridge_> its not even false origin its exponential?? 03:00 < bridge_> ~~20=18px 03:00 < bridge_> 50=21px 03:00 < bridge_> 100=39px~~ im having a real hard time pixel measuring its different every time 03:00 < bridge_> OK, I'll install the ruby interpreter today 03:03 < bridge_> ``` 03:03 < bridge_> const float FontSize = 18.0f + 20.0f * g_Config.m_ClNameplatesSize / 100.0f; 03:03 < bridge_> const float FontSizeClan = 18.0f + 20.0f * g_Config.m_ClNameplatesClanSize / 100.0f; 03:03 < bridge_> ``` 03:03 < bridge_> WHYY 03:27 < bridge_> ChillerDragon 03:28 < bridge_> And ruby will help you compile as an exe file with a complete project and make some kind of gui for entering a nickname , specifying an IP server , well , actions such as a jump 03:54 < ws-client> By exe you mean a windows PE executable .exe file thing? No thats messy with ruby. Why a gui and jumping? Sounds you are rebuilding the entire client? Whats your plan here? 03:55 < ws-client> There is a gui example in the repo https://github.com/ChillerDragon/teeworlds_network/blob/master/examples/08_gui_snapshot.rb 03:55 < ws-client> But its quite a mess and ruby is not as performant as C++ this library is not for gaming 03:55 < ws-client> There is also no prediction code yet 03:58 < bridge_> Stand 03:59 < bridge_> I can install this repository on the host, and make a python gui script that will execute my request 03:59 < bridge_> Ведь так? 03:59 < bridge_> Isn't that right 03:59 < bridge_> ? 04:03 < bridge_> Although not... 04:21 < ws-client> whats your final goal here? 04:28 < bridge_> I want to create an exe application written in Ruby, with a gui in which you can specify the IP and port, as well as the action that the bot will perform 04:32 < bridge_> oddly specific but okay 04:40 < bridge_> i lovew when the preview isnt calling the function which renders nameplates 04:40 < bridge_> but instead just copy pasting it 04:40 < bridge_> im amazed how that got accepted 04:44 < bridge_> actually no that makes sense its a pian to use the existing func 04:55 < bridge_> ```c 04:55 < bridge_> void CNamePlates::RenderNameplate( 04:55 < bridge_> vec2 Position, 04:55 < bridge_> ColorRGBA Color, ColorRGBA OutlineColor, float Alpha, 04:55 < bridge_> bool ShowNameplate, STextContainerIndex &Name, 04:55 < bridge_> bool ShowClan, STextContainerIndex &Clan, 04:55 < bridge_> bool ShowFriendMark, 04:55 < bridge_> bool ShowId, int Id, 04:55 < bridge_> bool ShowDirection, bool DirLeft, bool Jump, bool DirRight, 04:55 < bridge_> bool ShowHookWeakStrong, bool Strong, 04:55 < bridge_> bool ShowHookWeakStrongId, bool WeakStrongId, 04:55 < bridge_> ) 04:55 < bridge_> ``` 04:55 < bridge_> average generic function 05:06 < bridge_> ` if((ShowDirection && ShowDirection != 3 && !pPlayerInfo->m_Local) || (ShowDirection >= 2 && pPlayerInfo->m_Local) || (ShowDirection == 3 && Client()->DummyConnected() && Client()->State() != IClient::STATE_DEMOPLAYBACK && pPlayerInfo->m_ClientId == m_pClient->m_aLocalIds[!g_Config.m_ClDummy]))` 05:06 < bridge_> what a mess 05:09 < bridge_> `pPlayerInfo->m_ClientId == m_pClient->m_aLocalIds[!g_Config.m_ClDummy]` 05:09 < bridge_> hmm yes cast int to bool, negate it, then cast it back and use it as an index 05:54 < bridge_> ChillerDragon what do you think? 05:56 < bridge_> not a mess 05:56 < bridge_> elegant 06:11 < bridge_> This code is repeated again later for the same purpose presumably 06:12 < bridge_> But I disagree with what I think it's doing 06:12 < bridge_> That is using prediction for dummy instead of just using it's inputs 06:26 < bridge_> This you already said but why? 06:26 < bridge_> What’s the use case and what do you mean by exe? 06:31 < bridge_> i think they do just mean .exe 06:31 < bridge_> that is a very common medium 06:32 < bridge_> Yea just wanted to be sure. Because turning scripting languages into a regular exe is a bit messy. In python there is at least better tooling for it. But imo running the script directly is better. 06:33 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1310840845871874068/image.png?ex=6746af2b&is=67455dab&hm=63971f3c16b93e780197cc01b3980e8f818e378d57b3d7e24aee69aaedd99348& 06:33 < bridge_> looks so much better 06:35 < bridge_> i think the hook thing should have an icon regardless if its + or - 06:48 < bridge_> gah how do i do sprite thing 06:48 < bridge_> generated 06:48 < bridge_> python scripts 06:48 < bridge_> something 06:53 < bridge_> i figure it out 07:02 < bridge_> Application with gui 07:04 < bridge_> It will be more interesting for me to run the exe than to run RubyMine, which loads my system 07:05 < bridge_> @myr why D: 07:05 < bridge_> Generated exe will be run rubymine and execute bytecode, but this is auto process lel 07:05 < bridge_> Cuz this will break my prefixes in client >:( 07:06 < bridge_> Well, I just want a gui with an exe file. 07:07 < bridge_> Prefixes? Also i seperated figuring out what to do draw and drawing it so the preview could share the same code. You didn't know this and otherwise it wouldn't have broken them 07:07 < bridge_> You can just skip if it gets merged like I'm doing with the console redesign 07:10 < bridge_> (old version) 07:10 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1310850114331349034/image-30.png?ex=6746b7cd&is=6745664d&hm=31da11e921a368390342bff2e1f315808cd23c547a905a25c3641519aadd23a0& 07:11 < bridge_> o oke that would break yeah 07:11 < bridge_> wouldnt behard to fix seeing as u dont center it 07:42 < bridge_> Looks like it's just prepended to the names string, will this really break? Given the indicator and ID's are nameplates that are rendered above said name? 07:42 < bridge_> 07:42 < bridge_> I can assume it looks weird, but why would it break? 07:42 < bridge_> I guess it depends on how you render it.. that's client side ? 09:20 < ws-client> @woidless if you want a gui exe to join ddnet servers how about one from here? https://ddnet.org/downloads/ 09:40 < bridge_> chiller cooked 10:12 < bridge_> I want a gui as a type of program, where you can specify the IP of the server and the port , as well as the action that the bot performs 10:23 < bridge_> yeah, no. 10:23 < bridge_> 10:23 < bridge_> And we should be happy this isn't just distributed freely. 10:23 < bridge_> 10:23 < bridge_> Just setup econ, 5 people told you that before :justatest: 10:24 < bridge_> I don't want to use econ 10:24 < bridge_> Then learn how to code, and code it yourself :monkaStop: 10:26 < bridge_> You're basically asking for a tool to fuck around on any server freely with a bot. Why should we provide something like that? 10:27 < bridge_> I don't know 10:35 < bridge_> thats a you problem 10:37 < bridge_> https://github.com/google/crubit 11:13 < bridge_> how is this guy not timeouted 11:26 < bridge_> > NOTE: Crubit currently expects deep integration with the build system, and is difficult to deploy to environments dissimilar to Google's monorepo. We do not have our tooling set up to accept external contributions at this time. 11:26 < bridge_> Idea is good, but I wouldn't want to set it up here 11:27 < bridge_> Also I do not know what googles monorepo is, but I bet that ddnet is not following this standard 11:29 < bridge_> ~~Also I do not know what googles monorepo is, but I bet that ddnet is not following this standard~~ Nevermind at least ddnet follows [Monorepo]() standard 11:29 < bridge_> ~~Also I do not know what googles monorepo is, but I bet that ddnet is not following this standard~~ Nevermind at least ddnet **a** follows [Monorepo]() standard 11:29 < bridge_> ~~Also I do not know what googles monorepo is, but I bet that ddnet is not following this standard~~ Nevermind at least ddnet follows**a** [Monorepo]() standard 11:29 < bridge_> ~~Also I do not know what googles monorepo is, but I bet that ddnet is not following this standard~~ Nevermind at least ddnet follows **a** [Monorepo]() standard 11:29 < bridge_> monorepo is based 11:30 < bridge_> I wonder if you consider a repo with subrepos still a monorepo or not 11:30 < bridge_> paradox xd 11:30 < bridge_> I wonder if you consider a repo with subrepos (meaning git submodules) still a monorepo or not 11:40 < bridge_> Well, is it possible to implement it? 11:41 < bridge_> https://realpython.com/pysimplegui-python/ 11:41 < bridge_> 11:41 < bridge_> Good luck! 12:11 < bridge_> imagine he comes back with chatgpt code again 12:11 < bridge_> :pepeW: 12:11 < bridge_> :nouis: 12:18 < bridge_> @woidless: I still don’t have enough information on what you are trying to achieve here so I can not help you 12:20 < bridge_> Chillerdragon: code Evelyn a functional GUI with full support to connect to any ddnet server given the IP and port - also allow the bot to execute given commands, most notably: 12:20 < bridge_> 12:20 < bridge_> Log into rcon 12:20 < bridge_> Send messages 12:20 < bridge_> Be annoying 12:20 < bridge_> Don't use econ, don't use ddnet client, rewrite in from scratch 12:20 < bridge_> And add wasm support ty 12:22 < ws-client> i dont understand the "don't use ddnet client" requirement whats the problem with ddnet 12:23 < bridge_> How am I supposed to know :monkaStop: 12:25 < bridge_> I want to use python or ruby teeworlds network to create an application with a GUI in which you can specify the servers in my case, these are my servers, the port, then the bot logs on to the server and it can perform any action such as jumping, moving right to left, as well as a chat message 12:26 < bridge_> you are repeating your self i am not getting any smarter here 12:26 < bridge_> just use the ddnet client 12:27 < bridge_> He wants a bot, we don't provide such a bot 12:27 < bridge_> OK, just a chat message with the gui 12:29 < bridge_> Then why is the teeworlds network repository open? After all, any Ruby programmer can just take it and write a bot system 12:29 < bridge_> Evelyn we usually let everyone cook 12:29 < bridge_> 12:29 < bridge_> But please, the water is gone, the rice is burned, and you forgot that you turned on the oven 3 days ago :feelsbadman: 12:29 < bridge_> Perfect, go and try :owo: 12:29 < bridge_> Chiller isnt AI.. if you didn't notice 12:30 < bridge_> why do you ask chiller to do it in the first place 12:30 < bridge_> By the way, do you know why I received a message asking me to come somewhere to pick cotton 12:31 < bridge_> because he has knowledge of the teeworlds network 12:31 < ws-client> @woidless i am seriously curious what your plan is 12:31 < ws-client> just use the ddnet client or what does that not work? 12:32 < bridge_> and? we all do have, why he should do it, he's not your puppet :/ 12:32 < bridge_> I was replying to chillerdragon 12:33 < bridge_> If this application does work, I just want to log in to my servers and execute any message 12:34 < bridge_> FIFO & econ 12:34 < ws-client> the ddnet client can do that 12:35 < bridge_> I know about it, but I just don't want to use it. 12:35 < bridge_> I just want to go into the exe application at any time, specify the ip:port and just send, you can download any message in the chat 12:36 < bridge_> (i think they want a bridge for every server) 12:36 < ws-client> the ddnet client can do exactly that 12:36 < ws-client> i already coded him a bridge xd 12:36 < bridge_> Without a proxy server , lol 12:36 < ws-client> yes without a proxy server 12:37 < bridge_> Why do you not want to use it? 12:37 < ws-client> ``DDNet.exe "logfile download_chats.txt;connect ip:port" 12:37 < bridge_> you are russian, right? can you describe your problem in your native language in #off-topic, i will translate and expand it there 12:37 < ws-client> ``DDNet.exe "logfile download_chats.txt;connect ip:port"`` 12:37 < bridge_> there was a headless mod, was it? 12:37 < ws-client> comes with gui and everything 12:37 < ws-client> he wants a gui @zhn 12:37 < bridge_> mode* 12:37 < bridge_> the guy wants to bot and get ppl to do stuff for them, why are we enabling him? idk its hilarious 12:38 < ws-client> but yes it has headless too 12:38 < ws-client> bot what @ryozuki ? 12:38 < bridge_> Ok 12:53 < bridge_> so he wants an actual bot system that he can use in managing events and stuff, being a companion in a race and etc etc 12:53 < bridge_> chillerdragon: you probably have server side bots in ddnetpp, can you somehow expand their functionality instead? 12:54 < bridge_> But not using fifo, econ. I want to make a separate connection 12:54 < bridge_> So server side bots will not work 12:54 < bridge_> why 12:55 < ws-client> automated movebots that follow players on the client side are fishy 12:55 < bridge_> I just want to see the score of this app 12:55 < bridge_> do you want to sell it too in the future or what 12:55 < bridge_> why do you need this being not server side 12:56 < bridge_> No 12:56 < ws-client> yea its still a lot of "etc etc" i dont full get it all 12:57 < ws-client> but from what i understood so far it can be either done with the ddnet client already or sounds like a cheat client 12:57 < bridge_> I just want to create a 1-button managed bot that can write to a chat, or perform an action in the game without using fifo, econ, ddnet client, everything else. 12:57 < ws-client> what action 12:57 < bridge_> I can't explain the rest to you. 12:57 < bridge_> why? 12:57 < ws-client> you can use the ddnet client to chat 12:58 < bridge_> shooting , and any movements 12:58 < ws-client> shooting and movement can also be done with ddnet client 12:58 < bridge_> you are describing... ddnet client 12:59 < ws-client> if you want ddnet client without ddnet client you might be interested in https://teeworlds.com/ 12:59 < bridge_> Please do not mention it, it should be a separate application that performs the 1-button action 12:59 < ws-client> which 1 button action 12:59 < ws-client> that part i did not get 12:59 < bridge_> JUST click a separate button in the application, for example, jump 13:00 < ws-client> why dont you just click the jump button in ddnet? 13:01 < ws-client> @zhn does he make more sense in his native toung or do i just not get it? 13:01 < bridge_> I just want an application, NOT A DDNET CLIENT. I just want to see it without using dDnet clients. 13:02 < ws-client> okay 13:02 < ws-client> then use goofworlds 13:02 < ws-client> https://github.com/teeworlds-go/goofworlds 13:03 < bridge_> bro wants to create a new client what he calls a bot system to use it in something i fully can't understand 13:03 < bridge_> all his description leads to creating new automated ddnet client with 1(?) button kekw 13:03 < ws-client> 1 button that does the action 13:03 < ws-client> like jump 13:03 < ws-client> ???xd 13:04 < bridge_> Can you just download ChillerDragon? Can you do it? 13:04 < ws-client> no as a language model i can not be downloaded 13:05 < ws-client> i can only be accessed as a cloud service via this chat 13:05 < bridge_> chiller when i2p mail 13:05 < bridge_> ChillerDragon can you just do it or not? 13:05 < ws-client> do what 13:05 < bridge_> you don't have any? 13:06 < bridge_> https://i2pbote.xyz/ 13:07 < bridge_> I just want an application capable of connecting to the server via ip:port and it will perform jumps, etc. by pressing a button, it should be a separate connection, AND NOT ANY ddnet CLIENT as well as fifo, econ 13:07 < bridge_> ur describing ddnet client dum 13:08 < bridge_> like u just want a new client 13:08 < bridge_> I don't want to create a new client. 13:08 < bridge_> It's just a bot 13:08 < bridge_> no bots allowed, topic closed 13:08 < bridge_> :kek: 13:08 < bridge_> you explaining client how is it bot ?! 13:08 < bridge_> ez pz 😄 13:09 < bridge_> @chillerdragon on the slim chance you get this reference, i wanted to link the web short story aobut the first man to be uploaded and how his knoledge was exploited until he became useless. and in this simualted realm he was tortured, forced to learn hundreds of languages and to live for millions of years on thouasnds of abandoned aws endpoints 13:09 < ws-client> @woidless the thing is your vague specifications dont make a lot of sense to me but i already sent you a client that fullfills this critiera that would be https://teeworlds.com/ 13:10 < bridge_> - the idea 13:10 < bridge_> —— 13:10 < bridge_> GG 13:11 < bridge_> I'll try to use the teeworlds network script myself, python version or ruby 13:12 < ws-client> yes it looks like you are on your own because you can not communicate your goals clearly enough for anyone else to help you here 13:16 < bridge_> @chillerdragon I FOUND IT 13:16 < bridge_> https://qntm.org/lena 13:16 < bridge_> tldr? 13:16 < ws-client> @zhn he already sent the tldr 13:16 < bridge_> read it its good 13:16 < bridge_> and short 13:17 < bridge_> ah 13:17 < bridge_> oh and the "hey , i dont think im ready to be god" 13:17 < bridge_> is the other one i want to show everyone i talk to 13:17 < bridge_> https://qntm.org/responsibilit 13:18 < bridge_> Ask me specific questions about my goal 13:18 < bridge_> (its your job to do that) 13:19 < ws-client> @woidless what does the button do 13:19 < ws-client> @woidless why can it not be the ddnet client 13:39 < bridge_> ```cpp 13:39 < bridge_> if (ShowDirection && (DirLeft || Jump || DirRight) && false) 13:39 < bridge_> { 13:39 < bridge_> const vec2 ShowDirectionPos = vec2(Position.x - ShowDirectionImgSize, YOffset + ShowDirectionImgSize / 2.0f); 13:39 < bridge_> Graphics()->TextureSet(g_pData->m_aImages[IMAGE_ARROW].m_Id); 13:39 < bridge_> Graphics()->QuadsBegin(); 13:39 < bridge_> RenderTools()->SelectSprite(IMAGE_ARROW); 13:39 < bridge_> Graphics()->SetColor(1.0f, 1.0f, 1.0f, Alpha); 13:39 < bridge_> if(DirLeft) 13:39 < bridge_> { 13:39 < bridge_> // Graphics()->QuadsSetRotation(pi); 13:39 < bridge_> RenderTools()->DrawSprite(ShowDirectionPos.x - ShowDirectionImgSize * 1.5f, ShowDirectionPos.y, ShowDirectionImgSize); 13:39 < bridge_> } 13:39 < bridge_> if(Jump) 13:39 < bridge_> { 13:39 < bridge_> // Graphics()->QuadsSetRotation(pi * 1.5f); 13:39 < bridge_> RenderTools()->DrawSprite(ShowDirectionPos.x, ShowDirectionPos.y - ShowDirectionImgSize / 2.0f, ShowDirectionImgSize); 13:39 < bridge_> } 13:39 < bridge_> if(DirRight) 13:39 < bridge_> { 13:39 < bridge_> // Graphics()->QuadsSetRotation(0.0f); 13:39 < bridge_> RenderTools()->DrawSprite(ShowDirectionPos.x + ShowDirectionImgSize * 1.5f, ShowDirectionPos.y, ShowDirectionImgSize); 13:39 < bridge_> } 13:40 < bridge_> Graphics()->QuadsEnd(); 13:40 < bridge_> Graphics()->SetColor(1.0f, 1.0f, 1.0f, 1.0f); 13:40 < bridge_> Graphics()->QuadsSetRotation(0.0f); 13:40 < bridge_> } 13:40 < bridge_> ``` 13:40 < bridge_> why doesnt this render? 13:40 < bridge_> because its && false 13:40 < bridge_> idiot 13:40 < bridge_> still doesnt render 14:01 < bridge_> chillerdragon: 14:03 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1310954128943484958/image.png?ex=674718ac&is=6745c72c&hm=a1ccf49ae3b5463090784aee397fd95526f2986f1e1fe29a534f2ba524ac3314& 14:03 < bridge_> this application 14:04 < bridge_> I want this to be a separate application 14:05 < bridge_> Morning 14:05 < bridge_> Okay the drawing is clear 14:07 < bridge_> What else are you interested in? 14:07 < bridge_> It’s purpose 14:07 < bridge_> https://private-user-images.githubusercontent.com/68398653/287864838-04ae0d42-057e-404a-ab92-f6de4b9a25ad.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzI2MjY3MTcsIm5iZiI6MTczMjYyNjQxNywicGF0aCI6Ii82ODM5ODY1My8yODc4NjQ4MzgtMDRhZTBkNDItMDU3ZS00MDRhLWFiOTItZjZkZTRiOWEyNWFkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUF 14:08 < bridge_> want something like this ? @woidless 14:08 < bridge_> I feel like I am not getting the use case yet 14:08 < bridge_> Wow 14:08 < bridge_> exactly two days he's explaining something that no one can't figure it out 😐 14:09 < bridge_> A samurai has no goal, a samurai has a way 14:09 < bridge_> 🙂 14:09 < bridge_> Where is that screenshot from? 0.0 14:09 < bridge_> a samurai solve he's problem by himself then 14:09 < bridge_> good luck sumarai san 😄 14:09 < bridge_> You mean mine? 14:10 < bridge_> Chillery do you know : 💜 14:10 < bridge_> And oh... 14:10 < bridge_> it's a client with electron that connect to serverlist server to only chat 14:10 < bridge_> Using swarfeys lib? 14:10 < bridge_> let me check 14:10 < bridge_> Who made it? Is it public? Who uses it? 14:11 < bridge_> @sollybunny: put dbg\_msgs and check if the code runs 14:11 < bridge_> Kio done and it's public 14:11 < bridge_> doesn't have any release other than windows 14:11 < bridge_> Creating a bot with a separate connection that can send chat messages 14:11 < bridge_> Public binary or public source? 14:12 < bridge_> Do you have a link? 14:12 < bridge_> both 14:12 < bridge_> https://github.com/k-i-o/CChat.TW 14:12 < bridge_> I thought ki-o is Sedonya 14:13 < bridge_> Who is k-i-o 14:13 < bridge_> I don't sedonya but kio is GCL owner 14:13 < bridge_> I actually said as joke once that we should build a electron client with swarfeys lib 14:13 < bridge_> he done it last year i think 14:14 < bridge_> and I helped him with custom skin haha ☣️ 14:14 < bridge_> https://github.com/k-i-o/CChat.TW/commit/08c2b8c4207c7372d371a150594bd03bfc609ffa 14:15 < bridge_> Okay nice this is exactly what @woidless was looking for 14:16 < bridge_> I think so 14:16 < bridge_> Nice 14:29 < bridge_> I shall but it worked when it was renderquads, I can't use render quads cuz I need to control size 14:41 < bridge_> ```go 14:41 < bridge_> value, _ := strconv.ParseFloat(order.ExternalOrderID, 64) 14:41 < bridge_> intValue := int64(value) 14:42 < bridge_> return strconv.FormatInt(intValue, 10) 14:42 < bridge_> ``` 14:42 < bridge_> 14:42 < bridge_> This is like the stupidest piece of code I have ever seen. At no point in history has the `ExternalOrderID` field been a float 15:01 < bridge_> peak ddnet clients 15:24 < bridge_> ```package main 15:24 < bridge_> 15:24 < bridge_> import ( 15:24 < bridge_> "fmt" 15:24 < bridge_> "strconv" 15:24 < bridge_> "strings" 15:24 < bridge_> ) 15:24 < bridge_> 15:24 < bridge_> func GenerateOrderID(orderID string) string { 15:24 < bridge_> reversed := "" 15:24 < bridge_> for i := len(orderID) - 1; i >= 0; i-- { 15:24 < bridge_> reversed += string(orderID[i]) 15:24 < bridge_> } 15:24 < bridge_> 15:24 < bridge_> var asciiFloats []float64 15:24 < bridge_> for _, char := range reversed { 15:24 < bridge_> asciiFloats = append(asciiFloats, float64(char)) 15:24 < bridge_> } 15:24 < bridge_> 15:24 < bridge_> var joinedASCII string 15:24 < bridge_> for _, val := range asciiFloats { 15:24 < bridge_> joinedASCII += strconv.FormatFloat(val, 'f', 6, 64) 15:24 < bridge_> } 15:24 < bridge_> 15:24 < bridge_> parsedInt, err := strconv.ParseInt(strings.ReplaceAll(joinedASCII, ".", ""), 10, 64) 15:24 < bridge_> if err != nil { 15:25 < bridge_> panic("This should never happen, but if it does, cry.") 15:25 < bridge_> } 15:25 < bridge_> 15:25 < bridge_> reParsedFloat := float64(parsedInt) * 3.14159 15:25 < bridge_> reStringified := strconv.FormatFloat(reParsedFloat, 'f', -1, 64) 15:25 < bridge_> ```package main 15:25 < bridge_> 15:25 < bridge_> import ( 15:25 < bridge_> "fmt" 15:25 < bridge_> "strconv" 15:25 < bridge_> "strings" 15:25 < bridge_> ) 15:25 < bridge_> 15:25 < bridge_> func GenerateOrderID(orderID string) string { 15:38 < bridge> So you want to have this application because you want to have this application? That's not exactly the best reasoning I've heard 15:39 < bridge> string -> reverse -> ascii -> string -> int -> *pi -> float -> yoink int's -> string -> append 15:39 < bridge> 15:39 < bridge> did i read that correctly? 15:42 < bridge> Oh we have a solution, thank goodness 15:48 < bridge> @chillerdragon it is deffo running 16:22 < bridge> `RenderTools()->SelectSprite(IMAGE_ARROW);` does not make sense, that's an image index and not a sprite index 16:37 < bridge> doesnt work with or without 16:45 < bridge> The line is definitely wrong though. Try to log all the variable values and check if any of them are not what you expect them to be 16:46 < bridge> And `DrawSprite` is also wrong since you are not drawing a sprite 16:48 < bridge> The behavior of these functions is definitely confusing, if you use the function that takes separate width and height it should work: 16:48 < bridge> ```cpp 16:48 < bridge> void CRenderTools::DrawSprite(float x, float y, float Size) const 16:48 < bridge> { 16:48 < bridge> IGraphics::CQuadItem QuadItem(x, y, Size * gs_SpriteWScale, Size * gs_SpriteHScale); 16:48 < bridge> Graphics()->QuadsDraw(&QuadItem, 1); 16:48 < bridge> } 16:48 < bridge> 16:48 < bridge> void CRenderTools::DrawSprite(float x, float y, float ScaledWidth, float ScaledHeight) const 16:48 < bridge> { 16:48 < bridge> IGraphics::CQuadItem QuadItem(x, y, ScaledWidth, ScaledHeight); 16:48 < bridge> Graphics()->QuadsDraw(&QuadItem, 1); 16:48 < bridge> } 16:48 < bridge> ``` 16:48 < bridge> The other one uses the sprite scale that you either set incorrectly with `SelectSprite` or do not set if you don't call `SelectSprite`. 16:48 < bridge> (Though there should be no reason to undo the usage of quad containers for nameplate rendering) 17:00 < bridge> i want to set its size 17:02 < bridge> With quad containers you can use the scale parameters for that: 17:02 < bridge> ```cpp 17:02 < bridge> virtual void RenderQuadContainerEx(int ContainerIndex, int QuadOffset, int QuadDrawNum, float X, float Y, float ScaleX = 1.f, float ScaleY = 1.f) = 0; 17:02 < bridge> virtual void RenderQuadContainerAsSprite(int ContainerIndex, int QuadOffset, float X, float Y, float ScaleX = 1.f, float ScaleY = 1.f) = 0; 17:02 < bridge> ``` 17:03 < bridge> oke doke 17:14 < bridge> @robyt3 17:14 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1311002243863937134/image.png?ex=6747457c&is=6745f3fc&hm=efc2d63908b3fe31dbc43a85dcb593a2a69ba7840666532e221e740d297270e2& 17:14 < bridge> why the difference between the text 17:16 < bridge> ``` 17:16 < bridge> float ScreenX0, ScreenY0, ScreenX1, ScreenY1; 17:16 < bridge> Graphics()->GetScreen(&ScreenX0, &ScreenY0, &ScreenX1, &ScreenY1); 17:16 < bridge> RenderTools()->MapScreenToInterface(m_pClient->m_Camera.m_Center.x, m_pClient->m_Camera.m_Center.y); 17:16 < bridge> TextRender()->RecreateTextContainer(NamePlate.m_NameTextContainerIndex, &Cursor, ClientData.m_aName); 17:16 < bridge> Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1); 17:16 < bridge> ``` 17:16 < bridge> and whats this doing 17:18 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1311003065490604042/image.png?ex=67474640&is=6745f4c0&hm=3bd63e29d2b0f2fe9d58e0290cffcbcc8609614e6a6b033227daba2fe325f666& 17:18 < bridge> if i remove it this happens 17:20 < bridge> ah i see 17:20 < bridge> thats annoying 18:03 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1311014494293594112/image.png?ex=674750e4&is=6745ff64&hm=77f3532ab5f7607e7ad1992797d3a230282c145d01a31782a9679c8dc9267d53& 18:10 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1311016226755055616/image.png?ex=67475281&is=67460101&hm=18608b10dafa5f20be75610cabcae8075a98f267a74e75d6b1b429c70a152cb2& 18:10 < bridge> why is the outline alpha different 18:10 < bridge> for those rendered with containers and ones with text() 18:40 < bridge> The text color set with the `TextColor` function and the argument for `RenderTextContainer` are multiplied together for the final color I think 18:44 < bridge> manually changing the alpha in textcoloroutline does nothing 18:45 < bridge> Changing the alpha should work with the `RenderTextContainer` function, at least that's how it's done for broadcasts 18:46 < bridge> i dont particualrly want to make 2 more render text containers 18:46 < bridge> i dont particualrly want to make 3 more render text containers 19:00 < bridge> lol you can probably silence this with an attribute 19:00 < bridge> * 19:00 < bridge> Crashes with an assertion immediately when opening the Name Plate settings btw 19:01 < bridge> Also looks a bit weird when you zoom in and out because the text outline size keeps changing, though it does make text look smoother when zoomed more 19:01 < bridge> Also looks a bit weird when you zoom in and out because the text outline size keeps changing, though it does make text look smoother when zoomed in more 19:05 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1311030147826319462/image.png?ex=67475f79&is=67460df9&hm=d668284af1ee2079dd631192075377c0c30929a582575559bf9bf8d3082681bc& 19:07 < bridge> oops 19:08 < bridge> wrong branch 19:11 < bridge> ``` 19:11 < bridge> 2024-11-26 11:10:52 E textrender: Found non empty text container with index 444 with 4 quads 'Ewan' 19:11 < bridge> 2024-11-26 11:10:52 E textrender: The text container index was in use by 2 19:11 < bridge> 2024-11-26 11:10:52 E textrender: Found non empty text container with index 445 with 5 quads 'DDᴍᴀX' 19:11 < bridge> 2024-11-26 11:10:52 E textrender: The text container index was in use by 2 19:11 < bridge> 2024-11-26 11:10:52 I assert: /home/ewan/ddnet-nameplate-fixes/src/engine/client/text.cpp(2355): text container was not empty 19:11 < bridge> ``` 19:11 < bridge> i was playing around a bit with the sizes 19:11 < bridge> the ui seems good imo but i wonder why the base size is 0. maybe you should just opt for absolute units in this case 19:19 < bridge> Changing the scale would break everyone's existing config I guess 19:20 < bridge> maybe the ui should translate the value then 19:20 < bridge> it's not very intuitive 19:20 < bridge> or we can work in percentages and it would make way more sense 19:21 < bridge> 0 = 100% 19:56 < bridge> uhhhh not for me?? o-o 19:57 < bridge> Maybe because of different compiler, Ewan also got a different assertion, I get `Text container index was invalid.` 19:58 < bridge> well i use recreatetextcontainer 19:58 < bridge> without ever creating it 19:58 < bridge> windows always gives me strange bugs because of minor STL differences and the like 19:58 < bridge> because it checks if its valid b4 deleting it so i thought it was fine 19:58 < bridge> you need to test on all 19:58 < bridge> You need to initialize text container indices to -1 then 19:59 < bridge> It's neither valid nor invalid if you don't initialize it 19:59 < bridge> `FriendMarkTextContainerIndex.m_Index = -1;`? 19:59 < bridge> in practice i think uninitialized is invalid 19:59 < bridge> any other language would intrinsically warn or error about it 19:59 < bridge> Not for the code, the code only considers -1 as invalid 19:59 < bridge> ah 20:00 < bridge> idk abt these 20:00 < bridge> yes i do 20:00 < bridge> hmm, looks like the `STextContainerIndex` constructor should have already done that 20:01 < bridge> ` static STextContainerIndex s_NameTextContainerIndex(), s_ClanTextContainerIndex();` 20:01 < bridge> yeah 20:01 < bridge> uhhh 20:01 < bridge> that errors 20:01 < bridge> those are probably not initialized 20:01 < bridge> how would i do that 20:01 < bridge> {} 20:01 < bridge> yeah but then i have to provide every other attribute 20:02 < bridge> i would have to see the code 20:02 < bridge> blast it 20:02 < bridge> no instance of constructor "STextContainerIndex::STextContainerIndex" matches the argument list 20:02 < bridge> `std::shared_ptr m_UseCount = 20:02 < bridge> std::make_shared(STextContainerUsages());` 20:02 < bridge> is the other arg 20:02 < bridge> was the default ctor deleted 20:03 < bridge> i cant use it for statics 20:03 < bridge> This would zero-initialize, which is also wrong 20:03 < bridge> Not sure what you mean, but `static STextContainerIndex s_NameTextContainerIndex{}, s_ClanTextContainerIndex{};` compiles 20:03 < bridge> i cant use () for statics 20:03 < bridge> It also wrong though because it doesn't invoke the constructor 20:03 < bridge> Well, I can :justatest: 20:04 < bridge> `a block-scope function may only have extern storage class` 20:04 < bridge> use extern 20:04 < bridge> 🧠 20:04 < bridge> no 20:04 < bridge> Never use `static` 20:04 < bridge> static doesn't cross TU boundaries 20:04 < bridge> you die 20:04 < bridge> Those should be member variables of `CMenus` 20:04 < bridge> but its only used here 20:04 < bridge> Never use `static` 20:04 < bridge> namespace polution no? 20:04 < bridge> static is moreso 20:04 < bridge> make it member 20:05 < bridge> `static` is the cause of most bugs and lazyness 20:05 < bridge> static in methods is a silent killer 20:05 < bridge> you can go for quite a while before realizing that variable is shared across all objects lmfao 20:05 < bridge> shouldnt matter here i recreate it every frame anwyay 20:06 < bridge> then it absolutely has no reason to be static 20:06 < bridge> fair 20:07 < bridge> ugh cpp please 20:07 < bridge> `STextContainerIndex &TextContainerIndex` 20:07 < bridge> means it wants just anything 20:07 < bridge> and not a pointer 20:07 < bridge> so why the heck is ` STextContainerIndex NameTextContainerIndex(), ClanTextContainerIndex(); 20:07 < bridge> ` not valid 20:08 < bridge> See broadcast for correct usage of text containers in classes 20:08 < bridge> wait i dont need to intiailize it 20:08 < bridge> if i only create it 20:08 < bridge> yes 20:08 < bridge> doink 20:09 < bridge> Also `m_` prefix. And delete the text container in `OnWindowResize` 20:09 < bridge> All text containers need to be deleted when resizing, or you'll get a crash then 20:09 < bridge> discord code review... the future of collaboration 20:09 < bridge> i resize windows alot 20:09 < bridge> and it hasnt crashed yet for me 20:09 < bridge> but oke 20:09 < bridge> right 20:10 < bridge> we have both witnessed 2 different crashes thanks to that thinking 20:10 < bridge> just do it right tbh\ 20:10 < bridge> idk what right is 20:10 < bridge> thats why i said oke 20:10 < bridge> word 20:10 < bridge> `FriendMarkTextContainerIndex` is also not deleted on resize 20:10 < bridge> "also"? 20:11 < bridge> The text container assertions are not guaranteed, you are lucky if you get any if you do something wrong 20:11 < bridge> In addition to the next text containers for the name and clan in the settings preview 20:11 < bridge> In addition to the new text containers for the name and clan in the settings preview 20:11 < bridge> if i just use recreatetextcontainer on FriendMarkTextContainerIndex 20:11 < bridge> then it will work after a resize? 20:11 < bridge> Maybe, maybe not 20:12 < bridge> Better do what the specification says 20:12 < bridge> i dont check if its valid i dont think 20:12 < bridge> so deleting it wouldnt work but invaliditing it so that it does recreatetextcontaeiner would work 20:12 < bridge> but ill change it 20:13 < bridge> wait hwat if the friendmark icon is invalid every time it is created, is that possible? 20:13 < bridge> then it will try to make it 20 times per frame 20:14 < bridge> I think creating text containers will soft-fail if you don't have any text, i.e. only empty string without spaces 20:14 < bridge> that doesnt happen cuz its always a heart 20:14 < bridge> but otherwise its pretty garunteed to not fail? 20:14 < bridge> hell yeah this is so fast and i can ask questions about all the things 20:15 < bridge> and i get response 20:15 < bridge> B) 20:15 < bridge> where else? 20:15 < bridge> since the other 2 i made are no longer static 20:15 < bridge> I think it's good practice to check anyway if it's valid 20:15 < bridge> my precious cycles 20:15 < bridge> whatever shall i do 20:16 < bridge> If you made them `CMenus` member variables then you need to delete those containers in the `CMenus::OnWindowResize` function 20:16 < bridge> if i check if its valid and its not, then i make it do i have to create its valid again 20:16 < bridge> if, and i didnt 20:16 < bridge> but i did here 20:16 < bridge> ``` 20:16 < bridge> virtual void OnWindowResize() override { 20:16 < bridge> TextRender()->DeleteTextContainer(m_FriendMarkTextContainerIndex); 20:16 < bridge> } 20:16 < bridge> ``` 20:16 < bridge> i like it too 20:17 < bridge> real code review certainly has its place in bigger teams but like 20:17 < bridge> 1 on 1 it's a total waste of time 20:17 < bridge> wdym 20:17 < bridge> yeah, that belongs in nameplates.cpp 20:17 < bridge> just talk it out 20:17 < bridge> and then the changes are made 20:17 < bridge> in fast time. 20:17 < bridge> woaw 20:17 < bridge> well ill push 20:17 < bridge> what i have now 20:17 < bridge> and probably 500 things be wrong again 20:17 < bridge> but 20:18 < bridge> i cant particularly get it to crash x-x 20:18 < bridge> all part of the process right 20:18 < bridge> yeah i mean VMs suck but they are kinda necessary for cross platform development 20:18 < bridge> I'll do a full review tomorrow when I have time. Some small things to fix: 20:18 < bridge> - There are more variables that don't need to be `static` at all 20:18 < bridge> - Use `m_` prefix for member variables 20:19 < bridge> i think ive gotten all of them 20:19 < bridge> at least in the c++ world where there are so many platform considerations lol 20:19 < bridge> rust does not fucking care and i love it 20:19 < bridge> i just write the code and it WORKS 20:19 < bridge> why not static on things like bufs 20:19 < bridge> is it just premature optimization 20:19 < bridge> Yeah, also it leads to bugs and you can't reuse those functions 20:19 < bridge> well in this case every time the buf is used it should be rewritten 20:20 < bridge> threading go brr 20:20 < bridge> thread_local go brrr 20:20 < bridge> Then that's something for the compiler to figure out 20:20 < bridge> im scared that the compiler cant handle all the string shenangins 20:20 < bridge> i would be impressed if it could figure out how to convert constnat string_appends into a single clean format 20:20 < bridge> or copies rather 20:21 < bridge> to reduce the number of times strlen is called 20:21 < bridge> static for a fixed region of memory that you're guaranteed to replace every time is probably fine, but you need to have a real use for that which a member wouldn't fill 20:21 < bridge> `str_*` should be pretty fast, `std::string` not so much 20:21 < bridge> str_append calls strlen ): 20:21 < bridge> it makes me sad 20:21 < bridge> yes but it's an abstraction 20:21 < bridge> deliberately 20:21 < bridge> i dont think the compiler can do anything abt it 20:21 < bridge> if u look at the system code some things have to be left up to e.g. winapi because the libc is inconsistent 20:21 < bridge> `str_append` is still orders of magnitude faster than using `str_format` for concat 20:22 < bridge> realy? 20:22 < bridge> yes 20:22 < bridge> o 20:22 < bridge> it's a copy vs. a multi-step format process 20:22 < bridge> basically 20:22 < bridge> i gues so eah 20:22 < bridge> alloc and copy 20:22 < bridge> i gues so yeah 20:22 < bridge> `str_format` needs to handle varargs which are pretty slow 20:22 < bridge> and parse the format string 20:22 < bridge> var args arent figured out at compile time? 20:22 < bridge> definitely not 20:22 < bridge> (that is the function inlined and loop unwrapped) 20:22 < bridge> functions like printf will insist on using a string literal, i think 20:22 < bridge> but you can put whatever you want in there 20:23 < bridge> you can get around rules very easy 20:23 < bridge> if the function isn't constexpr then don't rely on it to be known at compile time 20:23 < bridge> sorry, consteval 20:23 < bridge> constexpr for vars and things 20:23 < bridge> but really either 20:24 < bridge> by warning usually 20:24 < bridge> by warning in my experience 20:25 < bridge> We optimized `str_format` with `%d` to compile to `std::to_chars` in release mode instead because it increases FPS by like 25% in the editor with tile info is shown 20:25 < bridge> awesome 20:25 < bridge> so you just catch %d yourself? 20:26 < bridge> ```cpp 20:26 < bridge> int str_format_int(char *buffer, size_t buffer_size, int value); 20:26 < bridge> 20:26 < bridge> template 20:26 < bridge> int str_format_opt(char *buffer, int buffer_size, const char *format, Args... args) 20:26 < bridge> { 20:26 < bridge> static_assert(sizeof...(args) > 0, "Use str_copy instead of str_format without format arguments"); 20:26 < bridge> return str_format(buffer, buffer_size, format, args...); 20:26 < bridge> } 20:26 < bridge> 20:26 < bridge> template<> 20:26 < bridge> inline int str_format_opt(char *buffer, int buffer_size, const char *format, int val) 20:26 < bridge> { 20:26 < bridge> if(strcmp(format, "%d") == 0) 20:26 < bridge> { 20:26 < bridge> return str_format_int(buffer, buffer_size, val); 20:26 < bridge> } 20:26 < bridge> else 20:26 < bridge> { 20:26 < bridge> return str_format(buffer, buffer_size, format, val); 20:26 < bridge> } 20:27 < bridge> } 20:27 < bridge> 20:27 < bridge> #define str_format str_format_opt 20:27 < bridge> ``` 20:27 < bridge> It does the `strcmp` at compile-time 20:27 < bridge> nice 20:27 < bridge> why not just replace every occoruwence of it 20:27 < bridge> That's what we previously did, but then you need to change the existing code and keep reminding others about it 20:27 < bridge> Like this it's just automatic 20:27 < bridge> Like this it's just automatic for the most common use case 20:27 < bridge> cant u just make it part of style 20:27 < bridge> or something 20:27 < bridge> no 20:27 < bridge> clang tidy maybe 20:27 < bridge> soryr yeah that 20:27 < bridge> but custom rules are not easy to write 20:28 < bridge> they require making a plugin basically 20:28 < bridge> just check for `strcmp("%d"` in all files 20:28 < bridge> idk man 20:28 < bridge> Ideally, it should also be automated checks, otherwise the style will become outdated over time, but not everything can be checked automatically very easily without adding yet another script 20:28 < bridge> wb `strcmp ("%d"` 20:28 < bridge> like 20:28 < bridge> just check for `strcmp("%d",` in all files 20:28 < bridge> i guess that would be caught by clang format but it's just a bit goofy 20:28 < bridge> that gets caught by style 20:29 < bridge> In this case there's no reason to use style guides if the compiler can do it for use (in release mode) 20:29 < bridge> In this case there's no reason to use style guides if the compiler can do it for us (in release mode) 20:30 < bridge> i might have to make another user on my computer just for work 20:30 < bridge> that doesn't have discord on it 20:30 < bridge> im so fucking distracted 20:30 < bridge> close discord 20:30 < bridge> B) 20:31 < bridge> cant 20:31 < bridge> i open it 20:31 < bridge> i’m so doomed 21:01 < bridge> https://youtu.be/52v6gKPA4TM 21:31 < bridge> hi, where in the server code is the initialization of the player connection? I found in processclientpacket NETMSG_INFO, I send a special packet to the client, but the client does not accept them (I tried to debug) 21:31 < bridge> 21:31 < bridge> but if I send this packet from using the rcon command it works