Open GoogleCodeExporter opened 9 years ago
Things like that are supposed to be handled in "get_inputs()" function, in
there you have several sub-functions for various player modes, including
possession (get_creature_control_action_inputs()) and dungeon view
(get_dungeon_control_action_inputs()).
Just make sure you're using packets for every action - otherwase your changes
will damage network synchronization.
Packets are used to exchange information between players in network game, so
all inputs are first reflected in Packet struct, and then after reading this
struct again are used to make change to Dungeon, Player or other game
structures.
Changes to game structures cannot be done without the use of Packets, unless
they're for computer players (which are using game_action() instead, as they
are making the same decisions on all hosts and don't need synchronization).
Original comment by mefistotelis
on 9 Apr 2015 at 5:25
I see, thanks for answering
but by
"Just make sure you're using packets for every action - otherwase your changes
will damage network synchronization."
Does this include the case involving only one player like rotating camera? I
was planning to skip using packet to percisely control how many degrees to
rotate by mouse drag, to make it feel more 'responsive'
Original comment by HeMeng86@gmail.com
on 10 Apr 2015 at 3:19
Mouse position is transferred within packets to some extent, but I'm not sure
whether it goes there in form of coordinates.
I remember making changes to transfer coordinates in form of position on the
in-game map, so that the screen coords (which are unreliable to interpret by
another machine) will not be used.
But I'm not sure if the coords were completely removed.
I guess the best would be to do the changes, and test locally whether it causes
desync. You may run two KeeperFX'es locally in windowed mode to simulate
network.
Original comment by mefistotelis
on 10 Apr 2015 at 3:26
Original comment by HeMeng86@gmail.com
on 28 Apr 2015 at 4:45
Original issue reported on code.google.com by
HeMeng86@gmail.com
on 8 Apr 2015 at 1:51