Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.org/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 2023-09-15 00:00:00Z and 2023-09-16 00:00:00Z
Avatar
github is trying to shill their dumb ai thing while im trying to read code
Avatar
doesn't look particularly in the way (edited)
Avatar
Copilot is actually quite useful
04:34
Idk if you can call it an ai
04:35
It works more like advanced autocomplete
Avatar
It is basically gpt
Avatar
morning
Avatar
morning 🍵
Avatar
Avatar
Voxel
github is trying to shill their dumb ai thing while im trying to read code
aye eye
Avatar
@Ryozuki i don't really have any good question sadly. So i ask a meta question: Are you sometimes split about your feelings while coding: Fck anything i just do it quick & ugly now. And then on the other side you remember how awesome it is, if you carefully planned everything and it works out.... in rust xd
08:28
i love idiomatic over engineered rust
08:28
thats why on advent of code i do it like that
08:28
xd
08:28
remember?
Avatar
i dunno, i dont follow advent of code xd
Avatar
Fixes shortcuts used for rotation of quads and zooming in the envelope editor being triggered when a dialog is open.

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 (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing...
Avatar
Avatar
MilkeeyCat
morning 🍵
☕
🍵 1
Avatar
imagine waking up and eating soup
Avatar
they changed their pricing
10:33
im not gonna do a todr
10:34
tldr
10:34
google
Avatar
but they fcked up big
10:34
thats it
10:35
Good thing ddnet doesn't use any game enginr
Avatar
it uses teengine
10:36
its powered by slaving tees
Avatar
slavery 👍
Avatar
Did somebody call out my lifestyle
🤨 3
10:57
Man i really need the access to teeuniverse GitHub organization xd. I want to use it to host mod code, and have a fancy fitting name
Avatar
i remembered i had ryocrater
11:22
my vulkan program
11:22
i feel the urge to make my game engine with it now
11:22
so many urges, nothing finished
11:22
such is life
11:22
11:22
i made this long ago
11:22
with compute
Avatar
Avatar
Ryozuki
so many urges, nothing finished
True. I'd live to do so much shit, but zero time
11:25
And limits of human xd
11:26
#version 460 layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in; layout(set = 0, binding = 0, rgba8) uniform writeonly image2D img; void main() { vec2 norm_coordinates = (gl_GlobalInvocationID.xy + vec2(0.5)) / vec2(imageSize(img)); vec2 c = (norm_coordinates - vec2(0.5)) * 2.0 - vec2(1.0, 0.0); vec2 z = vec2(0.0, 0.0); float i; for (i = 0.0; i < 1.0; i += 0.005) { z = vec2( z.x * z.x - z.y * z.y + c.x, z.y * z.x + z.x * z.y + c.y ); if (length(z) > 4.0) { break; } } vec4 to_write = vec4(vec3(i), 1.0); imageStore(img, ivec2(gl_GlobalInvocationID.xy), to_write); }
Avatar
Avatar
Jupstar ✪
And limits of human xd
We have to fix that issue first then all the others should be doable
Avatar
Maybe it makes no fun anymore then xd
11:40
Time for machines
Avatar
Color the "Vote yes" or "Vote no" text depending on which you have voted on. !image !image

Checklist

  • [x] Tested the change ingame
  • [x] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or add...
13:23
i wanted to share my project on kog @Jupstar ✪
13:23
but u cant send github links
13:23
xd
Avatar
why not?
Avatar
xd
13:27
closed source is king
13:28
but maybe they have troubles with bots xd
Avatar
Avatar
heinrich5991
why not?
Avatar
they're probably operating with a whitelist, but sad that github isn't on it yet
Avatar
i figured it
13:41
i lacked perms
13:41
xd
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
Only confirmed members can send stuff
Avatar
96af62c CMake: Change the net versioning - Kaffeine 321622b Prevent editor shortcuts when a dialog is open - furo321 faa2f57 Merge pull request #7179 from infclass/for-ddnet4 - def- 886962b Merge pull request #7180 from furo321/prevent-actions-editor - def-
Avatar
@heinrich5991 Hey, I'm furo from #7181. I kinda have no clue how I would introduce the new server packet. Where would I start?
Avatar
Color the "Vote yes" or "Vote no" text depending on which you have voted on. Checklist Tested the change ingame Provided screenshots if it is a visual change Tested in com...
Avatar
Avatar
furo
@heinrich5991 Hey, I'm furo from #7181. I kinda have no clue how I would introduce the new server packet. Where would I start?
you can check datasrc/network.py
15:02
add a message at the bottom, you can take a look at the existing messages
Avatar
I did take a look, could I extend the "Sv_VoteStatus" message? or should I create a new one?
Avatar
the messages that don't have a long name with an @ inside are not ours and shouldn't be extended
15:04
you can either add a Sv_VoteStatusEx at the bottom that contains all these fields plus the one you want to add
15:04
or just add a Sv_YourVote that contains just your vote
15:05
I'm not sure entirely what's the better option
15:05
intuitively, I'd guess it's the first one, but not sure
Avatar
NetMessageEx("Sv_VoteStatusEx", "votestatus@netmsg.ddnet.tw", [ NetIntRange("m_Yes", 0, 'MAX_CLIENTS'), NetIntRange("m_No", 0, 'MAX_CLIENTS'), NetIntRange("m_Pass", 0, 'MAX_CLIENTS'), NetIntRange("m_Total", 0, 'MAX_CLIENTS'), NetIntRange("m_Voted", -1, 1), ]), Kinda like this?
Avatar
yes
15:12
make it @netmsg.ddnet.org though
15:12
we changed domains
15:12
sorry, no example of this in the file yet
Avatar
Sure, next step would be to generate the other files I assume? How would I do that?
Avatar
it happens as part of the build, you don't need to worry about it
15:19
you can simply start using the message
Avatar
i recommend building to get autocomplete tho
15:58
@Jupstar ✪
Avatar
crab still sucks 😬
Avatar
@Jupstar ✪ how to allocate in the host and give to guest
16:05
#[repr(C)] struct Game { data: [u8; 32], }
16:05
mem.grow(&mut store, bytes(std::mem::size_of::<Game>()));
16:05
this? xD
16:07
i guess u need to take the offset before growing
16:07
so u know were to write?
Avatar
Avatar
Ryozuki
mem.grow(&mut store, bytes(std::mem::size_of::<Game>()));
if u did this once, then always write to this offset
16:08
where it grew
Avatar
Avatar
heinrich5991
you can simply start using the message
I created Sv_YourVote instead, my question now is. How would I support servers that don't send this packet? Do I create a GameInfoFlag?
Avatar
Keep the first vote highlighted until you receive Sv_YourVote which can override it. This behavior is compatible with old and new servers. The server can check the client DDNet version to decide whether it should (accept re-votes and) send Sv_YourVote. (edited)
Avatar
exactly what Kaffeine said
Avatar
@Jupstar ✪
16:41
did u use ExternRef
Avatar
Avatar
Ryozuki
did u use ExternRef
no, what does it do
16:43
An opaque reference to some data. This reference can be passed through Wasm.
Avatar
i do it a bit different from what u learn in the examples anyway
Avatar
the thing is
16:45
no examples for complex stuff
16:45
such as calling a function passing a non copiable struct
16:45
xd
Avatar
yeah.. it's pretty annoying
16:45
to get into it
Avatar
in wasm guest
16:45
u make the function accept a offset?
16:45
and u convert it to a ptr?
16:45
?
16:45
what i do here is
16:45
i have struct X
16:45
i turn this into a ptr u8
16:46
and write it to wasm memory
16:46
i know the offset
16:46
now i have a guest function
16:46
that i want to take this struct
16:46
or a ptr that can be converted to it
16:46
using the same layout
16:46
is the ptr the offset?
Avatar
well that is probably the fastest way.. but i think it's a bit harder i do it differently: i prepare the memory inside the guest, and the guest tells me the ptr then i write into the wasm linear memory this way i can easily have multiple parameters growing independetly
Avatar
Avatar
Ryozuki
i turn this into a ptr u8
sadly this can cause troubles
16:47
1. 32bit 2. no guarantee from rust
16:47
but for testing it's probably enough
16:47
i use a serializer
Avatar
Servo is a web rendering engine written in Rust, WebGL and WebGPU capable, and adaptable to desktop, mobile, and embedded applications.
Avatar
Avatar
Jupstar ✪
1. 32bit 2. no guarantee from rust
well my struct is repr C and packed
16:48
so u cant read uninit padding bytes
16:48
which is ub in rust
Avatar
yeah but e.g. usize
Avatar
omg would be so cool if servo would be good 😄
16:50
i actually just want their HTML + CSS engine xD
Avatar
Avatar
Jupstar ✪
yeah but e.g. usize
yeah but the ptr aka offset is u32 anyway
16:50
ima test
16:51
#[derive(Debug, Clone)] #[repr(C, packed)] pub struct Game { pub data: [u8; 32], }
16:51
i have this in a middle crate "interface"
16:51
let play_game = instance.exports.get_typed_function::<u32, u8>(&store, "play_game")?; let pages: Pages = Bytes(std::mem::size_of::<Game>()).try_into().unwrap(); let offset_game = mem.grow(&mut store, pages)?.0; let game = Game { data: [1; 32], }; let game_ref = addr_of!(game) as *const u8; let game_ref = unsafe { std::slice::from_raw_parts(game_ref, std::mem::size_of::<Game>()) }; mem.view(&store).write(offset_game.into(), game_ref)?; let result = play_game.call(&mut store, offset_game)?;
16:51
my host code to setup the struct ref
16:52
#[no_mangle] pub fn play_game(game: *const u8) -> u8 { assert!(!game.is_null()); let game: Game = unsafe { std::ptr::read(game as *const _) }; game.data[0] }
16:52
guest code
16:53
ok wait
16:53
my guest is wrong probs xd
16:56
#[no_mangle] pub unsafe fn play_game(game: *const Game) -> u8 { assert!(!game.is_null()); (*game).data[0] }
16:56
Running `target/debug/host target/wasm32-unknown-unknown/debug/guest.wasm` [host/src/main.rs:56] &result = 1
16:56
@Jupstar ✪ omg
16:56
it worked!
Avatar
epic gamer moment
Avatar
if i change data to 2
16:57
it prints 2
16:57
@Jupstar ✪ but doesnt ur way make the wasm module allocate everytime its called
Avatar
Avatar
Ryozuki
@Jupstar ✪ but doesnt ur way make the wasm module allocate everytime its called
i call resize on a vec<u8> so it allocates it only if the vec wasnt big enough yet
16:58
it works with game: &Game
16:58
too
16:58
xd
16:58
but idk if im in ub territory here
Avatar
a reference is a pointer
Avatar
well u could say since u in a wasm module it's not UB xd
Avatar
well it would be ub if the host passes a null offset
16:59
or smth that doesnt point to a valid game
17:00
xd
17:00
true
17:00
wasm anti ub
17:01
@Jupstar ✪ the memory is not read only on the guest side right
17:01
and no way to do that i guess
17:02
if i would need to rewrite that memory pos every time i call it with the original to be safe
Avatar
Avatar
Ryozuki
@Jupstar ✪ the memory is not read only on the guest side right
yes u can modify it as u wish
17:03
im asking if there can be read only memory
Avatar
externalref sounds like read only memory xd
17:04
but no i think there is no read only memory
Avatar
Avatar
ReiTW
@Ryozuki lmao someone did a video about moving from unity to godot. He installed godot while starting an unity project issou
please send link, sounds fun :)
Avatar
8 days left until summer is over.. where is cs2
17:09
Well the projects still opens before he finishes
17:09
But funny he makes this
Avatar
heh I thought you meant opening a medium to big project, hes creating a new project o.o
Avatar
Lmao would work even better
Avatar
@Kaffeine @heinrich5991 Thanks for the help, I pushed my changes! :)
👍 1
Avatar
Did the auto verification for ger10 break somehow?
Avatar
it's disabled if there is too much attack afaik
Avatar
hello, are there any people who can help me
Avatar
dont ask to ask
1️⃣ 1
2️⃣ 1
💪 1
Avatar
italian linux
17:59
the logo is cool
Avatar
Avatar
Ryozuki
and whats this supposed to be
18:11
the Dept. of Web-Search Juice is just a giant propaganda page LOL
Avatar
Splits cl_show_direction into cl_show_direction_other and cl_show_direction_own allowing players to toggle them independently. cl_show_direction_own shows dummy keypresses as well (doesnt work in playback)

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 (especially base/) or added coverage to integration test
  • [ ] Considered pos...
