sleitnick

16.5K posts

sleitnick banner
sleitnick

sleitnick

@sleitnick

Engineer at https://t.co/fmbN8adq7V

Katılım Nisan 2018
560 Takip Edilen38.8K Takipçiler
sleitnick
sleitnick@sleitnick·
Oh deer
English
4
0
19
1.1K
ev1
ev1@nonbinary·
@sleitnick OK GARMIN, VIDEO SPEICHERN
Deutsch
0
0
0
90
sleitnick
sleitnick@sleitnick·
Good news: I got agents rendering at over 100 FPS now. Bad news: They've learned to fly
English
3
0
69
5.6K
Jon
Jon@bytejon·
@sleitnick Now we need an engine with Luau as the scripting language... oh wait
English
1
0
0
511
sleitnick
sleitnick@sleitnick·
Godot has truly brought back the game dev spark within me. What a well-made engine. GDScript is still funky to me, but I'm having fun again.
English
8
3
159
6.4K
sleitnick
sleitnick@sleitnick·
@ayyanafghan Yeah I don't mind snake_case. The grossness is when you mix different cases
English
1
0
1
30
Aziz
Aziz@ayyanafghan·
@sleitnick snake_case isn't that bad
English
1
0
0
46
sleitnick
sleitnick@sleitnick·
I like when programming languages have style guides. All code feels consistent. Especially nice when using third-party libraries. What if you prefer camelCase but a lib you need uses snake_case? Gross! And so my unpopular opinion: Luau should have an official style guide
English
7
0
59
4.2K
sleitnick retweetledi
Programmer Humor
Programmer Humor@PR0GRAMMERHUM0R·
helloItsMeTheKeyboard
Programmer Humor tweet media
English
36
292
3.8K
103.8K
sleitnick
sleitnick@sleitnick·
I don't even know if I agree with this. But for standalone code, e.g. running on something like Lute, this sounds good still. So perhaps it's a runtime/embedded level, not language level.
English
1
0
1
870
sleitnick
sleitnick@sleitnick·
Any recommendations for 27" monitors? Ideally 2k @ 144hz
English
10
0
9
3.5K
sleitnick
sleitnick@sleitnick·
@MrChickenRocket Trivial vector movement towards target without overshooting & a proximity check. Could also be easily inlined
English
1
0
0
106
Peter McNeill
Peter McNeill@MrChickenRocket·
@sleitnick Looks fine. I assume reaching targets is pretty rare. What goes on inside agent move?
English
1
0
0
52
sleitnick
sleitnick@sleitnick·
Now around 85 FPS with 100k agents! The major changes were: 1) All agents are created in contiguous array (no longer individually allocated). 2) Signals back into GDScript are batched per frame update, rather than signals per agent Still more work to do to get to 144 FPS
sleitnick@sleitnick

Stress-testing 100k agents. FPS dropped to 60. I had to move most of the logic to C++ to make this work. I could only scale to ~10k in GDScript before hitting a wall. Each "agent" is also just a cube here. Nothing complex. My goal is to get this stable at 144hz w/ 100k agents.

English
6
5
107
13.5K
sleitnick
sleitnick@sleitnick·
@MrChickenRocket I bet there's improvements that could be made here. Only "get_transform()" is inlined, & "targets_reached" could be a fixed size buffer (& certainly not recreated every frame, oops). I haven't looked at actual asm output for this yet
sleitnick tweet media
English
1
0
0
63
Peter McNeill
Peter McNeill@MrChickenRocket·
@sleitnick Generally you want the code to be smaller - typically you'd want loops over data that don't have any non-inlined function calls - final asm just being one tight block < 32kb for the loop
English
1
0
1
46
sleitnick
sleitnick@sleitnick·
@thisgodisbored An NPC. These will eventually be passengers/staff/ground crew/etc. within airport. I'm quite new to Godot though, so I'm stress-testing it to better understand limitations & how to work with/around those limitations
English
1
0
1
119
sleitnick
sleitnick@sleitnick·
Stress-testing 100k agents. FPS dropped to 60. I had to move most of the logic to C++ to make this work. I could only scale to ~10k in GDScript before hitting a wall. Each "agent" is also just a cube here. Nothing complex. My goal is to get this stable at 144hz w/ 100k agents.
English
10
0
157
38.3K
sleitnick
sleitnick@sleitnick·
@Ricquert True! I've got the A* stuff done already, but in GDScript. I imagine I'll have to migrate that over to C++ to maintain perf at this scale, but we'll see
English
0
0
1
66
daimao
daimao@Ricquert·
@sleitnick Now for some collision avoidance and path planning!
English
1
0
0
69
sleitnick
sleitnick@sleitnick·
@ccallac7 Zero multi threading yet, but I limit it to 1k per frame for finding next path (just finds adjacent valid cell for now). All 100k update their transforms every frame though if moving. Once I plug in pathfinding, I'll probably spool up some threads to run pathfinding tasks
English
1
0
1
93
Charlie Callahan
Charlie Callahan@ccallac7·
@sleitnick Damn! Is it multithreaded / are you spreading the updates out over multiple frames?
English
1
0
1
158
sleitnick
sleitnick@sleitnick·
@MrChickenRocket Yup, I'm only updating the agents under a certain 'moving' flag. In terms of cache line, idk! Agents currently inherit from Godot's base object which might be pretty heavy. Might need to split that off to see
English
1
0
0
261
Peter McNeill
Peter McNeill@MrChickenRocket·
@sleitnick Good stuff. Are you minimizing your code per system loop too? Don’t forget code has to fit inside cache lines as well.
English
1
0
2
630
sleitnick
sleitnick@sleitnick·
Realistically, there will probably be a hardcoded cap of around 25k agents. But getting this working with 100k is nice to help find the true bottlenecks as I learn Godot. Once I have 144hz stable, I'll add more detail & behavior to the agents.
English
0
0
5
646
sleitnick
sleitnick@sleitnick·
@Maxx_JNM I tried that at first, but using MultiMesh produced much faster results
English
0
0
1
123
Maxx_J 
Maxx_J @Maxx_JNM·
@sleitnick I assume it's the squares which you're trying to stress test? If you haven't tried already, perhaps the rendering server API may be useful? Learned of it recently youtu.be/1PnG3r1rKcs?t=…
YouTube video
YouTube
English
1
0
0
454