Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2020-09-18 00:00:00Z and 2020-09-19 00:00:00Z
Avatar
I've tried a couple VMs actually. I looked into lua, wasm, js and I looked into something along the lines of qvm. A bytecode interpreter is probably not acceptable performance for us and maintaining a JIT ourselves (a-la qvm) is just a maintenance nightmare. So if we want our own bytecode our best bet is relying on something like libjit to do the JIT part for us. OTOH luajit, wasmer and V8 are quite stable now. Wasm seems to have the least overhead among the three but js(V8) and lua(luajit) are much more mature.
09:17
The reason we might want our own bytecode is to limit the capabilities of the VM
Avatar
Can we just add validators client-side to remove offending bytecodes from a code pushed from a server? Or it's not that simple?
09:54
I know that adding any VM or bytecode will open a pandora box of vulnerabilities to mitigate. (edited)
Avatar
you are basically making an anti-virus at that point
Avatar
Antiviruses use signatures, but if we want our VM to accept only a subset of bytecode ops then that would be simpler. (edited)
Avatar
The point of a VM is that it's a sandbox
Avatar
i'd say using existing vm rather than writting our own bytecode is generally safer
Avatar
Yeah definitely, I'd stick to one of lua, js or wasm
Avatar
The point of a VM is that it's a sandbox
nice
The reason we might want our own bytecode is to limit the capabilities of the VM
why limit then? to prevent bitcoin mining on client machines?
Avatar
Atleast to make it harder
09:57
Running untrusted turing complete bytecode is a rather tough problem
Avatar
it has to be Turing-complete to be useful, and it means you cannot prevent that (edited)
09:58
what we make is basically JavaScript for teeworlds. JS servers could make clients mine crypto too, but that's not a big problem
Avatar
eBPF has verifier to make sure it at least finish in time. but that's different
Avatar
I cannot image turing-incomplete useful VM at all (edited)
Avatar
Well calls to the VM would have strict execution limits and it's output would be rather hard to communicate to the server with the small bits we get out of it at a time. So I think we'd be safe from a miner
Avatar
is that even a risk?
Avatar
it is worth thinking about
Avatar
if a client will make cpu spin 100% people will just leave that server
10:00
just as it is with malicious sites which make JS mine monero
Avatar
@Deleted User it's not always trivial to write any program even in a turing complete instruction set. It takes a single instruction to be turing complete 😄
Avatar
The single instruction C compiler. Contribute to xoreaxeaxeax/movfuscator development by creating an account on GitHub.
Avatar
Subtract and branch if negative, in a single instruction is enough
10:01
mov too
Avatar
I've written one-instructions CPU's 😄
10:02
in evolving programming project
Avatar
Anyway, as you said, the more important issue is not something like a bitcoin miner
Avatar
it was fun how much one instruction can do
Avatar
the issue would be a sandbox breach, e.g. if the bytecode could access the filesystem
Avatar
i've never done anything interesting in school
➕ 1
10:02
😫
Avatar
I've yet to see any CS/CEng curriculum that's actually useful
Avatar
Maybe I am wrong but I'd better stick to some existing VM that has 100M+ users and 1k+ devs than try to reimpolement our own "safe" VM.
10:04
Also implementing own VM is too ambitious project. Last time it was used in games it was Another World DOS game 😄
10:04
in like 90x, but there was to GPU, Flash, JS, wasm and so on
10:05
so one French genius had to implement VM to make his game portable and to develop it faster
Avatar
I've yet to see any CS/CEng curriculum that's actually useful
nah, i think you are just smart.
Avatar
I don't just talk from my experience. It's what I observed over the years about people studying in many computer related programs
10:11
okay
Avatar
does tw dev team have a patreon?
Avatar
no. there used to be a donation button on teeworlds.com, then enough money was gathered to pay for servers
13:00
developers never received money
13:01
there is no well-defined "dev team" either since the project was moved to github
Avatar
Does it slows a development?
Avatar
what do you mean?
Avatar
I mean if there would for example bounties for some features, would that help developers to get more time to do them?
13:27
And to improve involvement of devs in general?
Avatar
I think most wouldn't be too affected, but I know that some would put Teeworlds on a higher priority if there were perquisites
Avatar
I know that dev time is costly and that money is not the only motivator. But people could crowdfund some important and hard-to-do features
Avatar
a bit less than a year ago I had a chat with oy about the possibility of opening donations and bountied issues
13:28
for hard-to-do features
Avatar
also I understand that it's not only about coding but about decisions like protocol break/extensions and how to do that
Avatar
we kinda agreed on a few possibilities but I lost motivation to organise that
Avatar
maybe analytic could be bounted too, not just coding
Avatar
decisions like protocol break/extensions
that's unrelated to bounties, decisions are taken by oy
Avatar
I understand how hard is to organize anything
13:29
so first of all we need to convince oy to do anything like that?
Avatar
like what? bounties?
Avatar
for example, yes
Avatar
he was favorable to that when I offered to organise
13:30
but then it's difficult to find people to do that
13:30
bounties would be for features that can't be done with the current volunteers
13:30
for example site revamp, audio content etc
13:30
not the usual issues
Avatar
I like currently opened issues. But I don't like their estimate as "never with the current condition of development". I am just thinking what could be done with it. I cannot invest my dev skills as I don't have a proper level C++ skills. I could hire a C++ programmer but he would need to spend a LOTS of time to understand existing code. So feature bounties seems to be more viable options to me. I could both try to promote crowdsourcing bounty issues and fund it a little.
13:33
Though I am not rich and I understand that alone I cannot fund anything substantial. Developers time is pricey.
13:33
But I have energy and will to promote something. So I could find people like modders and players who would like to join a funding campaign on selected features.
13:34
Right now I am just investigating. I've just migrated FROM teeworlds to ddnet because it's currently more powerful in some areas (2 protocols for example).
Avatar
That's all good sentiment but one ought to be clear on how you would get money to be spent efficiently before asking the crowd
Avatar
I know there are platforms for feature bounties already.
Avatar
developer time is expensive and that's not really the bottleneck imo
Avatar
Bountysource is a website for open source bounties and since 2012 also for crowdfunding. Users (called "backers") can pledge money for tasks using micropayment services that open source software developers can pick up and solve to earn the money. It also allows large-scale fun...
Avatar
yeah there were a few reasonable options that take ~8% when it comes to bounties
13:36
integrated to github
Avatar
92% is not that much compared to 0% when not using anything to crowdsource
Avatar
yes, of course, that's not the problem
Avatar
I don't want to push. And I know that money could make things even harder
Avatar
money always brings a lot of arguments so bounties etc. need to be very clear and finding someone that isn't a usual teeworlds dev is not easy
Avatar
Just investigating possible ways to add more fuel to tw development atm
13:38
I want to help but cannot code yet
13:38
I understand that
Avatar
I'm sure you can help in plenty of ways, most people who did their first PR on teeworlds did not know how to code yet, me included :P
Avatar
Another problem is that who decides when a feature is complete
Avatar
a funder?
Avatar
+ proper specificationsd
Avatar
You might think that you've completed a bounty, oy might think that you need to spend a couple more hours reworking it a different way
13:39
Causes friction
Avatar
I think that for every bounty on a feature should be a product manager, a client who "orders" a feature
13:40
and it makes more sense if that would not be a person from dev team
Avatar
that's not how it would work, bounties are funded by a common pool and the repository manager remains in power when it comes to decisions
Avatar
also there should be clear acceptance conditions on a bounty
Avatar
@Learath2 that sort of friction is normal and happens without money too e.g. code review requires PR to change X
Avatar
You might think that you've completed a bounty, oy might think that you need to spend a couple more hours reworking it a different way
I understand that adding oy to that pipeline make things unpredictable and complicated
Avatar
I think oy is fairly predictable, especially if the issue is well written
Avatar
am i doing well so far in terms of writing? :)
Avatar
Well with volunteer work most of the time we've already accepted that our time might be going to waste
Avatar
if there is a proper issue I rarely see rejected PRs
Avatar
I hope so. And I think that there are 3 conditions to accept a feature in fact:
  • dev team is vetoing that bounty at all
  • PR contains a working code that does what a bounty ticket owner requested
  • dev team is happy enough about how it is realized technically
