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