Multiplayer - local Player Prediction

Suggestions that have been added to the game.

Moderator: ickputzdirwech

Post Reply
An49
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Nov 03, 2014 9:39 pm
Contact:

Multiplayer - local Player Prediction

Post by An49 »

You've probably already have this planned, so i'll keep it short.

I understand how the netcode works in this game (Sending inputs for future ticks, making everything deterministic, synchronized random generator (if any exists)). But there is an annoying side effects that can be easily fixed - delayed movement.

Basically, what you'll want to do when the local player tries to move is to instantly move the player and camera visually, before the actual tick that is played. While keeping all game logic calculations with the real position in mind (this is only a "cosmetic" thing). Every tick you'll want to compare the predicted position(of <latency setting> ticks ago) to the actual position you got from playing other player's inputs . Unless anyone built anything to block you, you should never have prediction errors. (and when a prediction error occurs, just return the player to its actual real position.)


A more advanced (but less required) approach would be to predict everything (Building/Build range, chest contents, blocking your predicted self by building something next to you).
by the way, great game you got there.

Sincerely,
Someone who gets motion sickness from delayed input.

EDI
Inserter
Inserter
Posts: 21
Joined: Thu Jun 12, 2014 11:38 am
Contact:

Re: Multiplayer - local Player Prediction

Post by EDI »

I'd like to second this idea, even if I don't care as much for the delayed movement directly, as I do care about the inability in multiplayer to hold down the mine key to retrieve e.g. a lot of conveyor belts in a line. Currently, it leaves a lot of gaps, since the character seems to walk about one "tile", before the next mine command is recieved. =)

An49
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Nov 03, 2014 9:39 pm
Contact:

Re: Multiplayer - local Player Prediction

Post by An49 »

EDI wrote:I'd like to second this idea, even if I don't care as much for the delayed movement directly, as I do care about the inability in multiplayer to hold down the mine key to retrieve e.g. a lot of conveyor belts in a line. Currently, it leaves a lot of gaps, since the character seems to walk about one "tile", before the next mine command is recieved. =)
Ahhh you're right, that explains some problems i had yesterday in multi that didn't happen in single

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Multiplayer - local Player Prediction

Post by cube »

This is planned. For 0.12.0, probably.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Multiplayer - local Player Prediction

Post by bobingabout »

Yeah, my friend likes Factorio, but complains about certain things in multiplayer.

1. "I can't stand where I want to", because of this system, not only does it delay his movement, but even with a tap of the key, forces him to move for a whole second, walking past where he wants to be.
2. The mentioned mining difficulties that come along with point 1.
3. The CONSTANT micro-freezes, and pauses caused by the poor internet connection, because the game stops to wait for data constantly. (400ms, or "398ms" is our usual setting, but that might be too low given the playability we're getting)
4. "The map takes too long to transfer".

Points 1 and 2 are relavent to this topic.
Point 3, well, basically you need more efficient net code to fix that.
Point 4 is a bit moot, and since we havn't had a desync yet, isn't a real issue, but it is a bit annoying when setting up the game.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: Multiplayer - local Player Prediction

Post by SHiRKiT »

I bet the staff has this in mind, this is why the 0.11 was only a preview of the actual multiplayer. First get the things done that is core to the problem itself, then go for the optimization and polish area.

Post Reply

Return to “Implemented Suggestions”