(edited)
Avatar
Without an arbiter, it would be absolutely insane
Avatar
oh yeah it would
Avatar
It's essential that someone or a small group decides what goes in at the end of the day
Avatar
who does that for ddnet?
Avatar
deen, me and heinrich decide what goes in together, ryozuki and jupstar also can merge stuff but in practice they only merge bugfixes
Avatar
that's a lot of people
Avatar
I think it works better than a single person
13:45
Development goes on even if one of us has something in their personal life. Bugs still get fixed even if all 3 of us are rather busy
Avatar
It's like it's going on in non-autoritative dev teams in real world.
Avatar
and they virtually are always online, so they can get a decision down pretty fast.
Avatar
Anyone could approve a PR. But there is a phase when an issue is getting accepted for a development.
Avatar
@Learath2 true the response time has to be much better
Avatar
Who decides in ddnet and in tw is issue is OK to work on it?
Avatar
Most of ddnet issues are bugs, so most of them are ok to work on
13:48
Features you can do too but I'd discuss it in discord with atleast some other people present, it's a shame when someone spends hours on something and we just don't want the feature
13:48
makes it awkward for everyone 😄
Avatar
also oy tag issues, you can probably tell which one can be worked on
Avatar
Bugfixes are important. What about features? if someone opens an issue and even ready to implement smth how he knows he can start work on that and have some guarantees that his PR will be accepted.
13:48
also oy tag issues, you can probably tell which one can be worked on
That's an answer for tw, thanks
Avatar
Same in tw and ddnet I'd guess. Create an issue, state the feature, state that you are willing to work on it. Wait for the maintainer to give an opinion
Avatar
so devs have like both virtual roles of project owners and lead devs (in terms of a regular soft company)? (to accept tickets and to accept PR on them)
13:50
just tw have one person with that role and ddnet have 3, right?
Avatar
Well what do you mean by Project Owner?
Avatar
A person who decides that need to be done, what feature request will be accepted (and later if they're completed after testing I guess).
13:52
*what
Avatar
Yep, that sounds about right then
Avatar
also oy tag issues, you can probably tell which one can be worked on
yeah that's exactly how it works, tagged=ok
Avatar
Nice, just wanted to be sure I got that
Avatar
Now that you've reminded me, I should go through the ddnet issues again, maybe get rid of some wontfixes
Avatar
well not if is only tagged with discussion
13:53
but you can tell.
Avatar
we can only pray to oy. 🙏
Avatar
design discussion is the only exception yes
13:55
to be fair, there used to be a time when PRs were sometimes rejected despite fixing the issue. nowadays, if it works and the code wasn't written by monkeys, it almost always gets in
Avatar
i do feel bad that i didn't start out with solving issues. i jumped straight into textrender
Avatar
it's nice to have people motivated to work on large issues
13:56
we need those
13:56
no one wants to update because we fixed a border corner opacity
13:56
popular software is full of bugs known since years
Avatar
lol, ddnet have implemented skins download from skin db servers. I will abuse it to have custom sprites in my mod 😄
13:58
(with fake characters)
13:58
too bad 0.7 clients will not see it
😠 1
13:59
I will upload geometric primitives to ddnet skin db 😄
13:59
and will make a tank finally
14:00
and... doors
14:01
and... oh my
Avatar
bad wording who else has notification on for this channel (edited)
Avatar
I use server defaults but I should probably enable it (I appreciate all messages on this server) (edited)
➕ 1
Avatar
I need a favor from someone (launch tw and watch one of my demos to confirm if an issue is present on your PC)
15:44
or is it even needed... I think demos are consistent throughout clients
16:25
eca66f8 Add evalif console command (closed #2670) - ChillerDragon 5e88fa9 EvalIf code style improvements (thanks to @Robyt3) - ChillerDragon da77f02 More EvalIf fine tuning (thanks to @oy) - ChillerDragon 3dab34d Merge pull request #2723 from ChillerDragon/pr... - oy
Avatar
oh hey, weekend time
Avatar
mini-scripts can be made on tw 0.7
Avatar
you could already do that with exec, kinda
Avatar
not well...
Avatar
praise be to oy
16:45
\o/
Avatar
that was @ChillerDragon's PR :P
Avatar
oy the merge bot
Avatar
oy has added the tags to the water issue
16:55
👀
16:55
could a comment be coming?
17:12
53423c8 fix demo player freezing on seeking - Robyt3 60c5c22 Merge pull request #2742 from Robyt3/issue2737 - oy
Avatar
hm, preferred the eval_eq and eval_neq
18:13
but still neat
Avatar
tees floating on the water is way cuter.
18:33
that's all that matters, right?
Avatar
can 0.7 receive player name changes?
18:41
i know it can't send one in game
Avatar
I believe you can do "silent disconnect & connect" to change clanname for example (edited)
18:42
@Deleted User did that for zombie clans I think?
Avatar
that make sense
Avatar
otherwise, not that I am aware of
Avatar
but it is possible to change for your own
18:43
idk how silent disconnect & connect would work for yourself
Avatar
I don't think it does
18:44
my clanname doesn't change ingame while playing infNext (or so it hasn't last time I've played)
Avatar
was changing names in game purposely taken out or it is just a side effect of reworked protocol
Avatar
Purposely for player name changes
Avatar
okay
Avatar
although it's unclear why it had to be removed for the server side as well
Avatar
there are ppl who want to change their name before finishing maps in ddnet. i guess you can still change them with commands, although you can't see the changes in 0.7
18:50
is there a system like that in place for ddnet already? i can open a issue there, since you can't really do anything about it here.
Avatar
Right @heinrich5991
Avatar
While scouring through the teeworlds issues I stumbled upon #2170 and decided to test it ingame, on ctf2 instead. The results were interesting, to say the least. (demos attached in a zip at the end) Server 1 Info: !screenshot1 Snow animation seems pretty smooth ingame. The animation in the demo however, is very laggy. Server 2 Info: ![screenshot2](https://user-images.githubuserco...
Avatar
(someone please download the demos and check them ingame, I just assumed the client is consistent with viewing them and so they should look exactly the same animation wise, but I am far from sure about that)
18:57
(neither do I have a recording software to present those in a video form)
Avatar
I believe you can do "silent disconnect & connect" to change clanname for example @Deleted User did that for zombie clans I think?
yes, but it cannot be done for player's own clan. tw 0.7 rejects local info from a server
19:00
it's a pain
Avatar
"are you trying to tell ME who I am?"
Avatar
should we patch in a NetEvent for name changes?
Avatar
I don't know why it has been added. It just breaks infClass score table on 0.7
19:03
@TsFreddie would be soo cool
Avatar
open an issue and see how it goes?
Avatar
i think it was unnecessary to send names with every snapshot, so they took it out
Avatar
you have to patch a client, but I don't remember where it was. I've spent 2 days debugging with my noob skills to see that wasn't a server fault at all
19:04
no, it's a validation client-side of a clientinfo packet
Avatar
well if we want a proper name change we still don't want to accept fake disconnect
Avatar
don't remember exact name of a net message
Avatar
it should be a dedicated event just for that
Avatar
yes, I think
19:05
we have skinchange in 0.7
Avatar
to justify the change let's just say, we can allow moderator to change player's name if it is inappropriate.
Avatar
you could be a great politician 😄
19:06
right, sure
Avatar
or a lawyer
19:06
if that offends you less
Avatar
what. i'm just saying we probably shouldn't just add stuff for the sake of adding it.
Avatar
I thought that was a justification for oy
Avatar
Dune taught me well
Avatar
didn't get it right, sorry
Avatar
tbh i have no idea what's the difference between NetEvent / NetObject
19:09
oh yeah, you're right, there was a ClientInfo message which can do just that
Avatar
I really wonder what the code in the animation render is causing the animations to glitch out so much...
Avatar
do you have to send a silent disconnect before sending that?
19:10
or it just works by itself (except for local player ofc)
Avatar
Hey, Pure_luck, don't you have a recording software?
Avatar
I send a fake disconnect (leave? part? drop?) message to a client to emulate other client exit
Avatar
okay so you can't just use a single clientinfo for that
19:12
got it
Avatar
so if a client A should receive a clan change for client B then I have to tell client A that that B exited the server and then immediately send him info
Avatar
We should add back the ability for servers to change player names / clans. Reason being:
  • Several mods still need it.
  • More importantly, we should add a rcon command to allow admin / mod to change a player's name if it is inappropriate.
Avatar
@TsFreddie
Avatar
i see
Avatar
I've added that ClientID == TargetID just because I know that client will reject it
Avatar
not that the client will reject it. i guess the client just doesn't expect itself being fake disconnected
19:17
i don't think it is on purpose lol
Avatar
I suppose people watched at ClientInfo packet and thought: that would be a nice idea to split it to
  • SendSkinChange
  • SendClanOrNameChange
  • SendCountryChange
because we don't need to send skins every packet and dont' want to. But after they've implemented SendSkinChange they've thought wtf? nobody need remaining two and just added guard clauses to prevent this.
19:18
So client now rejects clientinfo for a player he knows already as joined. (edited)
19:18
So we have to fake disconnects now.
Avatar
i think they just took them out of snap and didn't realize
19:19
or somebody doesn't saw the need
19:20
either way i don't think it is unreasonable to add it back
19:20
shouldn't break compatibility as well i hope
Avatar
would be nice, because in ddnet I still can receive any update I want and for 0.7 it feels like a step backwards
Avatar
but yeah of course you can't change them in 0.7.5 and lower but it's better than no having it at all
Avatar
I can tell players to update to 0.7.6 it's not a problem at all
Avatar
well i see that as a step sideway
19:21
cuz it does save some traffic for snaps
19:21
you gain some you lose some, albeit unintentionally
Avatar
I think those validation were added to enforce people use single interface SendSkinChange and thus to justify it's addition
19:22
if people could just do things other way they would do that
Avatar
anyway let's wait
19:23
i really want to finish my rework so i can work on something more noticeable
Avatar
ofc, don't get burned up
19:23
long tasks are exhausting
Avatar
watermeron thanks
Avatar
Period when I was porting my mod to ddnet was darkest period in my programming life 1. It took 3 weeks 2. It felt literally like 3 months 3. I've used all my free time to do it faster 4. I haven't knew a shit about C++ 5. I haven't knew a shit about ddnet code and it was different (maybe closer to 0.6) 6. All features adding and bugfixes were stalled 7. I could not do promoting or community management 8. Nobody noticed anything but new bugs ofc (edited)
19:29
A month later I was still fixing bugs. There are like 50 of them.
Avatar
thonk well C++ workflow for me, is just change things, compile error, fix error, get more errors (edited)
Avatar
for me it was the same but with additions like: grief/denial, learn some more C++
Avatar
before I was just adding and fixing very simple things
19:32
also there was a migration from bam to CMake
Avatar
you can still use bam can't you
Avatar
dunno, I went to cmake and it finally works in vscode
Avatar
cmake support was added, bam is still there
Avatar
I was starting bam at the console every time
19:37
are you talking about ddnet code?
Avatar
ah, no, I don't know what they did
Avatar
there was no bam, so I've learned some CMake too
19:38
and I want to tell you bam is a bless of gods for noobs
Avatar
oh right they ditched bam at ddnet
Avatar
there are too many ways to do things right in cmake
Avatar
It is currently being obstructed by the kill msgs. We can move it down a bit or make it adapt to the kill msgs. Or make kill msgs adapt to fps counter.
Exported 274 message(s)