#ThinClients through code
1 messages · Page 1 of 1 (latest)
you can just take a look at how built in think clients get created. Can't help with finding that info though, need to look through sources
TurboMakesGames made a few for his entities netcode MOBA tutorial here: https://youtu.be/8efRGtRCGJ0?t=20352
Randomly moving around in the game. Perhaps you can learn a bit from that.
Also works in his builds, so yeah it works outside the editor too.
📌 Download the full project files: https://www.tmg.dev/nfe-moba 📌
👨💻 Code/Scripts from this video: https://www.tmg.dev/nfe-moba-code 👨💻
🙌 Support Turbo Makes Games: https://patreon.com/TurboMakesGames 🙌
🔧 Blog post with fixes for newer versions: https://www.tmg.dev/tuts/nfe-update/ 🔧
💬 Come chat with other DOTS/ECS devs: https://tmg.dev/Disco...
As long as I remember you must use them in editor, anyway they have no meaning in a build - your real clients will be different.
Build your server and spawn thin clients via editor with profiler connected to server.
Connect thin clients same as normal clients.
Why would they not have meaning in a build? 
As far as I know, they are the same as normal clients, just computer guided. They get the same packets as a normal/people client too.
So stress testing with 100 thin clients spamming abilities and movement is the same as having 100 people connecting and spamming abilities and movement afaik.
Your network will take the same hits.
But I haven't done this yet, want to do the stress test in my vacation soon and see how many thin clients I can have on my game. Perhaps I'm wrong.
if you build them with server there will be mess with 100 worlds that wants to update in the same frame as server - this is not you real case
if you want to test networking overhead and relevancy you need to run thin clients separatly from server and profile server
yep, that totally makes sense. But you need separate machine to properly stress test server
so X machines makes thin clients while server build runs agnostic of them
so technically
they don't need to be in build
because you can run them from editor
while connecting to build server
Sure, fair enough then. What I wanted to test was 3 computers, 1 being the player, 1 being all the thin clients and 1 being the server.
Not sure how much overhead all the thin clients have in the editor and if they are then comparable to a real player.
thin client purpose is to be as lightweight as possible
they don't have presentation
so you can just write a system for thin clients specifically (in editor only assembly) that will connect to server automatically and do all the random abilities flood you want
and see how much it can handle
I know, but editor performance is terrible due to a lot of things blocking/waiting.
Anyhow, were kind of on the same page. I'll just make a build for the thin clients instead and see if it changes how they react compared to the editor version.
At least my idea wasn't bad.
I want to test thin clients from multiple computers, thats why I need them to work outside of the editor :D
Well, they are all different connections anyhow, so that doesn't really matter afaik.
Yeah but I'm testing it with thousands of players :D
Oh neat! All close next to each other or in a big world?
all close next to each other 😈🧨
Uh, good luck then 😄
Would really love a video of it to be honest.
Stress tests are always cool
Really wondering how many connections Entities Netcode can handle close by
build server
run thin clients from editor
connect profiler to server
That's exactly what I want to find out :D I'll see if I'm allowed to post the results, but if so, I'll send it in here :)
So you think the editor+thousands of thinclients will be able to run on one pc?
nope, it will be dead
I would say no too
around 100 for sure
use a few computers and connect them to one server
Don't you expect at least 256 like battlebit? Or is there some reason why it can't reach that?
I mean, depends on how you write code
thinclient is a separate world and world a mostly main-thread thing so no, you can run nearly 100 no more
how much you sync and etc
I'm talking server only
I hope for more than 1k on a clean 3rd person char test
for thin clients you may run out of main thread performance already at around 10 😅
if it's tiny world with almost no ghost components?
never measured networking so you say 100 clients is a top?
I don't think so. I can run 30 headless clients that don't have the improvements of thin clients. I think ThinClients outside of the editor should already run 50 on a computer.
but it is a world with network driver and all relevant systems
I think the outside of editor part is very important here. Like I said, performance in your editor is terrible in many cases.
no I mean if you talk about server only, tiny area (no relevancy) and few ghost components per client
how many server can handle?
oh
this one really depends
because it's server authoritative
and it's not just thin client you are testing
for server it's true client
with all characters/input/simulation associated with it
yeah I wonder how big networking overhead is
hm, megacity now have 64 clients?
I will test it first for megacity metro and then for a clean project. Megacity metro claims to work with 100+ clients. I hope to be able to push it to 500, but I think it will break at 150 ...
Good luck, some stress testing data is always nice 👍
https://discord.com/channels/489222168727519232/1234759176513781790
We've actually posted a video of it now :)
Insane, well done! 
Kind of spikey though when you look at all 1700 thin clients 
yess, but most of it is just because of the project not being optimized for that many clients (every player has 4k textures slapped onto them)
We will soon (in 1 month or so) do the same with a clean very simple project :)
Really wondering how many you can do in that simple project. Already super cool that it doesn't die on itself with 1700 clients!
