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 2021-10-25 00:00:00Z and 2021-10-26 00:00:00Z
Avatar
Attempt to fix #4244 Added network clipping to entity ex for projectiles and pickups, and made snapping of gamecontroller happen before gameworld (as suggested in #4236), which should help when zooming out on large maps in general (where the number of entities exceeds the maximum number of snap items). Also added bounds checks for switchers in the client.

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination w...
Avatar
@aodq hi
08:06
this guy knows a lot about graphics rendering he told me some stuff about optimizing
08:06
@aodq do u mind if i copy some stuff here
08:06
xd
Avatar
@trml you can just delete your build dir and generate it again
Avatar
yeah so when you render the map, it renders each tile it seems maybe depends on map tho ... i think if you'e under a certain draw call count, it doesn't matter too much. What you want to avoid is forcing the driver to flush out draw calls this is sort of where compute-based stuff can come in handy with 2D, you could submit the entire scene (at least the static portions) and then do the tile-culling in the compute shader i assume each tile is drawn individually so you can check if the tile is on screen or not ... for less vertex shader calls, though really if you submit the entire geometry it might be faster processing those vertices than it is submitting a draw call for each tile. yeah exactly xd I think the driver in this case might be able to flatten that entire list of glDrawElements. hopefully if you run this on an older piece of hardware and just toggle things to render / not-render and look at frame times that would be a good way to optimize at least for rendering stuff specifically there's a lot of micro-optimizations too that wouldn't make any difference but are fun to think about it seems you guys use a depth-buffer so you could render front-to-back to discard fragments early in terms of GPU time, that background is the most expensive but this is like fractions of a millisecond, it doesn't matter
08:09
interesting stuff
Avatar
The thing with our stack is that we target 3 different versions of ogl, so we have to be a tad more conservative with our optimizations
08:11
I'm fairly sure all the compute shader stuff is locked to > gl33
08:13
But we also target gl2 and gl1, so doing this sort of optimization only applicable to gl33 requires some very meh restructuring. Though you are free to give it a try, Jupeyy loves all extra fps 😄
08:14
@Learath2 the main thing is
08:14
we do a lot of drawcalls which could be sent all in 1
08:14
just before the swap
Avatar
can it be sent all in 1?
08:15
stuff like this that could be collapsed to just one draw call there's no state change here
Avatar
I don't see an easy way to batch it together, but I'm no graphics person
08:16
(I don't see an easy way, without keeping extra state in the gl33 case so we can keep supporting the immediate mode/fixed function pipeline)
Avatar
you can write an optimal immediate-mode style of renderer. You'd have to build up a gigantic list of things to render and submit it to the GPU. The unoptimal part here is the pressure put on by uploading that list of things, often times you do at the 'very last' second too (when you want to blit / swap-buffers) there's a trade-off here bc you basically want to support older hardware but also you want to use newer features that will let you remove this overhead
08:17
well i think thats all
Avatar
I'm all for making the >gl33 renderer better, it's just that it makes our gfx interface looks fairly ugly each time we add some optimization only applicable to modern gl
Avatar
in general glDrawElements can be collapsed bc indices can be re arranged ahead-of-time.
08:19
:o
08:19
xd
Avatar
Maybe we should do a LTS version sometime and just have a single VK renderer after a certain version
08:20
im all for modern stuff
08:20
btw modenr opengl is 4.6
Avatar
People with a windows xp toaster can stick to ddnet15 and we can move into the future without branches everywhere on the hot path
Avatar
not 3.3
Avatar
Well after 3.3 we don't really need much of anything
08:21
So when I say "modern" I mean when the core profile is introduced
08:21
this is quoting him too
08:21
when ppl say modern opengl they usually mean 3.3, but 'actual' modern opengl is 4.6 yeah exactly all it really means is you have to be more creative with optimizations 😦 you can't use the shortcuts lol
08:22
so sad i had the convo in another sv and not here
Avatar
Oh lets do tessellated tees using 4.6 😄
Avatar
But if we are to support a single renderer I'd probably be for doing a VK backend
Avatar
ye me too
Avatar
GL is deprecated on macOS and VK has very performant translators nowadays
08:24
moltenVK is almost one to one since Metal is close to VK
08:35
has anyone looked into "Unity Networking Libraries" communities?
08:36
man is it the most toxic place i've ever seen
Avatar
duh unity
Avatar
everyone just shit on other libs for the tiniest things.
08:37
justatest
Avatar
they have discords
08:38
and their members are almost exclusive to that discord
08:38
cuz you support other libs you get banned
Avatar
Lolwat?
08:38
Library politics?
Avatar
If you dont like C you will be banned from this server btw. So tread lightly
Avatar
if you dont like rust i will curse you
08:39
greenthing
Avatar
i like it
08:39
i just don't want to touch it
Avatar
i know right, its too sacred
Avatar
also btw, almost all networking libs in the current days for unity suck.
Avatar
i dont like unity itself
08:40
i prefer doing stuff myself
08:40
more fun
08:40
but i've spent two months of networking stuff
08:40
not even remotely close to usable
08:43
and now i can't even choose a network lib cuz all of them just shit on other libs that it boggles my mind and i don't want to think about them ever.
08:43
🫂
08:43
send help
08:44
@Learath2 i just realized the guy i mentioned couldnt talk cuz 10 min cooldown xd
08:45
@Learath2 also he says he got softlocked at min 00 lol
08:45
hmmm
08:45
oh u can talk now?
08:45
monkaS
Avatar
heyy My phone works, my machine doesnt 🤷‍♂️
Avatar
discord kek
Avatar
maybe just restart it
Avatar
says 0 seconds remaining
08:46
Never
Avatar
u never restart ur pc?
Avatar
pkill -9 Discord didnt work i guess theres some cache on my machine
Avatar
welcome to electron based apps
Avatar
rm -r ~/.config/discord/Cache worked for the 1 other person in the world that will also run into this issue
Avatar
Avatar
TsFreddie
also btw, almost all networking libs in the current days for unity suck.
Make your own, sell it, we can all do a propaganda campaign to shit on other libs
Avatar
it isn't working
08:49
my brain isn't big enough
Avatar
Avatar
Learath2
Make your own, sell it, we can all do a propaganda campaign to shit on other libs
this reminded me of this https://xkcd.com/927/
Avatar
Can they please just let me be the divine authority on all standards?
Avatar
ENet is still my favorite networking library
Avatar
I promise to pick the correct ones
Avatar
the only networking library i ever used is sdl_net
08:51
monkalaugh
Avatar
yojimbo is probably the best modern network library tho
08:51
or valve's one but i dont like how they write libraries
Avatar
The only networking lib I used is teeworlds/src/base/system.c
Avatar
tbh, unity's network lib does everything more clean, even if the lib itself is a mess
Avatar
Avatar
Learath2
The only networking lib I used is teeworlds/src/base/system.c
based
Avatar
especially for the two noob dev we hired
08:52
i can't just let them write bytes themselves cuz that's gonna suck for me
Avatar
you have to say you're hiring an engine developer and then 'surprise' them that theyre going to work on Unity
Avatar
I find generic solutions to specific problems like this end up having the ugliest interfaces or metaprogramming messes
Avatar
ye, for 8k/month in beijing which barely gets you a rented apartment of 5m^2
Avatar
I almost was going to work with UE at one job but I was able to quit before they transitioned :^)
Avatar
engine dev lol
08:53
i'm chinese
Avatar
1,253.23 United States Dollar
Avatar
yeah that turned from a decent amount to nothing
Avatar
Avatar
TsFreddie
ye, for 8k/month in beijing which barely gets you a rented apartment of 5m^2
Is there govt housing in beijing?
Avatar
1,076.07 Euro
08:54
monkaS
Avatar
wdym govt housing
Avatar
is that a contract job? they might have a couple other projects theyre working on
Avatar
full time
Avatar
the based thing to do during 'pandemic' is to have like 3 jobs
Avatar
Avatar
TsFreddie
wdym govt housing
Cheaper housing for people not earning quite enough
Avatar
8k is pretty standard for grads that isn't capable of getting into tencent or microsoft or something
Avatar
Avatar
Learath2
Cheaper housing for people not earning quite enough
for the slaves*
Avatar
Avatar
Learath2
Cheaper housing for people not earning quite enough
doubt it
Avatar
(Or in the case of enlightened vienna, housing for everyone subsidized by the govt)
Avatar
Avatar
TsFreddie
doubt it
Interesting so china is just posing as communist? :/ Where social housing and housing subsidies?
Avatar
what's communism
08:57
kek
Avatar
Ts cant say anything, Jinping is watching
Avatar
i can
Avatar
he shouldnt even be in this discord
Avatar
no one can stop me
Avatar
the only thing that scares me is https://ddnet.tw/irclogs/
Avatar
my convos are there too
08:58
monkalaugh
Avatar
time to rip Ryozuki's statement and use them are weapons
08:59
it's probably more juicy than others'
08:59
just found some text from 2015
Avatar
what about it
Avatar
about makinga video compilation of just fly 1
09:00
making*
09:00
speedruns
Avatar
wget --no-parent -r https://ddnet.tw/irclogs rg Ryozuki
Avatar
no pls
Avatar
i was 15y old
09:01
2015-04-19.log 62:09:29 < Ryozuki> hi
Avatar
Dont do it
Avatar
you said nothing interesting smh
Avatar
ye lot of bad things happened
09:03
maybe it wasnt on #developer but on #general xd
Avatar
Avatar
aodq
you said nothing interesting smh
there were some heated days... to say
09:03
monkalaugh
Avatar
you said like 10 things in 2015 and nothing since
09:04
only downloadedu p to 2017
Avatar
well on 2016 everyone moved to discord
09:04
monkaS
Avatar
2017-04-22.log:22:23 < ddnet-discord> <CookieAlex> http://teeporn.com/
Avatar
the site is real
09:06
64000 results damn get a life smh
09:07
@aodq i joined this sv the day it was created
Avatar
the og
09:07
click here
09:08
and scroll up
Avatar
so is off-topic the og general?
Avatar
let me guess cuz it went off-topic
Avatar
I joined this server the last day it has existed
Avatar
i fucking hate electron
Avatar
bruh, my first message is a freaking melon
Avatar
2020 nobo
Avatar
Avatar
aodq
i fucking hate electron
nobody wants top use irc sad
09:10
to*
Avatar
My last message is this message
😂 2
09:10
just kidding
09:10
I hate vulkan reee
Avatar
hater
Avatar
un hello metal is the best one
09:11
vulkan best
09:11
apple bad
Avatar
apple good
Avatar
Avatar
Ryozuki
apple bad
i heard songs about this
Avatar
bad apple
Avatar
ew bad apple is bad
Avatar
Bad Apple... more like... Steve Apple. 👍
Avatar
minecraft steve or isteve
Avatar
the man named Steve Apple
09:13
father of Tim Apple
Avatar
Cellegen | HU 2021-10-25 09:13:46Z
pepedead 👆
09:13
wtf is this
09:14
reminded me of this
Avatar
cousin of Bill Microsoft
Avatar
DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS !
Avatar
Avatar
Cellegen | HU
wtf is this
that's your username
Avatar
Cellegen | HU 2021-10-25 09:14:17Z
correct
09:14
that's the only normal thing you see
Avatar
that video makes 1000x more sense when you read this
Avatar
Cellegen | HU 2021-10-25 09:14:40Z
pepekek
09:14
but -1 for u for not linking to xkcd directly
09:15
the alt text is the best
09:15
Avatar
Apple is a great company, employees dont drink on the job
Avatar
We should make it illegal for apple to make any more software or hardware
Avatar
Avatar
Learath2
We should make it illegal for apple to make any more software or hardware
actually their new m1 processor
09:18
looks like its a revolution
Avatar
They've had their peak, now it's time to let other people do good engineering
09:18
i just watched this vid tho
09:18
idk details
Avatar
Why woulid you get ur info from that guy
Avatar
Avatar
aodq
Why woulid you get ur info from that guy
i was bored one night
09:18
and checked it
Avatar
Avatar
Ryozuki
actually their new m1 processor
Apple is such a weird company. Somethings they engineer extremely well, then they have the coding practices of a monkey overdosing on opiates
Avatar
otheerwise i watch anime or play dota
09:19
thats my life
Avatar
2x cpu perf, up to 4x gpu perf, 1000-1500 nits display, and much better memory bandwidth
Avatar
much better memory bandwidth
Avatar
Avatar
Ryozuki
otheerwise i watch anime or play dota
Cellegen | HU 2021-10-25 09:20:37Z
same with league
Avatar
insanely much better
Avatar
There seems to be a core team of extremely good engineers at apple being held back by business practices and dimwitted newfangled engineers
Avatar
memory bandwidth is probably the biggest win other than the nits thing
09:21
keep in mind you don't get best bandwidth unless you get 64 gb ram
Avatar
ez for apple guys who like to waste their money on brand
09:22
Max Bandwidth 47.68 GiB/s 82.963 GB/s 48,824.32 MiB/s 0.0466 TiB/s 0.0512 TB/s
09:22
this is the bandwidth of my 5600x
Avatar
wdym by business practices? All the swift stuff sucks but most the good shit still is in mostly C/C++ with Obj-C frontend
Avatar
copied from google
09:22
xd
Avatar
@Ryozuki M1 macs might be the one thing where apple might be worth it's premium price tag. It really is IMO the best mobile chip ever released
Avatar
the M1 mini is my favorite.
Avatar
Avatar
aodq
wdym by business practices? All the swift stuff sucks but most the good shit still is in mostly C/C++ with Obj-C frontend
Business practices as in keeping the ecosystem locked down, artificially hindering older platforms to get people to upgrade, not letting people repair their devices, refusing to move to usb-c on iphones to keep selling lightning licenses
Avatar
oh yeah that's hardware stuff tho 🤷‍♂️
Avatar
All of these are requiring them to make shitty engineering decisions for the sake of more profit
09:25
In the software side it's their newfangled engineering team and the desire of some for some for computers to be programmable by monkeys that's hindering them
Avatar
If you ever have some free time on your hand I suggest you take a look at the assembly generated by Obj-C code
Avatar
yeah that's been there since forever though. It sucks but you have to write C/C++ and make OS/framework calls using ObjC.
09:27
perf wise you can still be on the cutting edge
09:27
the whole ObjC has always been a mess sadly
Avatar
Or if you want to see another piece of "brilliant" engineering I suggest you take a look at AppKit, not a lot of people are aware of how weird appkit can get with it trying to support applications compiled for any version of macOS
Avatar
yeah i haven't worked with AppKit, MetalKit i think is the proper replacement?
Avatar
im so lucky to never touch macos stuff
09:29
im living in the superior plane of linux
09:29
bluekitty
Avatar
I reverse engineered a fair bit of AppKit while fixing an SDL bug, it turns out appkit is full of branches, so running a 10.13 executable on 10.15 will disable some asserts, enable others
Avatar
it's a lot like linux tho I just use cmake to generate projects & xcodebuild to build themn
Avatar
can u build with anything other than xcodebuild?
09:30
imagine having choices
09:30
ah thats linux
Avatar
yeah you can use clang
Avatar
apple clang
Avatar
you dont need xcodebuild
09:30
I think GCC is still being ported to M1 hardware
Avatar
Some parts of the original engineering that went into OSX is brilliant though. I love Mach-O, I love mach kernel ports, it's IPC capabilties. launchd is absolutely brilliant, it is what systemd should have been
Avatar
yeah with ObjC a lot of features will be enabled/disabled at run-time by introspecting what OS version you are running, along with HW capabilities for metal
09:32
i should say 'apple libraries with ObjC / swift'
09:32
you shouldn't be running into asserts though 🤔
Avatar
I love how they handle highdpi too. Anway, point is it seems macOS is mostly a pile of shit poured onto a pile of gold
09:33
Great engineering covered by a decade of garbage added by sub par engineers
Avatar
I think the ecosystem overall is pretty bad yeah
09:36
Metal is the best 'modern' graphics API under a pretty nightmare ecosystem
09:36
though the debug tools are great
09:36
the documentation is always what kills me tho
09:37
lack of it
09:37
documentation = WWDC + maybe an example if youre lucky
Avatar
But why did they have to make their own? VK is just as flexible, I know they started working on it before but they should have just adopted vk
Avatar
Apple makes their own HW, so if they want to add a feature they have to argue in front of a whole committee etc just to get support for their own HW. It slows down both HW and SW.
09:39
right now if a new feature is added, it's all done internally. There is limited amount of waiting. And for most features they develop to be in parity with Dx12 or Vk anyway
09:40
I think in the future Apple might try to write their own HLSL (or SPIR-V) -> LLVM IR compiler, which will address a lot of issues with MoltenVK, but we'll see
Avatar
Um, VK allows manufacturer extensions which later get standardized
09:40
(which CAN later get standardized)
Avatar
🤷‍♂️ I can ask / look into it more but for sure the answer will be to have full control over everything
09:42
Another thing i've considered is that Vk targets a lot of different HW platforms, but Metal only targets one (M1)
09:42
oh yeah and their older stuff too ofc
09:45
Here's another example, Metal language is in C++ and not Swift bc Swift wasn't out yet at the time lol
09:46
but yeah to switch from Metal to Vulkan several years in, to effectively lose ownership of your whole graphics stack, doesn't sound smart
09:50
Just wish Apple would take Vk/Dx->Mtl more seriously (edited)
Avatar
Avatar
aodq
but yeah to switch from Metal to Vulkan several years in, to effectively lose ownership of your whole graphics stack, doesn't sound smart
It doesn't sound smart business-wise indeed 🙂
09:53
All of apples engineering decisions lately are all heavily skewed by the profit motive. Implementing a flexible standard that closely maps to your hardware and is extensible in proprietary ways if need be is a no-brainer as long as you don't consider the profit motive
Avatar
Vk doesn't map close to the hardware tho. The most obvious example is that SPIR-V is fundamentally different from AIR.
Avatar
moltenVK is very good at mapping vk almost 1 to 1 to metal, iirc only small trivialities remain
Avatar
at a user-level, Metal is extremely convenient, easier to use while remaining low-level, consistently designed, etc
09:56
actually there are some big issues (in particular with SPIR-V) that is basically un-addressable
Avatar
Um, did I miss something along the way? iirc the SPIRV -> MSL conversion was like one of the most robust parts of moltenVK
Avatar
basically the runtime shader conversion, there was some specific list of things I'd have to go see if I can find
10:00
The primary issue iirc is it's spir-v -> metal and not spir-v -> air
10:01
basically only Apple could do this
10:02
For fun, write a renderer in Metal then try to write that same renderer in Vulkan
10:02
:^)
Avatar
What is AIR? I'm not very familiar with the lower levels of apples graphics stack
Avatar
apple IR. Just LLVM IR. It's like if metal -> GLSL instead of metal -> SPIR-V. But I remember there was a list of setbacks with MoltenVK and as well any Dx/hlsl -> metal converter (edited)
Avatar
Avatar
aodq
For fun, write a renderer in Metal then try to write that same renderer in Vulkan
I wish I had the time to write anything let alone VK code nowadays, but I'm fairly sure apple could write an abstraction around VK if they are so concerned with usability by developers
Avatar
eh the Vk -> Metal thing seems to be better than trying to do something like that
Avatar
Avatar
aodq
apple IR. Just LLVM IR. It's like if metal -> GLSL instead of metal -> SPIR-V. But I remember there was a list of setbacks with MoltenVK and as well any Dx/hlsl -> metal converter (edited)
Well you can take a look at moltenVKs known limitations list, they have very few and they look mostly unimportant to me. There is SPIRV-Cross which does the actual conversion and their issue list also has a couple small open issues
Avatar
like at the end of the day, Vulkan tries to target a ton of HW, Metal basically only targets M1
10:07
yeah i dont think they would put 'performance issue' there
Avatar
You think they'd lie? 😄
Avatar
No ofc not but theyre not going to put everything there
10:09
they just don't plan on porting SPIR-V to AIR.
Avatar
Okay but why is that important?
Avatar
same reason why SPIR-V is important to glsl
Avatar
There was a SPIR-V -> LLVM translator iirc btw. No idea if apple is using even more proprietary stuff to break that aswell
10:10
Not just -> iirc it was <->
Avatar
LLVM doesn't just run on GPU by itself
Avatar
So your issue is that SPIR-V -> MSL -> AIR is not as good as SPIR-V -> AIR ?
Avatar
I think preferrably it'd be SPIR-V -> DXIL -> AIR or something like that
Avatar
DXIL? Why would you want DXIL in there?
Avatar
so you can support HLSL/Dx
10:12
DXIL is just a form of LLVM IR
10:13
SPIR-V -> DXIL already exist btw
Avatar
But why is that better than SPIR-V -> MSL -> AIR?
Avatar
I think it does at least
10:14
so you can avoid compiling MSL to AIR
10:14
if you are using Metal right now you can compile MSL to AIR and then ship that as a metallib along with your executable
Avatar
I mean I can see it being a little faster when compiling the shaders and I can maybe see it being easier for the implementors but I don't see how it changes performance at all unless apple is horrible at compiling MSL to AIR
Avatar
might not sound like a huge deal but it's not a very complicated thing to fix
10:16
Well the whole point of SPIR-V and DXIL etc is to avoid having to compile anything when you run the application
Avatar
I'll be honest with you. It sounds absolutely useless to me to get like a second saved on your startup times when the hdd will be the bottleneck anyway
Avatar
at least you avoid source-code issues etc
10:18
It wouldn't be just that though. If apple were to do the conversion themselves they could product optimal AIR targeted for their HW
10:19
with SPIR-V/DXIL it's just a best-guess
Avatar
And furthermore I don't see how it's impossible to do this right now either. It could be a little messy but you could do your SPIR-V -> MSL at compile-time, then compile it to AIR just as you would with regular MSL
Avatar
not unless you are apple
10:20
well i should say, that's what happens right now. At run-time, SPIR-V -> MSL -> AIR.
Avatar
Avatar
aodq
It wouldn't be just that though. If apple were to do the conversion themselves they could product optimal AIR targeted for their HW
This is the only issue I can see, you could maybe squeeze out a bit more performance if you don't risk producing MSL that might not be optimizable
Avatar
Avatar
aodq
well i should say, that's what happens right now. At run-time, SPIR-V -> MSL -> AIR.
Okay, and what stops you from doing SPIR-V -> MSL -> AIR at compile time?
Avatar
right it's both and maybe some other smaller issues. Think about it like this. Most GPU vendors will take SPIR-V and compile/optimize it for something native for their HW. That overall means they can spend more time optimizing, and less time parsing or worrying about corner-cases etc. So you would just take the same benefit (the entire point of SPIR-V) and apply it as well to Apple by letting them translate SPIR-V to their preferred format
10:22
this sort of 'who-gives-a-shit' level of optimization is basically the entire Vulkan stack lol
10:23
@Learath2 ; MoltenVK occurs at run-time. Not compile-time. Games don't ship with MoltenVK-'compiled' binaries/shaders
10:24
once you compile the SPIR V to MSL and that gets compiled to AIR, then it's cached and metal should re-use that AIR
Avatar
Avatar
aodq
@Learath2 ; MoltenVK occurs at run-time. Not compile-time. Games don't ship with MoltenVK-'compiled' binaries/shaders
They don't but theoretically there isn't anything really stopping you engineering-wise. If those handful of seconds are important to you SPIRV-Cross doesn't mind running at compile-time, nor is anyone stopping you from using whatever MSL -> AIR compiler you'd use at compile-time if you were coding a metal renderer
Avatar
I'm talking about writing a game in Vulkan and then using MoltenVK to run it.
Avatar
Well I'm saying Apple using Metal is imo nothing more than a business decision to control the entire stack themselves
Avatar
Yeah they own the entire HW and SW stack, why would they give it up
10:28
that is sort of the whole point
Avatar
Because it's good engineering? I don't go around inventing my own language to write my game in
Avatar
if they run into an issue or need X etc, they can do it all internally
10:29
that's not really a good argument lol
Avatar
Okay, we are circling back. They can have all the VK extensions they want if they want non-standard things.
Avatar
I get where you are coming from though. I just think it was bad timing. Vulkan is a different direction than Metal when it comes to modern gfx programming, and that it came years after Metal was established, and Apple was already working on their own HW w/ their own drivers etc
10:30
nah it's not just extensions though
10:32
like you'd have to write a renderer in Metal than a renderer in Vk to understand they are very approaches to graphics programming. One assumes it can run on any piece of HW so you need to write driver-level code for every piece of HW. The other assumes it's only going to run on one piece of HW so it's a lot more comfortable to work with. It makes sense to have Vk run on top of Metal for cross platform apps
10:32
it would also make sense to allow Vk on the HW natively but that would go against business interest obviously
10:33
also developer interest, basically doubles the amount of work needed
Avatar
Metal could have easily been a subset of Vk. Vulkan is low level enough for them to implement whatever best practices they want
Avatar
The target audience I suppose really is Apple interally (for their own apps running on top of metal), and also mobile apps. I don't really expect either to be writing Vulkan lol
10:34
eh nah not really
10:35
there's like 1 or 2 AAA games that run natively on Metal
Avatar
Avatar
aodq
eh nah not really
Okay, I can't work with that one. Is Vk not low level enough?
Avatar
I mean, already there are a lot of apps like Maya that just straight up use OpenGL and refuse to goto vulkan, let alone metal
10:37
@Learath2 it's hard to explain but it's not about the 'low level' but just completely different take on rendering
10:38
there are feature parities between the two and then just differences that no Vulkan extension could fix
Avatar
So are you telling me metal api calls can't be translated to a bunch of vulkan calls, yet a highly performant translation layer can exist between the two which only has a handful of known limitations that seem to be unsolvable?
Avatar
Vk was designed to run on a ton of HW, so each thing is much more specific. Metal is more 'general', in how you use it. So it makes sense that Vk -> Metal is possible, but Metal -> Vk is basically not possible
10:40
for example, when you render stuff with MSL, it's more like a compute/OpenCL/CUDA approach. With Vulkan, it's more of your traditional rendering pipeline with specific stages for each thing. Ofc the latter fits in the former, but not vise versa
10:41
Bc if you're running Vk, you might be targeting HW that really only supports a rasterizer, and not something more general compute-based like M1/Metal
10:42
let's say, in terms of OpenGL, if you are familiar with passing in attributes-per-vertex (normals/positions/UV coords etc), in Metal you just pass in buffers and then what you do with them is up to you. So you could do myNormals[triangleId/3] or myNormals[triangleId] etc
10:44
another example, there is no HW-tessellation in Metal like there is for OpenGL/Vk (where you have specific geometry and tess-control/tess-eval), instead you can just implement that yourself however you like in Metal.
10:45
sorry if im not being very clear it's pretty late for me. I do think you bring up a lot of good points though, it's pretty shit-show all-around to be expected to implement a backend for DirectX/Vulkan/Metal. (edited)
Avatar
I must be missing something fundamental here. Vulkan is completely capable of the compute approach, I don't see how you would have any issue implementing metal in terms of vulkan compute. Especially given a dumb translator can get you almost all the way there. Anyway, we seem to have a different set of values when it comes to development which seems to be why we seem to disagree here
Avatar
you'd have to implement a rasterizer on top of compute rather than rasterizer capable of compute-like 'power' it's why NVIDIA has mesh shaders now, but this is just one example why they are different
10:53
Here's a good thing tho, the two APIs push each other to be better.
10:54
though, I haven't seen much yet to allow Vulkan to be more accessible to a broader audience but hopefully we will see that one day
Avatar
Avatar
aodq
you'd have to implement a rasterizer on top of compute rather than rasterizer capable of compute-like 'power' it's why NVIDIA has mesh shaders now, but this is just one example why they are different
But isn't that what you'll already have to do with Metal on macs? A hypothetical Metal implemented on Vk would change nothing in this aspect. A more generic simplification of Vk is what would suffer here. It would be of no concern to apple
Avatar
ah it's hard to explain I guess but you just pass in functions from compute-based shader to your fixed-function pipeline that does the tessellation. so it's like having a rasterizer capable of compute-like access
11:04
you'd either need nvidia mesh shaders i suppose, or redo the rasterizer in compute which is ugly. I think at least?
Avatar
I don't know metal well enough to continue this discussion any further. I'll try to set aside some time to take a look someday
Avatar
for sure. fwiw I prefer to use Vk over Metal just for cross platform stuff, but Mtl is just a much better experience
Avatar
Imma delete the posts tho for spam, we prolly shoulda moved to DMs lol
11:18
eh too lazy nvm
Avatar
Don't bother, it's not important
Avatar
ik some servers get anal ab that sort of thing
Avatar
We've had much much longer discussions about much much more off-topic things in this channel
Avatar
dont delete
Avatar
you may think this is useless but ppl earn from reading from others
11:18
ok ban this guy
11:19
so annoying
11:19
discord spammers
11:19
@Learath2 do ur job
Avatar
I look away for 1 second
Avatar
Honestly we need a metal-like layer of abstraction over Vulkan (and Dx etc). I think everyone wants one at this point.
Avatar
Literally got up to grab tea
🇺 1
🇰 1
🇹 1
🇷 1
Avatar
I muted, was gonna delete messages. banned nobysux
Avatar
Something where you dont have to sacrifice never having sex again in order to render a teapot
Avatar
OOH, so that's why I don't have a girlfriend
feelsbadman 1
Avatar
Checked, guy had a chat history, definitely a compromised account. Deleting messages is best in that scenario
Avatar
Too much vulkan 😭
Avatar
I should move to gamemaker so I can finally get a gf
Avatar
Avatar
Skeith
Checked, guy had a chat history, definitely a compromised account. Deleting messages is best in that scenario
I usually just ban, they can message me when they fix their situation
Avatar
Vulkan is a deep-state Govt plot to reduce the IQ of humanity.
Avatar
Can't message you if banned from the server PepeLaugh
Avatar
Hm, ideally we'd have a bot to handle these :/ I wish there was a !delete --user=<id> --mtime=-24h and a !mute
Avatar
Bots like that don't join back, I think. They just spam whatever servers the account is in
11:23
So I guess a ban and then unban is fine
Avatar
I actually have messages enabled from everyone, even people that don't have me friended or have a mutual server
Avatar
in 50 years everyone will be apple fags only capable of using emoji-based languages
11:23
its sad but its true
Avatar
all the based Rust Vulkan programmers will have died virgins
Avatar
No way of adding you though, realistically. Or DMing you, since they can't use the server to get into your DMs
Avatar
Avatar
Skeith
No way of adding you though, realistically. Or DMing you, since they can't use the server to get into your DMs
😛
Avatar
I really need to get used to using emojis every couple words. People think I'm a psychopath/boomer/hitman
Avatar
im obsessed with the frog
11:25
monkalaugh
11:25
greenthing
Avatar
It's wild that so many people have their accounts yoinked like this though, how hard is it to 2fa up and not login to random stuff
Avatar
Avatar
Skeith
It's wild that so many people have their accounts yoinked like this though, how hard is it to 2fa up and not login to random stuff
I think it's probably that shit where they tell you to paste something in the debug console to get nitro
Avatar
2fa is a scam
Avatar
Little kids try that shit only to have the pasted code either directly send the spam or extract their API key so the attacker can spam later
Avatar
Into the DDnet debug console..?
Avatar
Nah, discord debug console 😛
Avatar
Oh you mean thru browser
11:27
right
Avatar
I think i guess electron has one too
11:28
I absolutely despise electron
Avatar
same shit. web blows
Avatar
The people who came up with electron can just fall off a flight of stairs into a bunch of legos
Avatar
hope they hurt they small finger toe against a table corner
11:29
their
11:29
my english sucks
Avatar
Discord is using 100% of all 4 cores of my macbook randomly sometimes, no explanation. The entire system hangs for a couple seconds
11:30
Almost 4G of my ram used by shitty electron applications whose developers wouldn't know memory management if it hit themselves in the face
11:33
Theres a reaason why hardware improvements also mean SW degredation.
Avatar
oh and not only that the companies that get these electron applications developed also have policies banning people from using other clients, spotify, discord, whatsapp
Avatar
Its not an issue that electron or other app devs dont profile, its that they only really run it on newer hardware and dont profile for older stuff
11:34
so 2x faster HW = 2x slower SW
Avatar
Avatar
Learath2
oh and not only that the companies that get these electron applications developed also have policies banning people from using other clients, spotify, discord, whatsapp
What do you mean...?
Avatar
All the aforementioned companies don't allow you to use third-party clients to access their services, so you are locked to their shitty electron apps
Avatar
doesnt spotify have an api? I just remember accessing spotify and discord from terminal
Avatar
Spotify used to have libspotify, it's completely unmaintained now and it's deprecated. They are more lenient with their third party policy. Discord completely disallows using other clients but there are some clients out there using the api
11:38
Whatsapp doesn't allow third party clients at all
11:38
Nor does it have an api
Avatar
whatsapp blows
11:39
get signal, bitcheess
Avatar
Well network effect. I'd rather not only talk to other nerds
11:44
@TsFreddie Just a heads up warning, https://twitter.com/MilitaryRage/status/1452498129643843595 this video you would not want to stream from China. Just a warning in case you ever come across the link, to not click it!!
🇮🇳New Indian aircraft carrier INS Vikrant on sea trials. October 24, 2021. #India https://t.co/mXe6yY2STk
Likes
313
11:44
troll
Avatar
Now that is fairly #off-topic
Avatar
Jupstar ✪ BOT 2021-10-25 13:07:15Z
tiles are mostly atleast partially transparent so front to back wont work in almost all cases we dont draw every tile itself, the gl 3.3 renderer buffers all vertices and renders lines of visible tiles. You could trade it against using small chunks, but that will hurt the GPU more, and it seems we also target alot of potato PCs, that run in a GPU limit rather than CPU For complex scenes you might be able to reuse already drawn stuff, but tw also supports parallex and clips so it wont work everywhere For zooming out the biggest bottleneck is still that instanced rendering is too slow, either bcs the CPU cannot push instances fast enough or the GPU cant deal with it fast enough. There is still potential by smallering the amount of instaces and use the vertex id + instance id in combination instead, that however will lead to more memory usage Ingame nothing should be streamed actually (atleast with default settings) We'd mostly profit from vulkan in streamed scenarios bcs there the memory control carries hard also vulkan >>>>>> metal lmao
13:08
most important is the perf for entities, thats what most ppl use, and there even memory blitting probably wont increase the efficiency anymore
Avatar
Avatar
Skeith
It's wild that so many people have their accounts yoinked like this though, how hard is it to 2fa up and not login to random stuff
AFAIK they don't steal your account details like password and username, but your account token which can bypass 2fa
Avatar
Jupstar ✪ BOT 2021-10-25 13:42:14Z
cmake has CMAKE_CXX_FLAGS btw, but they might only work if you also used them for the O0 before :D (@trml)
like, if one added -O0 some time, and then forgot about it
13:45
even if you could collapse it, the driver will probably do the same in the end :D the gl 3.3 spec even mentions how MultiDrawElements is usually implemented, and that command is also not available on all GPUs even tho its a core feature, just bcs its pretty much useless bloat (@Ryozuki)
stuff like this that could be collapsed to just one draw call there&#x27;s no state change here
13:49
https://github.com/Jupeyy/ddnet/blob/cc54c4acdff610805fff181062c8cd4c653e2122/src/engine/client/backend_sdl.cpp#L1248-L1249 i actually used it first, but removed it bcs it didnt work on the gtx 760 of my friend back then
DDraceNetwork, a mod of Teeworlds. Contribute to Jupeyy/ddnet development by creating an account on GitHub.
Avatar
Jupstar ✪ BOT 2021-10-25 14:09:50Z
but yeah generally a new map format could give us more oppotunities to pre analyse tile maps, split opaque from transparent stuff, but that would also remove the possibility to use vanilla resources as external Also finally use PNGs instead of relying on zlib for compression xD
15:08
dont open f12
15:08
or fbi will open up ur door
15:08
“Digging around HTML code” is criminal. Missouri Governor doubles down again in attack ad
15:08
15:08
monkalaugh
15:09
murica is rly amazing
Avatar
hello we are still not allowed to disable the DDNet rich presence, that would be cool to be able to change the status from f1 console or directly on the settings (i dunno where i can post this suggestion so i decided to post it here)
Avatar
Jupstar ✪ BOT 2021-10-25 16:02:34Z
Don't insult dinos
Avatar
Time was found to flow differently between the top and bottom of a single cloud of atoms. Physicists hope that such a system will one day help them combine quantum mechanics and Einstein’s theory of…
Avatar
starts moving when new lines appear from bottom. @Jupeyy ?
Avatar
Avatar
Jupstar ✪
tiles are mostly atleast partially transparent so front to back wont work in almost all cases we dont draw every tile itself, the gl 3.3 renderer buffers all vertices and renders lines of visible tiles. You could trade it against using small chunks, but that will hurt the GPU more, and it seems we also target alot of potato PCs, that run in a GPU limit rather than CPU For complex scenes you might be able to reuse already drawn stuff, but tw also supports parallex and clips so it wont work everywhere For zooming out the biggest bottleneck is still that instanced rendering is too slow, either bcs the CPU cannot push instances fast enough or the GPU cant deal with it fast enough. There is still potential by smallering the amount of instaces and use the vertex id + instance id in combination instead, that however will lead to more memory usage Ingame nothing should be streamed actually (atleast with default settings) We'd mostly profit from vulkan in streamed scenarios bcs there the memory control carries hard also vulkan >>>>>> metal lmao
when I zoom the map out, draw call count can reach 10,000+ which would i assume then force the driver to flush on older hw
Avatar
Jupstar ✪ BOT 2021-10-25 17:04:53Z
"For zooming out the biggest bottleneck is still that instanced rendering is too slow, either bcs the CPU cannot push instances fast enough or the GPU cant deal with it fast enough. There is still potential by smallering the amount of instaces and use the vertex id + instance id in combination instead, that however will lead to more memory usage "
Avatar
smallering
Avatar
Jupstar ✪ BOT 2021-10-25 17:05:40Z
yes
Avatar
that doesnt exist sir
Avatar
Jupstar ✪ BOT 2021-10-25 17:05:50Z
i am german, i am allowed to do weird hacks with english language
17:06
isnt memory usage more free
Avatar
Jupstar ✪ BOT 2021-10-25 17:09:04Z
but we speak about quite a bit of memory
17:09
the edges probs need alteast 500 instaces in the buffer
Avatar
Instanced rendering of what, the tiles?
Avatar
Jupstar ✪ BOT 2021-10-25 17:14:09Z
the border tiles yes
17:14
teeworlds extends the map when the edges are reached
Avatar
You just pass the # of tiles to render and use instance ID to position it?
Avatar
Jupstar ✪ BOT 2021-10-25 17:17:02Z
the corners yes, the edges use a "line" of tiles
17:17
thats how tw is designed
17:17
image.png
17:18
the greens are the ones, teeworlds extends
Avatar
I need to profile on my older HW tbh I was just shooting the shit yesterday
17:18
right
17:19
I feel like you can get creative around not having to use instanced rendering here , but maybe not
Avatar
Jupstar ✪ BOT 2021-10-25 17:20:14Z
you can certainly increase the instances, so you don't create so much instances
17:20
but generally isntances also have advantages, as you only upload the attributes once
Avatar
Yeah but the attributes are not interesting and can be hard coded in the shader anyway
17:21
Ah not the uv coords tho
Avatar
Jupstar ✪ BOT 2021-10-25 17:21:37Z
vec4 VertPos = vec4(inVertex.x + gOffset.x, inVertex.y + gOffset.y, 0.0, 1.0); VertPos.x += gDir.x * float(gl_InstanceID); VertPos.y += gDir.y * float(gl_InstanceID); gl_Position = vec4(gPos * VertPos, 0.0, 1.0);
Avatar
gDir is uniform or attribute?
Avatar
Jupstar ✪ BOT 2021-10-25 17:22:21Z
g prefix is uniforms
17:23
it basically knows where is positions the instance, bcs it has the instance id you can comnine it with the vertex id to lower the pressure
Avatar
Yeah so you render each line of tiles by baking some information to uniforms and displacing using instance ID
Avatar
Jupstar ✪ BOT 2021-10-25 17:23:21Z
but then the vertex array obv increases
Avatar
is inVertex here static or streamed?
Avatar
Jupstar ✪ BOT 2021-10-25 17:24:30Z
that is the streamed vertices of the line
17:24
so basically always the green lines
17:24
they are then offset to the position, so instance 0, has zero offset
17:25
instance 1 goes 1 left for example
Avatar
One draw call per line? or for the whole thing
Avatar
add bonuses like endlesshook, infinitejumps there is also undeep but no deep command and it would be good to have commands and not having to use or go back to tiles while testing a map.
Avatar
Seems per column/row to me how you described
17:26
looking at how instanceID is used
Avatar
Jupstar ✪ BOT 2021-10-25 17:26:32Z
well its the driver doing the draw calls
17:26
its a single opengl command
17:27
one opengl call for all of the tiles?
Avatar
Jupstar ✪ BOT 2021-10-25 17:29:40Z
its 8 opengl calls, if you zoom enough to see all edges and corners
17:29
and then layer height * layer count draw calls for the actual map
17:30
so yes, 10k is not unrealistic on a huge map
Avatar
Yeah cool, if it's from those its probably not an issue then
17:32
🤪
Avatar
Jupstar ✪ BOT 2021-10-25 17:33:04Z
generally for dedicated GPUs it still usually runs into a CPU limit tho
17:33
but rendering so much data is also overkill for weak GPUs
17:33
for the pure tile rendering i dont see a real chance to decrease the load of the CPU
17:34
even if there is a opengl command, it will probably still compute it on the CPU, as CPU cores are usually faster than GPU cores in creating the command buffers
17:35
it would somehow require the GPU to be more intelligent and know the offsets by itself, but then the "slowness" of the GPU cores will probably still create a bottleneck
17:35
so you could e.g. create chunks and render too much intentionally
Avatar
Yeah, like I mentioned there's nothing really actionable until you check on older HW.
Avatar
Jupstar ✪ BOT 2021-10-25 17:35:35Z
to decrease the load of actual draw calls, but that increase GPU usage even for non visible stuff
Avatar
yeah I've done that to decrease CPU bottenecks, works fine for newer HW not older HW.
Avatar
Jupstar ✪ BOT 2021-10-25 17:37:06Z
that was my first implementation actually, but especially laptops struggled too much
17:37
and it had to compete against our GL 1.x backend
17:37
so i didnt want to loose the fight xd
17:37
lol*
17:38
Well now ive talked ab it so much ill have to look at it closer later
17:39
Conceptually you could group tiles into larger batches but if it's worthwhile idk
Avatar
Jupstar ✪ BOT 2021-10-25 17:41:55Z
i think if i'd redesign the map format i would not allow external resources and group opaque tiles and transparent tiles(so split the textures) The only question here is, what happens in entities Sadly even clearing a depth/stencil buffer can already kill quite a bit performance, and entities almost draw nothing compared to the normal map design So ppl get mad that their entities rendering got slower
Avatar
you mentioned that already i st
17:42
seeZ
17:42
** fuck
Avatar
Jupstar ✪ BOT 2021-10-25 17:42:08Z
teeworlds generally lives with the status quo in most stuff xD
17:44
Well im not sure how the map format is but it wouldnt be too impractible to just ditch the depth buffer right?
Avatar
Jupstar ✪ BOT 2021-10-25 17:45:07Z
sadly most layers wouldnt profit from it right now, as almost all tile maps contain transparent pixels
17:45
you'd really need to split the opaque part from the transparent to disallow rendering at the opaque part
Avatar
Im confused why youd need depth for that
Avatar
Jupstar ✪ BOT 2021-10-25 17:46:50Z
also discard doesnt really need to be faster on modern GPUs, if you read the internet it really depends alot on what your goal is, as early discards are then disabled(since the GPU cannot assume the whole geometry is really non opaque)
17:47
so it can not drop opaque parts, even tho thats the whole idea, so you'd need to lower the gemoetry to really only opaque parts then its a question of, where is the sweetspot
Avatar
Yeah assumedly youd early discard on the depth test
17:48
If you didnt have a depth buffer it wouldnt matter?
Avatar
Jupstar ✪ BOT 2021-10-25 17:48:57Z
should i only draw opaque parts that are atleast 50% of the tile are really opaque, or should i also create alot of smaller quads inside the tile to have as much opaque geometry as possible
Avatar
Not sure what you mean
Avatar
Jupstar ✪ BOT 2021-10-25 17:49:28Z
i actually need the stencil buffer
17:49
but its usually conected to depth
Avatar
for what?
Avatar
Jupstar ✪ BOT 2021-10-25 17:49:57Z
if i want to profit from front - back rendering
Avatar
Yeah you can disable depth tests tho if youre clearing out the stencil then i guess you arent going to avoid that
17:50
Why would you need the stencil for that?
Avatar
Jupstar ✪ BOT 2021-10-25 17:50:52Z
well stencil, depth doesnt matter
17:50
you can use both
17:51
as we dont have the concept of depth
17:51
we just need to store a boolean indicated that this pixel was drawn
Avatar
Are the tiles depth tested?
Avatar
Jupstar ✪ BOT 2021-10-25 17:51:46Z
no, that is if you want to design the map format so it tries todo as much front-back rendering
17:51
and only does back-front for truly transparent parts
17:52
so to minimize pixels drawn with alpha blending on
Avatar
Oh I see what you mean now.
17:58
It's sort of a shame that early fragment discard is a 4.2 opengl feature
Avatar
Jupstar ✪ BOT 2021-10-25 17:58:59Z
is it?
17:59
but i guess most GPU drivers would just do it anyway, wouldnt they? :D
Avatar
I think the driver just guesses if it can discard otherwise, but it'd have to inspect the shader to check if you modify the depth fragment (the transparency stuff doesnt matter), which theoretically if you are compiling the shaders you oughta know
Avatar
Jupstar ✪ BOT 2021-10-25 17:59:39Z
tbh didnt even know its a feature, thought its just some clever optimization technique
Avatar
The fun thing is you can modify depth to pull it toward your near-clipping value while still early discarding
18:00
which driver def could not predict on its own
18:02
Honestly the state of 2D rendering is a bit depressing. There are a lot of novel ideas to improve performance ten-fold, but the only place you care is where the HW is running a very limited rasterizer
Avatar
Jupstar ✪ BOT 2021-10-25 18:04:57Z
:D, GPUs are just too powerful, else they'd care more
18:05
with wayland and entities i can almost reach 12000 FPS XD
Avatar
I'll have to benchmark this sometime, but I think since you know the size of the screen you can batch all the tiles into 8 or 16 etc draw calls and then just accept the bit of vertex overdraw that will be clipped out
Avatar
Jupstar ✪ BOT 2021-10-25 18:06:14Z
I am certainly interested in comparing it to alot of other ideas, but there is always some drawback sadly :D
Avatar
Yeah I only mention bc I remember I have some older hardware where ddnet is lucky to reach 30 or 60 9r whatever
18:06
or*
Avatar
Jupstar ✪ BOT 2021-10-25 18:06:56Z
oh ok, my mobile phone which is already 5 years old can hold >100fps on a few maps i tested with design
18:07
so rip your hardware
Avatar
phones too fast
18:07
:-(
18:08
Not related to rendering but I've been using Tiled for other projects and, as an outsider thought it would be interesting to port json to ddnet's native format
Avatar
Jupstar ✪ BOT 2021-10-25 18:12:22Z
it would be nice to have smth like that for the simple reason, that you could change the mapformat easily without breaking old maps always But i guess parsing jsons is slower compared to binary, especially if you have a huge map with alot of tiles
Avatar
Nah it hardly matters. I think the best 'format' is JSON (or yaml) to describe map/model/etc then raw binary buffers to load the data itself
18:14
Not sure how familiar you are with 3D models, but GLTF works this way and loads files incredibly fast
18:14
loads models*
Avatar
Jupstar ✪ BOT 2021-10-25 18:15:46Z
i guess i am the wrong person for such discussions xD
18:16
Is there a reference or spec for DDnets map format?
Avatar
Jupstar ✪ BOT 2021-10-25 18:16:27Z
i'd use string streams not printf, bcs parsing the format is slower xD
18:16
very simple xD
18:16
i think patiga has the most knowledge
Avatar
String stream for what?
Avatar
Jupstar ✪ BOT 2021-10-25 18:17:40Z
in c++ coding in this case
Avatar
I dont think Tiled does this, but optimally you'd have a buffer which just points to a binary file to load directly to ram, then use offsets to that buffer to describe vertex/tile/uvcoord data etc
18:19
You can parse the json with a handheld calculator at that point it hardly matters
Avatar
Jupstar ✪ BOT 2021-10-25 18:19:05Z
i just mean with that, i am the wrong person to talk about such stuff, bcs i love todo micro optimizations, especially in hot paths. But realistically i also do alot of bad code, just bcs it costs too much time to code like that, or bcs i dont want the code to look like some insane assembler like code
18:19
Yeah the hotpath is loading up a million tiles
Avatar
Jupstar ✪ BOT 2021-10-25 18:20:41Z
yeah but parsing a number is slower than having it as binary
18:21
the json is just the metadata I guess is the best way to describe
Avatar
Jupstar ✪ BOT 2021-10-25 18:22:28Z
oh i see
Avatar
for example tile-layer-0 { width : 190, height : 300, origins : "some-external-file.bin}
18:27
you could embed with base 64 encoding too
18:28
Tho really if im just converting it to ddnets internal format it wouldnt matter
Avatar
Jupstar ✪ BOT 2021-10-25 18:29:19Z
btw i dunno, but do you know teeworlds, the base game for ddnet?
18:30
its pretty much mantained by a signle person, and ddnet wants to stay compatible to it so that defs holds back alot of progress, and also we allow older clients to connect, instead of dropping it thats what i meant with, teeworlds love to hold the status quo (sadly xd)
18:34
Well are there even any plans for the game at this point anyway?
Avatar
Jupstar ✪ BOT 2021-10-25 18:35:23Z
most updates are mostly adding prediction, or refactoring some of the 15 years old code xDD
18:35
very rarely new tiles are added
18:35
its mostly ran by new mapps abusing new found physics quirks
18:36
you could say, ppl that play teeworlds for atleast 1 year, also play it atleast 10 years xD
Avatar
Jupstar ✪ BOT 2021-10-25 18:37:48Z
so loving the game as is, with all its weirdness
Avatar
Thats my impression, basically nothing planned lol
Avatar
Jupstar ✪ BOT 2021-10-25 18:39:44Z
yeah ^^
Avatar
it could be good if the client played a sound effect once a friend joins the server + different color for the message, translating the join message if it isnt possible yet.
Avatar
chillerdragon BOT 2021-10-25 20:03:20Z
Wow what a troll why is "unsuper" a cheat? :D
20:04
took me some time to debug why my records are not working. Turns out my client has auto rcon login on local server i i have "unsuper" bound to mouse1 next to fire. And the server didnt rank my records due to ChEaT wtf xd
20:04
CONSOLE_COMMAND("unsuper", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnSuper, this, "Removes super from you")
20:29
ddnet bot
Avatar
chillerdragon BOT 2021-10-25 20:31:42Z
🤖
Avatar
ah lol using the right python version helps.
Avatar
i really have no idea what to do here
20:45
the bot is online and works but deletes instantly his own messages and doesnt find any players.
20:46
@Learath2
Avatar
chillerdragon BOT 2021-10-25 20:58:53Z
Zwelf: can i run multiple servers with one sqlite database? I have the servers in different dirs but i could sym link the .sqlite file in both dirs. I wond if that is safe tho. Will it break when two servers try to read and write?
You're invited to talk on Matrix
Avatar
Its totally safe to use multiple ddnet servers on one sqlite file
Avatar
chillerdragon BOT 2021-10-25 20:59:36Z
wow thats so cool!
21:00
I mean at the same time right
Avatar
Avatar
chillerdragon
I mean at the same time right
yes
21:00
it does work
Avatar
chillerdragon BOT 2021-10-25 21:00:59Z
Thats so cool so sqlite can do now all the things mysql can minus multiple hosts
Avatar
yea, sqlite handles multiple servers writing to the file.
Avatar
chillerdragon BOT 2021-10-25 21:01:16Z
thats awesome!
21:01
thanks for building this!
21:01
such a upgrade to the messy unmaintained .dtb files
Avatar
you're welcome <3
Avatar
Avatar
HappyFray
the bot is online and works but deletes instantly his own messages and doesnt find any players.
um, only god himself, @Patiga, me and jao seem to have gotten this bot to work. I personally admit that I got lucky 😄
happy 2
Avatar
Avatar
aodq
Is there a reference or spec for DDnets map format?
the underlying file format is documented by heinrich5991: https://ddnet.tw/docs/libtw2/datafile/ how to interpret that file format as a map was documented by me: https://ddnet.tw/docs/libtw2/map/ I actually created 'MapDir', a json-based map format for ddnet/teeworlds, its integrated into my twmap rust library https://gitlab.com/Patiga/twmap (it has some binaries to convert back and fourth and other stuff). the purpose of that format right now is mainly to give an easy map diff I considered also integrating the tiled map format, but what held me off until now is that there is no easy-to-use rust library to write that format so far and that the envelopes will be hard to represent. (envelopes are the animations in the maps, afaik tiled has no such thing)
Avatar
chillerdragon BOT 2021-10-25 21:12:09Z
Hmm does it look at the full path to load map scores not only at the map name?
Avatar
@HappyFray what are you trying to do?
Avatar
chillerdragon BOT 2021-10-25 21:12:32Z
i think file score only looked at the map name not the map path
Avatar
so my problem is i wanted to create the ddnetbot for our server cause its limited to 100 servers. to anounce it there and the problem now is that its deleting its own message aswell as this part of the setup i really have no idea which parts i should comment out of it
Avatar
chillerdragon BOT 2021-10-25 21:14:06Z
Zwelf: is it intentional that "sv_map path/to/foo" has different records than "sv_map foo"
You're invited to talk on Matrix
21:14
i sometimes use folders for themes and shit
21:14
but the race stays the same
Avatar
in sqlite? if it is the case no, I dont think so
Avatar
chillerdragon BOT 2021-10-25 21:14:55Z
It is the case
21:15
it looks at the full path
21:15
I think only looking at the map name makes more sense
Avatar
Avatar
HappyFray
so my problem is i wanted to create the ddnetbot for our server cause its limited to 100 servers. to anounce it there and the problem now is that its deleting its own message aswell as this part of the setup i really have no idea which parts i should comment out of it
aswell as this what should i enter here in the config?
Avatar
Avatar
HappyFray
so my problem is i wanted to create the ddnetbot for our server cause its limited to 100 servers. to anounce it there and the problem now is that its deleting its own message aswell as this part of the setup i really have no idea which parts i should comment out of it
you can just remove the bodies of those functions I think
Avatar
chillerdragon: In case you need it, there is a file score import script: https://github.com/ddnet/ddnet/blob/master/scripts/import_file_score.py
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/import_file_score.py at master · ddnet/ddnet
Avatar
chillerdragon BOT 2021-10-25 21:17:22Z
already used Zwelf thanks
You're invited to talk on Matrix
21:17
worked like a charm
Avatar
eh it prob needs some function body to be a function, but you can replace the function bodies with something trivial
Avatar
if its not needet couldnt i remove it completely?
Avatar
well then the function calls will fail, if you remove those too though it should be fine
Avatar
im bad af in python
21:20
so should be fine if i remove this completely?
Avatar
chillerdragon BOT 2021-10-25 21:21:41Z
nice IDE btw
21:21
axaxax
Avatar
the function has more lines than you selected
Avatar
Avatar
chillerdragon
nice IDE btw
notepad++ xD
Avatar
yea, if you remove those, also remove the function calls
Avatar
chillerdragon BOT 2021-10-25 21:23:30Z
notepad++ has no syntax highlight for py?
21:23
Check ur prefrences
Avatar
Avatar
chillerdragon
notepad++ has no syntax highlight for py?
changed it thx looks bette rnow
Avatar
Avatar
Patiga
yea, if you remove those, also remove the function calls
what should i put here in the config file?
Avatar
you shouldn't need that I think
Avatar
ok so still one problem the bot automatically deletes his messages
Avatar
have you checked the logs? there should be a file bot.log or smth similar
21:33
the bot will always append stuff to that file, so you need to check the last part of the file
21:34
or you can just delete it every time you restart the bot
Avatar
not a lot in it
21:35
full log after starting
Avatar
so the messages appear and then disappear?
Avatar
exactly
Avatar
I don't remember having those error messages, have you created the channels and categories? should not be related, but it might be
Avatar
our bot channels. errors appear cause it only have access to the ddnet-bot channel (edited)
Avatar
hm not sure why it would make an error out of that though
21:44
I guess you could try to figure out where in the bot code it removes messages and try to figure out why it is triggered
21:45
assuming that it is in fact the ddnet bot and not some other bot removing the messages
Avatar
its the only bot that have access to the channel.
21:46
3a3cd41 improve halloween theme and modernize it a bit - edg-l 5e54218 add a radius to the right side of blockquote - edg-l c3b428e change color to link color on hovering icons - edg-l f6e4943 remove border for news - edg-l 265fbbc modernize normal theme too - edg-l 66fed16 Merge pull request #150 from edg-l/pr-improve-halloween - def-
21:47
57df4ee Update css versions - def-
Avatar
Avatar
Patiga
the underlying file format is documented by heinrich5991: https://ddnet.tw/docs/libtw2/datafile/ how to interpret that file format as a map was documented by me: https://ddnet.tw/docs/libtw2/map/ I actually created 'MapDir', a json-based map format for ddnet/teeworlds, its integrated into my twmap rust library https://gitlab.com/Patiga/twmap (it has some binaries to convert back and fourth and other stuff). the purpose of that format right now is mainly to give an easy map diff I considered also integrating the tiled map format, but what held me off until now is that there is no easy-to-use rust library to write that format so far and that the envelopes will be hard to represent. (envelopes are the animations in the maps, afaik tiled has no such thing)
Cool, yeah I just used Tiled JSON for everything and ignore tmx
Avatar
Avatar
Patiga
assuming that it is in fact the ddnet bot and not some other bot removing the messages
i just realised it removes every message.
Avatar
If youre working with JSON already you'd just translate it to Tiled's JSON expectations and everything should work fine.
21:51
I can help with that if youre interested. I'm not familiar with what envelopes are though
Avatar
envelopes are reusable, keyframe based animations which can move around quads and change their color
Avatar
So just a list of keyframe animations
Avatar
yea, I thought tiled doesn't have anything equivalent, is that wrong?
Avatar
ill have ti thimk an how to approach that from tiled
21:56
Youd pick an entity, select keyframes for it to move around and select a color for each keyframe point? Tiled has waypoints so you could reporpuse them for this I think
Avatar
yea and also: don't you need to restrict the tiled editor somehow, to make exporting possible? I think the tiled editor has some functionality which can't be translated easily into a ddnet map. for example, tilemaps can only reference one image, there are only polygons with 4 vertices, and much more I think
Avatar
Tilemaps can reference more than one image/spritesheet Wdym by polygons with 4 vertices? Is this for a specific feature? Polygons in Tiled have no vertex limitations.
22:00
Or do you mean other way aroubd? I see
Avatar
those are teeworlds/ddnet map limitations
Avatar
So im not sure what you mean by polygons, but yeah, I'm imagining that you would use a Tiled python script that will output JSON conformant to your own ddnet JSON format, and when it encounters those sorts of limitations it issues an error to the user
Avatar
0e67e60 Add halloween 2021 news - def-
Avatar
yeah I guess just throwing an error would be fine. you convinced me that its probably possible to create workarounds for everything currently I'm not really motivated enough to start this, the size and complexity of the tiled map format make it a little daunting and I currently enjoy other projects more (currently I'm working on a blender add-on to import teeworlds/ddnet maps and am making good progress :D https://gitlab.com/Patiga/twmap-blender/ ). If I come back to to working on twmap maybe I'll go for the tiled format, having someone I can ask for help would definitely make it much easier :)
Avatar
Oh yeah like I said, you can just do JSON for everything. For my game I never touch TMX etc its all json
Avatar
c185e75 Make downstream merges easier - ChillerDragon 2c72112 Using unsuper does not give an advantage - ChillerDragon 77dcf02 Merge #4238 #4249 - bors[bot]
Avatar
blender lol
22:11
just porting ddnet maps to everything now
👌 1
22:11
raytraced ddnet map pleaae
Avatar
fixes #4246 Also noticed if you enter so much text that console input goes into the second line, it will move the whole console up, but i disabled selection in this case for now, because don't want to redesign the whole console rn and is a real edge case anyway.

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, syst...
Avatar
Jupstar ✪ BOT 2021-10-25 22:16:03Z
raytracing nice
22:16
could also make a mod "what does the tee actually see" where you can only see outline of everything, bcs thats what a 2d entity would see
Avatar
that wouldn't be hard to prototype at all too
22:20
but yeah for raytracing 2D stuff you have to allow some refraction to avoid that
Avatar
Jupstar ✪ BOT 2021-10-25 22:27:16Z
is your game available somewhere, or just an educational project?
Exported 761 message(s)