Hi, first off, I apologize if this is the wrong forum.
Okay, so I'm making a remake of Run Kitty Run, attempting to get rid of all its defects. The only one that I still haven't figured out is lag, and it's the biggest one. The reason for the lag is this - host-side unit logic. The host controls the units that everyone knows about. They all know the position, AI, seeded random number, everything. They don't need to wait for the host to tell them where the unit is.
The process goes like this:
The problem is that clients have to wait between around 30 to 200 ms (or more!) to know where the wolf will be next (in order to dodge it). The ideal process would be this:
Startup:
Update:
Now the client doesn't have to wait at all! I've looked into this, and I've experimented with a few things, and no such luck yet. I'm asking the experts of hive workshop to see if this really is possible.
Things I've tried (or contemplated) - using Special Effects. I can create a unit model, but how about doing running animations and stuff? Also, the model is sunk into the ground, can it be pushed up? Is it efficient? And most importantly, is it CLIENT SIDE?
Okay, so I'm making a remake of Run Kitty Run, attempting to get rid of all its defects. The only one that I still haven't figured out is lag, and it's the biggest one. The reason for the lag is this - host-side unit logic. The host controls the units that everyone knows about. They all know the position, AI, seeded random number, everything. They don't need to wait for the host to tell them where the unit is.
The process goes like this:
- Host calculates unit position and angle
- Host sends unit position and angle to clients
- Clients receive unit position and angle
- Clients display unit position, angle, and animation
- Repeat
The problem is that clients have to wait between around 30 to 200 ms (or more!) to know where the wolf will be next (in order to dodge it). The ideal process would be this:
Startup:
- Host distributes random seed
- Client calculates wolf positions, movement speed, and angle
Update:
- Client calculates new unit position, movement, angle, etc.
- Client displays unit
Now the client doesn't have to wait at all! I've looked into this, and I've experimented with a few things, and no such luck yet. I'm asking the experts of hive workshop to see if this really is possible.
Things I've tried (or contemplated) - using Special Effects. I can create a unit model, but how about doing running animations and stuff? Also, the model is sunk into the ground, can it be pushed up? Is it efficient? And most importantly, is it CLIENT SIDE?