sleitnick
16.5K posts

sleitnick
@sleitnick
Engineer at https://t.co/fmbN8adq7V
Katılım Nisan 2018
560 Takip Edilen38.8K Takipçiler

@AlgyLaceyRBLX @BasedMannn I was, but then Roblox made their own version of it lol. I believe their version is live now.
English
![Joshua Martheze [AlgyLacey]](https://pbs.twimg.com/profile_images/1745063857679151104/VC5xygjS.jpg)
@BasedMannn I thought @sleitnick was working on something that did this?
English

@sleitnick Now we need an engine with Luau as the scripting language... oh wait
English

@ayyanafghan Yeah I don't mind snake_case. The grossness is when you mix different cases
English
sleitnick retweetledi

@MrChickenRocket Trivial vector movement towards target without overshooting & a proximity check. Could also be easily inlined
English

@sleitnick Looks fine. I assume reaching targets is pretty rare. What goes on inside agent move?
English

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

@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

English

@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

@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

@sleitnick Nice. What does it mean, "agent" by the way. What are they doing?
English









