#ThinClients through code

1 messages · Page 1 of 1 (latest)

digital reef
#

Hi, is there a way to create ThinClients from code and auto connect them to the server? And would this work outside of the editor?

visual hornet
#

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

nimble token
# digital reef Hi, is there a way to create ThinClients from code and auto connect them to the ...

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...

▶ Play video
untold sun
nimble token
# untold sun As long as I remember you must use them in editor, anyway they have no meaning i...

Why would they not have meaning in a build? UnityChanHuh

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.

untold sun
visual hornet
#

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

nimble token
#

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.

visual hornet
#

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

nimble token
# visual hornet they don't have presentation

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.

digital reef
#

I want to test thin clients from multiple computers, thats why I need them to work outside of the editor :D

nimble token
#

Well, they are all different connections anyhow, so that doesn't really matter afaik.

digital reef
#

Yeah but I'm testing it with thousands of players :D

nimble token
#

Oh neat! All close next to each other or in a big world?

digital reef
nimble token
#

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

untold sun
digital reef
digital reef
nimble token
#

I would say no too

untold sun
#

use a few computers and connect them to one server

nimble token
visual hornet
#

I mean, depends on how you write code

untold sun
#

thinclient is a separate world and world a mostly main-thread thing so no, you can run nearly 100 no more

visual hornet
#

how much you sync and etc

digital reef
visual hornet
#

for thin clients you may run out of main thread performance already at around 10 😅

untold sun
digital reef
visual hornet
nimble token
untold sun
visual hornet
#

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

untold sun
#

yeah I wonder how big networking overhead is

visual hornet
#

can test megacity

#

or racing sample

untold sun
#

hm, megacity now have 64 clients?

digital reef
#

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 ...

nimble token
#

Good luck, some stress testing data is always nice 👍

brave verge
#

They claim 128+

#

so probably breaks at 130 mopBrows

nimble token
#

Kind of spikey though when you look at all 1700 thin clients UnityChanLOL

digital reef
#

We will soon (in 1 month or so) do the same with a clean very simple project :)

nimble token
#

Really wondering how many you can do in that simple project. Already super cool that it doesn't die on itself with 1700 clients!