02:07 <+bridge> [ddnet] hmm, gameworlds being handled by the gamecontroller turns out to be quite unwise :/ 03:01 <+bridge> [ddnet] @Ryozuki && @heinrich5991 can you both take a look at that commit? I'm not sure I like the organization with the worlds being owned by the controller 03:02 <+bridge> [ddnet] (The commit works, but you need to modify the code to put tees in separate teams and initialize the world by hand in `CGameControllerDDRace` ) 03:02 <+bridge> [ddnet] Also I had no idea how to handle the `m_Paused` 03:04 <+bridge> [ddnet] I also tried my very best not to touch the vanilla gamecontroller but I need to get rid of some of the team code and I don't really know how 03:04 <+bridge> [ddnet] Vanilla really should have had a fully abstract `IGameController` ... 11:38 <+bridge> [ddnet] @Learath2 paused is the thing used in start of tournaments right? 11:40 <+bridge> [ddnet] Yeah, so maybe a global paused is something i need to have 11:40 <+bridge> [ddnet] @Learath2 one thing i never liked is that character adds himself to the gameworld, and i think it would make more sense to be managed by the gameworld directly 11:40 <+bridge> [ddnet] Ala its the gameworld who respawns and adds the entity 11:40 <+bridge> [ddnet] Not character itself 11:40 <+bridge> [ddnet] It kinda breaks the hierarhy 11:40 <+bridge> [ddnet] But its unrelsted to this tho 11:41 <+bridge> [ddnet] Damn mobile 11:41 <+bridge> [ddnet] @Ryozuki sadly all entities add themselves, I dont really think its a good idea to make so many changes just to get better hierarchy 11:41 <+bridge> [ddnet] I guess 11:41 <+bridge> [ddnet] :feelsbadman: 11:41 <+bridge> [ddnet] Maybe I can do it after I finish up the teams i can go through and change that 11:42 <+bridge> [ddnet] Didnt u say 0.7 is the oportunity for big changes? ๐Ÿ˜ 11:42 <+bridge> [ddnet] Ill try to help too specially this weekend 11:45 <+bridge> [ddnet] I wish github had a mobile app 12:50 <+bridge> [ddnet] @Learath2 your helper commit misses a lot of things 12:51 <+bridge> [ddnet] Probably, not all commits are supposed to work on that branch, im still laying things out 12:51 <+bridge> [ddnet] What did you have in mind? 12:52 <+bridge> [ddnet] i will do a pr after shower, you missed basic stuff to get the helper working in general 12:52 <+bridge> [ddnet] in case any1 is using windows and discord might be interesting: https://www.bleepingcomputer.com/news/security/discord-turned-into-an-info-stealing-backdoor-by-new-malware/ 12:52 <+bridge> [ddnet] You can log in as helper and there is a console level for helper, I dont see what's missing but sure feel free to pr 12:54 <+bridge> [ddnet] did you try logging in? 12:55 <+bridge> [ddnet] Well, probably my mod again having more stuff so more required changes 12:55 <+bridge> [ddnet] I can check later 13:11 <+bridge> [ddnet] yo bash haxx0rs? How to compare against newline? :/ 13:11 <+bridge> [ddnet] 13:11 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/637246826717642753/unknown.png 13:11 <+bridge> [ddnet] i can easily match the $c newline but not the $nl 13:11 <+bridge> [ddnet] 13:11 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/637246909148299265/unknown.png 13:12 <+bridge> [ddnet] oh wait that code is fucked xd 13:12 <+bridge> [ddnet] 13:12 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/637247145002401822/unknown.png 13:12 <+bridge> [ddnet] thats what i ment but it has same result 13:14 <+bridge> [ddnet] nvm got it 13:14 <+bridge> [ddnet] 13:14 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/637247665817780244/unknown.png 13:14 <+bridge> [ddnet] that works ๐Ÿ™‚ 13:17 <+bridge> [ddnet] @Learath2 13:18 <+bridge> [ddnet] u chiller 13:18 <+bridge> [ddnet] Ah, I missed the default key and setting the actual access level 13:19 <+bridge> [ddnet] I'll accept the pr, but I hope you know that the code is open source, and all your contributions are also open source 13:21 <+bridge> [ddnet] I know that 13:21 <+bridge> [ddnet] Why do you tell me that so explicitly? :) 13:23 <+bridge> [ddnet] Well you asked us not to host your version of the code, I'm just stating upfront that I won't be removing this branch under any condition 13:23 <+bridge> [ddnet] We really should add a CONTRIBUTION file 13:23 <+bridge> [ddnet] You can do it. I messaged heinrich about that already 13:24 <+bridge> [ddnet] As I told you now too in pm, I thought about the whole situation 13:24 <+bridge> [ddnet] I see 13:25 <+bridge> [ddnet] And I definitely apologize for all that. 13:25 <+bridge> [ddnet] I wouldnt make any pr's right now if I would still be against all this 13:25 <+bridge> [ddnet] It happens 13:26 <+bridge> [ddnet] Sometimes people can just get on your nerves 13:26 <+bridge> [ddnet] :/ 13:26 <+bridge> [ddnet] true 13:26 <+bridge> [ddnet] about the md5 thing 13:27 <+bridge> [ddnet] ๐Ÿคก 13:27 <+bridge> [ddnet] the function `md5_finish_` is actually called once, with the correct parameters. It just didnt get renamed and failed the build 13:27 <+bridge> [ddnet] The md5 thing links fine on ddnet 0.6, and links fine on linux for me, but I'm using hash_openssl 13:27 <+bridge> [ddnet] there are two different md5_finish's 13:27 <+bridge> [ddnet] thats the point 13:27 <+bridge> [ddnet] hash_openssl is not used รณn win (at least for me) 13:27 <+bridge> [ddnet] yeah, the bundled one looks wrong to me aswell 13:28 <+bridge> [ddnet] no idea, but this change at least fixed the build 13:28 <+bridge> [ddnet] Yeah, it is correct, I just missed it while porting the md5 implementation over 13:28 <+bridge> [ddnet] I just took the name with the underscore from where it acutally gets called, there it is correct 13:28 <+bridge> [ddnet] Ah, okay 13:29 <+bridge> [ddnet] Should commit the md5 thing to vanilla aswell 13:32 <+bridge> [ddnet] I mean hash_bundled and using openssl if available 14:02 <+bridge> [ddnet] @deen I wanted to remove the last commit before merging those 2 prs 14:04 <+bridge> [ddnet] I can rebase, reorder anyway 14:09 <+bridge> [ddnet] also no need to bother with bors on d7 as I dont run it through ci yet anyway 14:09 <+bridge> [ddnet] it's more of a drawing board 15:13 <+bridge> [ddnet] did u mess with the git history? Should i refork? :/ 15:18 <+bridge> [ddnet] Were you messing around with d7? 15:19 <+bridge> [ddnet] I thought no one else was doing anything with it, soz, I'll keep the history sane after this 15:20 <+bridge> [ddnet] don't refork, you can just `git reset --hard ddnet/d7` your own d7 branch, if you were working on some other branch you'll need to rebase it 15:44 <+bridge> [ddnet] what is master and what is d7 used for? 15:44 <+bridge> [ddnet] i think i only used master 15:50 <+bridge> [ddnet] d7 is a rewrite, master is fokkonauts port 15:50 <+bridge> [ddnet] hi 15:51 <+bridge> [ddnet] ah i see 15:52 <+bridge> [ddnet] so rewrite ddnet7 from scratch? 15:52 <+bridge> [ddnet] is d7 planned to replace master? 16:05 <+bridge> [ddnet] Just make d7 the main one 16:05 <+bridge> [ddnet] default* 16:07 <+bridge> [ddnet] If it ever gets completed, yes that'll be the adopted version 16:08 <+bridge> [ddnet] @Ryozuki do you like the CGameWorlds belonging to the gamecontroller? 16:13 <+bridge> [ddnet] @Learath2 whats the alternative? 16:16 <+Ryozuki> thanks bouncer i got all irc configured fast, but im on fedora and i hate it 16:16 <+bridge> [ddnet] CGameContext owning the worlds maybe 16:17 <+Ryozuki> wait a bit i look d7 code 16:19 <+bridge> [ddnet] @Ryozuki I moved the team stuff to a branch of it's own, `fb_teams` 16:22 <+Ryozuki> i compiled d7 16:22 <+Ryozuki> idk if its fedora stuff but i see one of the things in the bg 16:22 <+Ryozuki> in 4 colors 16:22 <+Ryozuki> like the texture is missing 16:25 <+Ryozuki> https://imgur.com/mtrHPBU 16:27 <+bridge> [ddnet] welcome to 0.7 @Ryozuki ๐Ÿ™‚ 16:27 <+bridge> [ddnet] just 0,7 things 16:28 <+bridge> [ddnet] @Ryozuki did you clone the submodules aswell? 16:28 <+Ryozuki> oh 16:28 <+Ryozuki> xd 16:28 <+bridge> [ddnet] nobo xd 16:28 <+bridge> [ddnet] wonder that it even compiles without submodules 16:28 <+Ryozuki> Learath2: itdoesnt make sense for worlds to be managed by controller i think 16:28 <+Ryozuki> to not be 16:28 <+Ryozuki> * 16:28 <+Ryozuki> ups 16:28 <+Ryozuki> i think 16:29 <+Ryozuki> IGameController::OnEntity(int Index, vec2 Pos, int Layer, int Flags, int Number) 16:29 <+Ryozuki> for example 16:29 <+Ryozuki> i think it makes sense for worlds to manage their own entities 16:29 <+Ryozuki> just like character shouldnt manage itself (inserting itself to the world) 16:29 <+Ryozuki> i think the current hierarchy is not good 16:31 <+Ryozuki> @ChillerDragon it compiles cuz apparently the submodules are just game resources not code 16:31 <+Ryozuki> hmm i still see the same texture stuff after git submodule update --init 16:32 <+Ryozuki> ill clean build 16:34 <+Ryozuki> ah my bad 16:34 <+Ryozuki> i was on master 16:34 <+Ryozuki> on d7 looks fine 16:44 <+bridge> [ddnet] yea the d7/master thing is a bit confusing :/ 16:46 <+Ryozuki> @Learath2 hmm maybe its fine with controller having the worlds 16:46 <+Ryozuki> but maybe we can move some stuff directly to the world class 16:46 <+bridge> [ddnet] OnEntity handles creating the entities added to the map 16:46 <+bridge> [ddnet] like? 16:47 <+Ryozuki> hmm wait 16:52 <+Ryozuki> ok nvm 16:55 <+Ryozuki> @Learath2 what about the helper methods from gamecontext being in the gameworld instead? 16:55 <+Ryozuki> (createexplosion, etc) 17:09 <+bridge> [ddnet] Oh, hmm, those do sound like they belong there indeed 17:16 <+Ryozuki> @Learath2 maybe you could provide a todo somewhere on what stuff needs to be done, and the priority 17:20 <+bridge> [ddnet] You can grep my entire code for TODOs for small things 17:21 <+bridge> [ddnet] I should make a TODO to lay out the outline too with bigger tasks 17:47 <+bridge> [ddnet] Entites inserting themselves does make this a tad difficult 17:49 <+bridge> [ddnet] @Ryozuki hmm, when I create a new CGameWorld for a team, I'll need to iterate all the tiles on the map again to create the entities, do you think that's a good idea? :/ 18:00 <+Ryozuki> hmm 18:00 <+Ryozuki> maybe we can share entities that doesnt change whether ur in a team 18:00 <+Ryozuki> or is it another thing? 18:01 <+bridge> [ddnet] Hmm ,I wonder how entites behave if inserted in two worlds ๐Ÿ˜„ 18:09 <+Ryozuki> @Learath2 it would be cool if teams could be completly separated, we could even have the crazy idea to have them in different threads 18:09 <+Ryozuki> idk if that would be profitable 18:09 <+Ryozuki> or possible 18:10 <+bridge> [ddnet] yikes multithreaded 18:10 <+Ryozuki> in this modern world cpus have multiple cores 18:10 <+Ryozuki> :p 18:10 <+bridge> [ddnet] yea agree 18:11 <+bridge> [ddnet] sounds cool but also tricky 18:11 <+Ryozuki> and complicated 18:11 <+bridge> [ddnet] there are some things that are still shared 18:11 <+bridge> [ddnet] I have huge concerns with DoS especially when I have to iterate over the entire map to add entities when the world is created by a team 18:11 <+Ryozuki> ye we would need synchronization or whathever 18:11 <+bridge> [ddnet] spamming /team 18:11 <+Ryozuki> cant u just clone the team 18:11 <+Ryozuki> @Learath 18:11 <+Ryozuki> hmm 18:12 <+bridge> [ddnet] what happens if some dickhead joins 64 dummies and does /team {1..64} on those? 18:12 <+bridge> [ddnet] yea 18:12 <+Ryozuki> xD 18:12 <+bridge> [ddnet] what do you guys think about removing teams? 18:12 <+bridge> [ddnet] that would iterate through the entire map 64 times 18:12 <+Ryozuki> maybe we could rethink the idea of a team yes 18:12 <+bridge> [ddnet] maybe I could populate all the gameworlds on server launch, but that would be a waste of memory imho 18:12 <+Ryozuki> yeah 18:13 <+bridge> [ddnet] keep in mind we want to scale to unlimited slots @Learath2 :troll: 18:13 <+Ryozuki> @Learath2 maybe some entity cache 18:13 <+Ryozuki> or smth 18:14 <+bridge> [ddnet] @ChillerDragon yeah I already have it set up so I can extend it to infinite teams or teams with names instead of numbers 18:14 <+bridge> [ddnet] yea? โค 18:14 <+Ryozuki> yes, its important that we can reach team 69 18:14 <+bridge> [ddnet] 1337 18:14 <+bridge> [ddnet] the only problem is the fact that creating a new team might lag the server 18:14 <+bridge> [ddnet] which is unacceptable 18:14 <+Ryozuki> yep 18:14 <+bridge> [ddnet] :/ 18:15 <+bridge> [ddnet] hmm, maybe I can thread the iteration of the map and dont let the players join the team until the world is populated 18:15 <+Ryozuki> entities are shields doors and stuff right? 18:15 <+bridge> [ddnet] y 18:16 <+Ryozuki> is it rly impossible to clone the world? 18:16 <+Ryozuki> if that makes sense 18:17 <+bridge> [ddnet] well it isn't impossible, but in C++ this deep copy would be 18:17 <+bridge> [ddnet] hmmm, how do I put it nicely 18:17 <+Ryozuki> we could keep static entities separate from those dynamic 18:17 <+bridge> [ddnet] cancer 18:17 <+Ryozuki> like character 18:17 <+Ryozuki> a shield will never change 18:18 <+bridge> [ddnet] cant u switch shields? 18:18 <+Ryozuki> well maybe we could reset the entities to their initial state 18:18 <+bridge> [ddnet] but yea non switches shields stay... until you collect them :troll: 18:19 <+bridge> [ddnet] Problem isn't the fact that things change, we can clone characters aswell that's not the issue 18:19 <+bridge> [ddnet] the issue is that the entities don't know their initial states 18:19 <+Ryozuki> then we can save them 18:19 <+bridge> [ddnet] Hmm, maybe a reference gameworld that no one ever joins and is eternally paused 18:19 <+bridge> [ddnet] I could copy everything over from there 18:19 <+Ryozuki> sounds like a good idea 18:19 <+Ryozuki> i wouldnt call it gameworld maybe 18:19 <+Ryozuki> it could be misleading 18:20 <+bridge> [ddnet] It will be a `CGameWorld` we could name it whatever we want though ๐Ÿ˜„ 18:20 <+Ryozuki> ah 18:20 <+bridge> [ddnet] `m_ReferenceWorld`? 18:20 <+Ryozuki> ye 18:21 <+bridge> [ddnet] Well I'll still need to write copy constructors for all of the entities but it's a good starting point 18:21 <+Ryozuki> we must definitly make them not self insert imho 18:21 <+bridge> [ddnet] Let me quickly try to rework that 18:22 <+bridge> [ddnet] I wonder however why matricks decided to make them self insert in the first place 18:22 <+bridge> [ddnet] I have a feeling I'll find his reason in a minute ๐Ÿ˜„ 18:23 <+Ryozuki> :o 18:23 <+Ryozuki> @Learath2 probs so he can do new CProjectile() and forget 18:24 <+bridge> [ddnet] Well found one problem already 18:24 <+Ryozuki> well idk 18:24 <+Ryozuki> whats it 18:24 <+bridge> [ddnet] I wonder if it's an actual issue, but the character is only marked alive after it's inserted into the world 18:24 <+Ryozuki> well 18:24 <+Ryozuki> its a feature 18:24 <+bridge> [ddnet] eh, I'll try 18:24 <+Ryozuki> when the character is dead 18:25 <+Ryozuki> it isnt even allocated 18:25 <+Ryozuki> iirc 18:25 <+Ryozuki> look into CPlayer 18:25 <+Ryozuki> it allocates it on every respawn 18:25 <+Ryozuki> iirc 18:26 <+Ryozuki> https://github.com/ddnet/ddnet/blob/master/src/game/server/player.cpp#L494 18:26 <+Ryozuki> https://github.com/ddnet/ddnet/blob/master/src/game/server/player.cpp#L565 18:26 <+Ryozuki> see 18:26 <+Ryozuki> i guess its same on vanilla 18:29 <+bridge> [ddnet] I can't seem to find where CFlag is ever constructed 18:31 <+bridge> [ddnet] oh it was probably in ctf.cpp 18:59 <+bridge> [ddnet] @Ryozuki I don't like it 19:17 <+bridge> [ddnet] xd 19:18 <+bridge> [ddnet] Let me see 19:22 <+Ryozuki> @Learath2 u still make the entity insert itself kinda 19:23 <+Ryozuki> hmm 19:24 <+Ryozuki> @Learath2 InsertInto is a misleading name 19:24 <+Ryozuki> if its what i think it is, it should be OnInsert 19:26 <+bridge> [ddnet] Probably, I just quickly whipped it up to see what changes would entail 19:26 <+Ryozuki> i think its good to have a OnInsert 19:26 <+Ryozuki> so you can clearly see what happens when its inserted 19:27 <+Ryozuki> @Learath2 while you are at it maybe u can add a getter World() or something 19:27 <+bridge> [ddnet] There is a getter for it 19:27 <+bridge> [ddnet] GameWorld() 19:27 <+Ryozuki> you dont use it 19:27 <+bridge> [ddnet] Where? 19:27 <+Ryozuki> oh wait 19:28 <+Ryozuki> the gamecontroller doesnt have it too? 19:28 <+bridge> [ddnet] Problem is that some entities need the gameworld to construct themselves so you need to wait until insertion to get the gameworld 19:28 <+Ryozuki> which ones? 19:29 <+bridge> [ddnet] The ones that have Server() or a function call in their InsertInto's 19:29 <+bridge> [ddnet] Gamecontroller doesn't have a getter for world because there is a problem there ๐Ÿ˜„ 19:30 <+Ryozuki> ?? 19:30 <+bridge> [ddnet] I didn't feel like breaking the vanilla gamecontroller, but the fact that now we have multiple gameworlds the vanilla controller started falling apart 19:30 <+Ryozuki> ye 19:30 <+Ryozuki> u can always pass for example starttick and team directly 19:30 <+Ryozuki> on the constructor 19:30 <+Ryozuki> so u dont have to wait for insert 19:30 <+Ryozuki> on cproj 19:30 <+bridge> [ddnet] Maybe I should just cannibalize the gamecontroller 19:30 <+Ryozuki> you can also mkae a helper function on the world 19:31 <+Ryozuki> World()->CreateProjectile() 19:31 <+Ryozuki> with sensible defaults 19:32 <+Ryozuki> @Learath2 u will chuckle but there is a thing called factories 19:32 <+Ryozuki> xd 19:33 <+Ryozuki> idk if this concept is used in c++ a lot tho 19:34 <+bridge> [ddnet] You mean `public static final void __AbstractWorldEntityFactoryManagerEx`? 19:35 <+Ryozuki> well u make the worst case but ok xd 19:35 <+Ryozuki> @Learath2 one thing it doesnt make sense to me is that cprojectile gets a team on insert 19:35 <+Ryozuki> why is that 19:35 <+Ryozuki> shouldnt the world abstract that away somehow 19:36 <+bridge> [ddnet] @Ryozuki we don't have access to the server until then either 19:37 <+Ryozuki> thats why a factory would solve that maybe 19:37 <+Ryozuki> if u create it through it 19:37 <+Ryozuki> the factory has access to the world 19:37 <+Ryozuki> by factory i mean a way to generalize World()->CreateProjc() 19:37 <+Ryozuki> idk 19:38 <+Ryozuki> maybe im just talking bullshit 19:38 <+Ryozuki> idk anymore 19:38 <+Ryozuki> xd 19:40 <+bridge> [ddnet] @Ryozuki you mean the world itself creates and inserts the entity? 19:40 <+Ryozuki> y 19:40 <+bridge> [ddnet] I could probably abuse C++ lambda functions to achieve that 19:42 <+Ryozuki> try it 19:42 <+Ryozuki> :o 19:42 <+bridge> [ddnet] I don't really like the fact that I have to call `CEntity::InsertInto` in all my overriden InsertInto's tho 19:42 <+bridge> [ddnet] Any idea how to get that fixed? 19:42 <+Ryozuki> we could also provide always the tick when the entity was created 19:42 <+Ryozuki> hmm 19:42 <+Ryozuki> ye 19:42 <+Ryozuki> creating the from the world 19:42 <+bridge> [ddnet] Oh, I should add the gameworld back to the constructor if i'm letting the world construct the entity 19:43 <+Ryozuki> is a way tofix that 19:43 <+Ryozuki> why u dont just pass the parameters needed 19:43 <+Ryozuki> instead of the world 19:43 <+bridge> [ddnet] I'm going out for quik food, then I'll try that 19:43 <+Ryozuki> xd 19:43 <+bridge> [ddnet] @Ryozuki because some entities do actually require the world 19:43 <+Ryozuki> like which 19:44 <+bridge> [ddnet] laser e.g. needs intersectcharacter 19:47 <+bridge> [ddnet] hmm, actually I can't add the gameworld back to the constructor of centity 19:47 <+bridge> [ddnet] what if someone constructs an entity with one world then inserts it to another 19:47 <+Ryozuki> why you dont simply pass a reference to the charcore 19:48 <+Ryozuki> if it needs it 19:48 <+Ryozuki> why would u need to do that 19:48 <+bridge> [ddnet] the laser intersects with others in a future time 19:48 <+bridge> [ddnet] not intentionally, but that is known at compile time, it should be preventable 19:49 <+Ryozuki> well if this solution just complicates things then its not good 19:49 <+Ryozuki> xD 19:49 <+bridge> [ddnet] eh,. theere should be no harm in setting things OnInsert 19:49 <+bridge> [ddnet] As the entity won't even start ticking before insert 22:44 <+bridge> [ddnet] you could actually run one ddnet server with valgrind to see what problems getinfo causes 22:44 <+bridge> [ddnet] as long as it had no players 22:45 <+bridge> [ddnet] or use gdb and press ctrl-c a few times, the poor man's sampling 22:45 <+bridge> [ddnet] an easy way might be to cache the getinfo response for each second 23:32 <+bridge> [ddnet] @deen I ran a ddnet server under gprof