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-04-26 00:00:00Z and 2021-04-27 00:00:00Z
Avatar
pretty cool
00:24
this screams latency though
Avatar
Knuckles cracked n-word cranked up to 11 yup. its gaming time
03:42
what were they thinking
Avatar
e9a2adc A Best of Three, M First Try, M pedeuliar - ddnet-maps
Avatar
i have question if im on platform and i press d i will reach speed 10 in 5sec, then i continue running with d but i fall of platform do i : 1) keep my 10 speed 2) speed is set immediately to 5 3) speed decrease from 10 to 5 with rate of x (x = ?)
Avatar
@devs pls add units in ctrl+shift+d
08:29
;-;
Avatar
Avatar
Souly
troll.pdf
u
Avatar
Avatar
plsplsplslol
weeb.pdf*
u
Avatar
Avatar
Astramast
@devs pls add units in ctrl+shift+d
lets add feet and yards and stones, the american way
09:02
BASED
Avatar
lets add pixels
Avatar
no guys in sub-tiles/tick
09:22
bcs its the smallest units of the game
09:22
st/t
09:22
u cant get half a sub-tile or half a tick
Avatar
would if (false) be stupid?
Avatar
Eeeeeeh, there must be a better way to do this 😄
12:05
but i can't think of any on the spot rn
Avatar
I can only think of uglier ones, maybe this is as good as it gets
Avatar
i can just get rid of else and let it compare all the way through, but i don't really want to.
Avatar
Uhm, wait why do you need this to be dynamic?
Avatar
Avatar
Learath2
Uhm, wait why do you need this to be dynamic?
idk. feel like it.
12:07
gamemodes.h for reference
12:07
oh, if you are wondering why I'm comparing. i'm making chat command /room 1 ctf
Avatar
2 questions, First: Why do you need AddGameType when is this called? Second: Would you ever want to register the same gamecontroller with 2 different names?
Avatar
AddGameType is for enabling gamemodes
12:09
like you put add_gametype dm;add_gametype ctf in config, then the rooms can only be dm or ctf, can't be anything else.
Avatar
Ah okay
Avatar
then 2 different name is for add_gametype 1v1dm dm sv_player_slots 2
12:10
then /room 1 1v1dm and /room 1 dm are both dm types but with different settings.
Avatar
So how about you build an array of all valid gametypes using the preprocessor, then do one single check?
Avatar
maybe scorelimits are different and stuff
Avatar
Avatar
Learath2
So how about you build an array of all valid gametypes using the preprocessor, then do one single check?
bravo, i'll try to do that rn.
12:12
but wait
12:12
i can't put constructors in array.
12:12
can i
Avatar
Well the part of the code I see is just using TYPE, that's why I suggested that 😛
Avatar
yeah, i had this already
Avatar
The usual solution is to have a factory function, though I guess that's starting to make it ugly
12:14
(since you can't take the pointer to a constructor)
Avatar
right, i'm making this ugly rn, just so i can register more gamtypes with two lines in gamemodes.h
12:15
instead of poking into factories and stuff
Avatar
I think this is fine btw, if(false) looks odd but I think it's much better than the alternatives
12:17
I wish C++ had first class classes 🙂
12:18
Would make stuff like this much prettier
12:20
@TsFreddie I have a solution for you that is not as pretty and will make all the CS people hate you but get rid of the if(false)
Avatar
👀 let's hear it
Avatar
I even know a convoluted way to make it palatable to CS people (but they are insane so who cares)
12:21
Just use a goto 😛
12:21
(or if you are scared of our theory overlords put it in a do { ... } while(false) and break out of it
12:21
)
Avatar
do {} while(false) seems like it is in the same ballpark as if (false)
12:23
goto tho.. i don't know..
Avatar
Which is why I suggested it in parenthesis, if I was doing it I'd either keep the if(false) or use the goto
12:23
I might use the goto just to annoy people
Avatar
i'm more scared of goto than annoyed. cuz multiple people taught me to never use it lol
Avatar
multiple people who've read just the title of one letter by djikstra
Avatar
just thought more about goto.. i don't know how would it work tbh.
12:25
I can't take CLASS out with the goto i don't think
Avatar
Well you'd just remove the else and goto a label after the #undef
12:27
As said, just keep the if(false) it doesn't look too bad anyway
Avatar
yeah, i'll keep if (false)
12:29
i don't even know if this is legal
Avatar
that looks completely insane
12:30
You just needed a single goto, not two
Avatar
oh right. i don't know what i was thinking
12:32
justatest
Avatar
there are some very cute goto patterns we can't use anymore because some people take things so damn literally, they really think things like do { ... } while(false); is better, but it only makes your code more cryptic
12:35
I've also seen for(int i = 0; i == 0; i ++)
12:36
is for(;;break) valid?
12:37
nope. tried it
Avatar
A library to work with Arma PBO files. Contribute to Learath2/libpbo development by creating an account on GitHub.
12:39
Though this is not the best example, I don't think I have any better ones public
12:40
Another perfectly valid use is breaking out of nested loops, some people will tell you to make these into one-off functions. To those people I say no
Avatar
(fwiw these are only necessary because C just lacks the tools to do this in a clean manner)
12:42
C++ has exceptions and RAII that can handle the first usecase for you. Some languages have break <n>; pattern that will break out of n blocks
12:44
and if you want more examples of decent uses of goto and have a thing for "appeal to authority" arguments Knuth has a great paper on this
12:44
iirc called "Structured programming with go to statements"
Avatar
i'd like a break <n> very much ngl
Avatar
Yeah, I think rust had a proposal for one
Avatar
Also I was genuinely hoping for(;;break) was a thing.
Avatar
idk, it looks funny
Avatar
Avatar
Learath2
Yeah, I think rust had a proposal for one
Rust by Example (RBE) is a collection of runnable examples that illustrate various Rust concepts and standard libraries.
Avatar
ah, this is also acceptable
13:52
I meant a proper arbitrary break though, like out of any block not just loops
Avatar
and more readable than n blocks
13:53
@Learath2 how would this work outside of loops?
13:53
isnt that a goto
Avatar
well a very limited goto that would just go to outside the block
Avatar
Rust by Example (RBE) is a collection of runnable examples that illustrate various Rust concepts and standard libraries.
Avatar
RFCs for changes to Rust. Contribute to rust-lang/rfcs development by creating an account on GitHub.
13:54
well atleast u can expect to maybe have this in rust i wonder how long it would take for the grandpas in the c++ standard to add this
13:54
monkalaugh
Avatar
never lol
13:55
C and C++ are pretty static now that they have accepted to never break backwards compatibility
Avatar
pvp scoreboard with teams looks pretty goofy
Avatar
could it be a thing that you can filter maps by date in the editor when you try to load them ? and not only by name
Avatar
what the difference between vec2 m_MousePos[NUM_DUMMIES] and vec2 m_TargetPos[NUM_DUMMIES] m_MousePos changes mouse position, but i dont see any m_TargetPos changes, even as another player
14:58
(client side)
Avatar
mousepos is screenspace, targetpos is worldspace iirc
Avatar
Apparently if you change from a non-team game to a team game while snapping gameinfo. There's a high chance that your character's color won't get updated to team color.
18:48
And..... apparently you can just resend map info to force client to refresh it's state. (For 0.6)
Avatar
map info is treated as a map change
18:49
so the client re-enters the game
Avatar
Ye, but it happens super fast if the server keeps snapping everything.
18:50
The connecting screen only flashes by for 1 or 2 frames on my MacBook. Haven't tested with high ping tho.
18:51
For 0.7 you just send team change message to spectators and back then it'll update.
18:51
💯
18:53
And it sounds like a non-red/blue team game is possible for 0.7 kek
Avatar
Avatar
TsFreddie
And it sounds like a non-red/blue team game is possible for 0.7 kek
What do you mean by that?
Avatar
Avatar
TsFreddie
would if (false) be stupid?
how about switch case construction with a default at the end?
22:18
http://www.heeden.nl/statichashc.htm for compile time hash string
Avatar
Avatar
Sorah
could it be a thing that you can filter maps by date in the editor when you try to load them ? and not only by name
#3016 wurde bereits schon von deen empfohlen, sorry :/
Avatar
Similar to demos browser. Could even make it sortable if you want to go fancy. Anyone interested in implementing?
Avatar
seems chromes developer tools are still better after all this time :/
Avatar
how long has n9mkoik had rank 1 in rankpoints
Avatar
there are still some weird things with both browsers concerning css
23:37
on chrome, scrollbar props are still prefixed and don't follow the conventions, and on firefox, form inputs are very ugly and often have different rules when it comes to changing their appearance
Exported 130 message(s)