Avatar
  • Remove unnecessary variable Page.
  • Use IGraphics::CORNER_NONE instead of 0 and instead of the inconsistent-looking CORNER_BR for the KoG-button.
  • Simplify UI rect layout.
Screenshots:
  • Before:
!old
  • After:
!new

Checklist

  • [X] Tested the change ingame
  • [X] Provided screenshots if it is ...
Avatar
lel
20:13
glitchworld
Avatar
350ba77 Minor refactoring of ingame server browser - Robyt3 0f7d83e Merge pull request #7183 from Robyt3/Menus-Ingame-Browser-Refactoring - def-
20:34
0ea4d65 Overhaul demo player skipping UI and UX - Robyt3 5e3d97f Merge pull request #7174 from Robyt3/Demo-Player-Skipping-Overhaul - def-
20:35
A lot nicer and also lessens the effects of #5844 in the editor.

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 (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or v...
20:38
6440cdc Fix country flags MW and MQ not being loaded anymore - Robyt3 1410721 Merge pull request #7156 from Robyt3/Country-Flags-Indexed-Colors - def-
Avatar
Avatar
GitHub
Click to see attachment 🖼️
im faster troll
Avatar
9eb4cf7 CCoreCharacter: Add and use HookedPlayer() - Kaffeine 4c55e83 Character (cli and srv): Access WorldCore via GameWorld() - Kaffeine 7dab9e4 CCharacterCore: Break the friendship with CCharacter - Kaffeine a1b7e0c Move alloc.h to game/ and use it in client/prediction/entity.h - Kaffeine a244e2c prediction/gameworld.h: Drop unneeded friendship with CCharacter - Kaffeine 77fc14f Server: Move player (ID) mapping update to GameContext - Kaffeine f58eef4 Server: Use the tuning params via GameWorld (like in prediction) - Kaffeine 3fd4e10 World cleanup - Kaffeine 15bdef3 Merge pull request #7136 from infclass/for-ddnet2 - def-
22:58
25c3e16 Use colour pack functions for editor - furo321 6b8997b Merge pull request #7185 from furo321/editor-use-pack-functions - def-
Exported 222 message(s)