49 Commits

Author SHA1 Message Date
Benau
01b95d873e Header clean up 2018-09-15 11:18:30 +08:00
Benau
83a456e835 Add kart id checking so that only peer with correct kart can control 2018-09-14 21:42:35 +08:00
Benau
db36ee6df6 Handle controller the last to avoid slow PC sending actions too late 2018-08-18 12:49:31 +08:00
Benau
4ec8a33f8c Use a correct queue to save network state 2018-07-30 19:38:10 +08:00
Benau
f49a092603 Optimize network state saving 2018-07-30 16:26:28 +08:00
Benau
d9cebc3991 Try unreliable state in network 2018-07-27 21:47:07 +08:00
Benau
59f1fdf250 Take controller event into account for connection debug 2018-07-18 13:31:38 +08:00
Benau
f5230e30aa Use the original way to save controller event
And save more locally for network state
2018-07-18 13:10:44 +08:00
Benau
49d7a2fbbc Use count up ticks on rewinding for time limit in soccer game 2018-07-13 23:34:50 +08:00
Benau
565dfcef96 Only send state for moving track object 2018-07-13 10:47:30 +08:00
Benau
8c53296290 Disable the unneeded time adjust 2018-07-02 16:38:11 +08:00
Benau
172a86192f Remove debug output 2018-07-01 14:34:02 +08:00
Benau
d3f7cb7999 Move ticks adjustment to main_loop 2018-07-01 14:31:42 +08:00
Benau
bd5381dad7 Buffer all inputs until last frame ticks 2018-06-25 11:57:18 +08:00
Benau
b9bf3fa125 Use map to store peer and ticks in network item manager 2018-06-08 14:24:21 +08:00
hiker
cd80101bdf Removed execute permission (for unknown reasons VS makes source files
executable when it saves them).
2018-06-08 10:59:13 +10:00
hiker
b0da0f640a Merge remote-tracking branch 'origin/master' into network-items,
fixed conflicts.
2018-06-08 10:55:14 +10:00
Benau
d89c65b0c9 Remove token in network string 2018-06-04 13:25:10 +08:00
Benau
ff08a2ba16 Don't send events if it trigger a rewind in server 2018-05-22 14:21:05 +08:00
Benau
7926ad9ba0 Progressively adjust time with slow down functionality 2018-05-11 10:43:22 +08:00
hiker
031eb461a3 Removed debug output. 2018-05-10 01:07:41 +10:00
hiker
9d60112e65 Started to implement proper item handling: the server now sends
updates of all collected items to the clients as part of a state.
A client confirms the received states. Once all clients have
confirmed a certain event, that event is deleted on the server
and not sent anymore. WIP, item collection kind of works, but only
because of kart state updates which include attachment (but not
e.g. nitro).
2018-05-08 19:12:06 +10:00
hiker
356680b182 Removed debug prints. 2018-05-08 18:41:37 +10:00
Benau
e5c991e3d2 Merge remote-tracking branch 'origin/master' into kobato 2018-04-20 13:03:34 +08:00
Benau
99a25bb837 Implement a proper end and restart race in network 2018-04-20 12:19:58 +08:00
hiker
da7780a9e1 Removed the storing of DT (which is not necessary when using ticks
now). Removed TimeStep information class etc.
2018-04-20 12:19:57 +08:00
hiker
a9a73e643b Save an initial state at t=0 on the client, to make sure they
can always rewind (e.g. in case that an event from another client
arrives before a state from the server).
2018-04-17 18:42:16 +10:00
hiker
70e7625282 Don't split a game state upon receiving into separate chunks (one
for each rewinder), instead save only one state with all rewind
buffers.
2018-04-17 09:17:02 +10:00
hiker
3167180d7f Refactored state saving into a separate function to later allow
saving of an initial local state.
2018-04-16 17:25:50 +10:00
hiker
1b72d88593 Merge remote-tracking branch 'origin/kobato' into game_protocol 2018-03-31 01:12:22 +11:00
hiker
b1013f6030 Merge remote-tracking branch 'origin/network_improvements' into game_protocol 2018-03-31 00:38:57 +11:00
hiker
2192d1383f Removed the storing of DT (which is not necessary when using ticks
now). Removed TimeStep information class etc.
2018-03-30 18:32:48 +11:00
Benau
e58d86d4d5 Merge branch 'origin/game_protocol' 2018-03-20 08:32:45 +08:00
hiker
c456edd9f2 Convert more time handling to handling ticks. 2018-03-20 09:25:39 +11:00
hiker
d3a60356c9 Merge remote-tracking branch 'origin/fix-timestep' into game_protocol.
Started to use ticks instead of time floating point values in networking.
2018-03-13 18:37:12 +11:00
Benau
d538dfc7e6 Header cleanup 2018-03-09 21:17:31 +08:00
Benau
2b56a97b08 Clean up Server, ServersManager and quick play
For now we choose the server with the least player for quick play
2018-03-05 01:54:44 +08:00
Benau
0a5c1a69c7 Use shared_ptr for protocol to avoid leaking
With weak_ptr it's also possible to auto clear LobbyProtocol when
STKHost is shutdown
2018-02-18 12:39:05 +08:00
Benau
3290321c5d PlayerController can become EndController anytime 2018-02-09 18:00:19 +08:00
hiker
08cd8bf235 Added debug output. 2017-06-08 09:17:34 +10:00
hiker
cebf24f3af Don't use the time during a rewind to determine if a client needs
to slow down.
2017-01-27 23:45:25 +11:00
hiker
241d31d8f9 Added support for slowing down time on a client. This is used by
a server to reduce number of rewinds.
2017-01-24 08:05:46 +11:00
hiker
a8be3f8068 Removed unnecessary events crated by KartControl, added steer_left
and steer_right values from the player controller to the state to
fix steering synchronsiation problems.
2017-01-11 09:29:01 +11:00
hiker
b3f6307107 Fixed crash when exiting a race early. 2017-01-04 09:23:57 +11:00
hiker
069e916dc0 Added state updates, not fully working yet. 2016-12-30 13:35:48 +11:00
hiker
1e372d6e77 Added separate queue for storing network events (to reduce synchronisation);
replaced vector with std::list in preparation for making the RewindManager
threadsafe.
2016-12-17 10:32:21 +11:00
hiker
77c14152c2 The server now uses the RewindManager to receive network events
and takes the kart input from this queue of events.
2016-12-15 08:12:04 +11:00
hiker
a8d3b6b0df Fixed compiler warning. 2016-12-09 09:18:56 +11:00
hiker
4d065f67e6 Started to introduce GameProtocol (which will combine several
individual protocols.
2016-12-09 08:55:06 +11:00