Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2020-06-02 00:00:00Z and 2020-06-03 00:00:00Z
Avatar
I started coding a map for tw but it's actually not trivial to write a good, generic map that has acceptable performance in most cases
10:21
(nor is our allocator abstraction up to par for this kind of container work (it lacks a rebind), now that I think about it, we might aswell drop our allocator because we don't even use it for debugging anymore)
Avatar
@Learath2 which part is most difficult?
Avatar
The underlying rb-tree
Avatar
an unordered map with closed addressing would be easier to implement but it's not really optimal
Avatar
why do you use a rb-tree?
14:29
nevermind, i found out
14:29
I guess you could use a normal tree, but that has balance issues
Avatar
quadtree may have a leaf-optimization
14:30
empty nodes (containing air) can be left out
14:32
more general: branches only containing 1 tile-type can be heavily optimized
14:32
but I guess a smart rb-tree can do this too
Avatar
Well quadtrees and rbs don't really have the same use though
Avatar
I don't know what your goal is rn
Avatar
I don't even think there exists a generalisation of rb-trees to 2 dimensions
14:36
The ordered map was for a chat commands thing in ddnet
Avatar
map - I thought you were talking about mapfiles
Avatar
Ha, no not those
14:37
[10:42 PM] PsychoGod/Миха: any map<> realisation?
was talking about this
Avatar
Is this usefull, since you were talking about updating to c++11?
Avatar
since that's never going to happen, it'd be nice if atleast our own "cutting edge" template library didn't look like it's from when Bjarne first imagined concepts
Exported 22 message(s)