#server stuff
1 messages · Page 1 of 1 (latest)
before going any further, I would highly suggest doing benchmarks and measuring throughput
for the sake of the product
You really shouldn't need to send out updates more than 30 times per second as well.
you can probably do 1 per second if it's just updating to a web server.
When I was first starting networking a few years ago, I used JSON as well, for state updates. After about 20-30 objects in the scene, the game became extremely laggy due to JSON itself.
It's just not meant for realtime stuff.
in my own personal projects, i only use it to save load data
like on start and end of the game
yeah single time stuff like that isn't a problem
The problem with JSON in this case, is that you're allocating a bunch of strings every time it needs to read data
which is extremely slow
anyways I won't bother you anymore. Heed my warnings.
If you have questions regarding networking, just ping me
this is server logs
i guess its update based, the trace is way too long and i give up to find it
yeah uh
your boss doesn't sound like he understands what he's doing
I assume you've only tested this locally? Not across the internet?
he tested, somehow it works, but we got tremendous amount of bugs
it really works tho
What is this for though? You buy the software, then do you setup your own web server for it to use?
Or do customers use your web servers?
the boss is ambitious about being 3A company, so he wants to follow every footstep a normal 3A company will do
So like, customer buys the unity plugin, then they connect to your companys servers?
our customer is local university, teacher will buy one of our setup scenes, and be able to access part of our setup functions, so they can create their own NPCs and scene objects
its for metaverse learning
You don't think a government facility is going to be angry when this eats up 300mbps per client?
we made the scene, implemented necessary system
welp lol, they seemed more pissed at the bugs lol
I can get, easy, 1000 frames per second in my editor
we really havent dived into benchmark that thruoughly
float tickRate = 30; // Execute our custom loop 30 times per second.
float myFixedDeltaTime = // (1 / tickRate) will be 0.033 at 30hz tickrate. This is the amount of seconds between each tick.
public void Update() {
// Timer starts at 0. Every frame, we add the seconds since last frame. Like below.
timer += Time.deltaTime;
// Is our clock ready to tick? While loop prevents the clock from falling behind. Could execute multiple times in a single update() just like unity's fixedupdate().
while (timer >= myFixedDeltaTime )
{
// Take away the delta time that we just consumed
timer -= myFixedDeltaTime ;
MyCustomFixedUpdate();
}
}
public void MyCustomFixedUpdate() {
Debug.Log("I'm running 30 times per second!");
}```
but what i know is, this game is mobile game, and the phone models from 2016-2018 cant withstand the load
Heres how you make a clock in unity
you should save that code block somewhere btw
It will only tick n times per second
oh timer