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 2022-10-13 00:00:00Z and 2022-10-14 00:00:00Z
Avatar
Avatar
deen
why store the cskin as a unique_ptr in unordered_map anyway? If it‘s just a cskin you can emplace and only the map allocates anything
And what do you use as key?
04:53
You could overload the hash to work with cskin
04:57
Tho the hash might calculate before inserting takes place
Avatar
fixed size array with a cstr of the name of skin.
Avatar
But then the string must be a heap object
06:58
I think arrays doent have std hash support
06:58
But if u have time to implement what u mean do it, bcs reading code is easier xd
07:00
In the end it doesn't matter too much. If it creates two pointers plus cskin in heap vs cskin and a 24 bytes array
Avatar
Having it disabled opens up the server for attacks.

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's mem...
Avatar
Why are all source files in ddnet CMakeLists written manually and not e.g. using file()?
Avatar
i have brought new SSD and just installed windows and some software. I tried to run DDNet but it doesn't start, maybe i have no software like directX, visual C++, Framework, etc?
Avatar
Avatar
destroyed230
i have brought new SSD and just installed windows and some software. I tried to run DDNet but it doesn't start, maybe i have no software like directX, visual C++, Framework, etc?
Amd GPU?
09:24
We don't use any redistributable
09:25
Ddnet is not compiled with windows tools
Avatar
i don't see settings_ddnet.cfg there
Avatar
Create it
Avatar
worked, thx)
Avatar
Fix typo: https://github.com/ddnet/ddnet/blob/6c3d0e999b92b30b48ea1c220a03ff1495ce400b/src/game/mapbugs_list.h#L3

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing ma...
Avatar
Avatar
Mʎɹ シ
Why are all source files in ddnet CMakeLists written manually and not e.g. using file()?
You’ll have to ask @heinrich5991 but I think this was the recommended approach by cmake docs.
Avatar
ea17fc7 Enable antispoof for vanilla by default - heinrich5991 83aeb25 Merge #5943 - bors[bot]
Avatar
Found ictf based on ddnet, it has antispoof, you can host it https://github.com/teeworlds-instagib-elo/iCTFX
iCTFX is ictf rebased onto the ddrace codebase. Contribute to teeworlds-instagib-elo/iCTFX development by creating an account on GitHub.
13:48
however needs to be modified (edited)
Avatar
Avatar
Mʎɹ シ
Why are all source files in ddnet CMakeLists written manually and not e.g. using file()?
because that works better when the set of files change
14:01
is there an issue with it?
Avatar
Avatar
heinrich5991
is there an issue with it?
too lazy to add new files in alphabetic order 💤
Avatar
I put the alphabetic order so we don't argue about the order ^^
Avatar
Avatar
heinrich5991
is there an issue with it?
No, just question
Avatar
Avatar
heinrich5991
I put the alphabetic order so we don't argue about the order ^^
But it's a different alphabetic order than vscode uses. If it wasn't changed already xd and that sucks xd
Avatar
Vscodes is the weird one out iirc :/
Avatar
Avatar
heinrich5991
because that works better when the set of files change
it works good otherwise too xd
Avatar
Avatar
heinrich5991
I put the alphabetic order so we don't argue about the order ^^
let's puz reverse alphabetic order to even things
14:36
alwyas A first, never Z
Avatar
Avatar
Learath2
Vscodes is the weird one out iirc :/
I dunno i think had todo with underscores and stuff. It's more likely someone from vscode thought about a reason than us or not. But I'd need to check kde behaviour ^^
Avatar
It's not that complicated iirc. Vscode uses a locale when sorting. Cmake uses ascii order
Avatar
Ok
Avatar
is it ok to not have virtual destructors here?
14:42
Destructor of 'CLinearScrollbarScale' is public and non-virtual (fix available)clang-tidy(cppcoreguidelines-virtual-class-destructor)
Avatar
Can you delete IScrollBarScale's destructor and see if it still complains?
14:47
I'll admit this is one thing I'm not too familiar with
14:47
I know you need a virtual destructor if you delete through the base class
Avatar
if i add virtual ~IScrollbarScale() = delete;
14:49
to it
14:49
it doesnt complain
14:49
Attempt to use a deleted functionclang(deleted_function_use) ui.h(37, 10): '~IScrollbarScale' has been explicitly marked deleted here
Avatar
Try without the virtual
Avatar
but CLogarithmicScrollbarScale breaks
14:49
without virtual it complains
Avatar
Hm, why is the default destructor even needed for a pure virtual class I wonder
14:50
Yeah idk, I find OOP disgusting anyway
Avatar
I understand the need for a virtual destructor. But why do we need a pure virtual destructor? In one of the C++ articles, the author has mentioned that we use pure virtual destructor when we want t...
14:50
yeah rust better
Avatar
Oop best
14:54
After vulkan
Avatar
Which is better than rust
Avatar
Avatar
Chairn
oop
It's do good we even added an emote for it
14:55
Soo
Avatar
we need a rusty emote when old players come back to game after some time
14:56
:rust:
Avatar
[quakenet] ChillerDragon BOT 2022-10-13 14:57:49Z
:rustlang:
Avatar
Avatar
heinrich5991
because that works better when the set of files change
Then the question is, how does adding files manually work better than using file()?
Avatar
you can copy files to have local modification without changing their extension
Avatar
Wdym?
Avatar
create file named test.c, test.c is not compiled with explicit file list
Avatar
does someone have an idea on how to efficiently check how far a player on a map is? given : an std::vector<vec2> which stores the best path from start to finish and a vec2 which stores the position of the player. ive tried to just to just loop over the vector and then return the smallest distance but its slow af...(even without square roots)
Avatar
Avatar
Teero
does someone have an idea on how to efficiently check how far a player on a map is? given : an std::vector<vec2> which stores the best path from start to finish and a vec2 which stores the position of the player. ive tried to just to just loop over the vector and then return the smallest distance but its slow af...(even without square roots)
how about u make a structure that splits the map in chunks
17:00
then u only need to iterate over a few chunks, which only store a few std::vector<vec2>
Avatar
Avatar
Jupstar ✪
how about u make a structure that splits the map in chunks
and then keeping track of which chunk the player is in?
Avatar
u can simply calculate it on fly
17:02
smth like x % chunkwidth + y / chunkheight * chunkwidth
Avatar
nice idea
Avatar
dunno how much resources or programming time u want to spent
17:03
but if u go all in pre calculate which is the closest checkpoint for every tile 😄
17:03
that would be almost instant at runtime
Avatar
just making a fitness function for my ai rn
Avatar
ah nice
17:05
well then i'd precalculate as much as u can, bcs runtime is expensive for AI probs
Avatar
what if the chunk the player is in doesnt have any pathtiles? what chunk should it choose then? (edited)
Avatar
Supervised or RL?
Avatar
Avatar
Mr.Gh0s7
Supervised or RL?
rl
Avatar
nice :D
Avatar
using NEAT
Avatar
I am using PPO
Avatar
Avatar
Teero
what if the chunk the player is in doesnt have any pathtiles? what chunk should it choose then? (edited)
neighbour chunks, or save in the chunks which have one but tbh, just do it per tile and save the closest index of vector<vec2> per tile
Avatar
is this some machine learning blockchain buzzwords i dont know about?
18:59
xd
Avatar
Avatar
Mr.Gh0s7
I am using PPO
for what kind of maps are you doing it? gores,ddnet? or pvp? (edited)
Avatar
xD I am suprised too I only knew me and some other guys were working on ML but apparently there is Teero and someone else
19:01
gores
Avatar
finished aip gores yet? xD
19:02
still fixing the enviroment
Avatar
in what language?
Avatar
python sb3
Avatar
did you just rewrite tw in python? xD
Avatar
ah no the ddnet works in C/C++
19:03
and the input ouput is handled by fifo files between the python and the ddnet
19:05
i just made a new client with only the necessary physics and a gui with imgui and vulkan in cpp
Avatar
wow nice
Avatar
Avatar
Jupstar ✪
neighbour chunks, or save in the chunks which have one but tbh, just do it per tile and save the closest index of vector<vec2> per tile
btw this eliminates 75% of the iterations. its nice
Avatar
Use flow field pathfinding @Teero
Avatar
Avatar
Tater
Use flow field pathfinding @Teero
what are the benefits?
Avatar
It gives you direction to go and distance to finish
19:23
And fast
Avatar
Avatar
Tater
It gives you direction to go and distance to finish
i would have to mix A* and flow field pathfinding
Avatar
is it for gores?
Avatar
Idk otherwise it's harder lol
19:38
Gores pathing is easy
19:38
Well unless there is unfreeze parts
19:39
Just ignore those
Avatar
what if we had something like this? only the bottom part would be affected, right?
19:46
@Tater
Avatar
it should work fine for that map
Avatar
to my knowledge its just a grid of vectors which all point to their neighbor with the lowest cost, right?
Avatar
sure but you can also store distance in that grid because
19:49
you start from the finish and then expand outwards by 1 tile at a time incrementing by one each pass
19:50
then you get a grid that has distance and you can do some checks to figure out where to go
Avatar
Avatar
Teero
does someone have an idea on how to efficiently check how far a player on a map is? given : an std::vector<vec2> which stores the best path from start to finish and a vec2 which stores the position of the player. ive tried to just to just loop over the vector and then return the smallest distance but its slow af...(even without square roots)
how big is your vector for it to be slow?
19:57
even with a million entry, it should be fine (i.e. no more than few 10s ms) (edited)
Avatar
Avatar
Chairn
even with a million entry, it should be fine (i.e. no more than few 10s ms) (edited)
but with a AI u probs want to run as many entities as possible at once
20:01
or is it a simple AI
20:01
a "stupid" one 😄
20:02
maybe i live too much in a deeplearning bubble lol
20:03
ah no he said RL, so yeah makes sense to optimize it
Avatar
@Tater ig i can just use the already made a* to guide the flow to the finish
20:10
anyways
20:10
gn
Avatar
Avatar
Mʎɹ シ
Why are all source files in ddnet CMakeLists written manually and not e.g. using file()?
cmake has some problems with rebuilds and detecting changed files
Avatar
A, okey
Exported 138 message(s)