Commit Graph

17435 Commits

Author SHA1 Message Date
hiker
dd9e361289 Stop startup time being accelerated in network games (which results
in client and server to become out of synch).
2017-06-14 08:28:06 +10:00
hiker
283f3b94d3 Fixed tiem correctoin (which was in the wrong direction). 2017-06-14 08:27:34 +10:00
hiker
72e7c5a4cb Updated unit testing for latest code changes, removed old/commented
out code.
2017-06-08 09:29:42 +10:00
hiker
08cd8bf235 Added debug output. 2017-06-08 09:17:34 +10:00
hiker
f772c090ec If a state from the server is received in the future (which can happen
if the server is forced to a rewind), make sure to still replay
the state.
2017-06-07 22:09:22 +10:00
hiker
0cc3a2d63f Removed unnecessary call. 2017-06-07 18:57:24 +10:00
hiker
48bbdc0e07 Determine end of rewind period by reaching the latest TimeStepInfo
(i.e. the one that was just added for the upcoming timestep that
first needed to do the rewind) instead of comparing world time
and end time - the latter is prone to floating point differences,
causing rewinds to 'rewind' the timestep that has yet being computed.
2017-06-07 09:33:40 +10:00
hiker
a13856c6d1 Adjust DT on client (due to server requests) at time DT is computed
(to keep consistent DT across all further calls, esp. avoid
issues with rewinding getting different DT).
2017-06-05 09:46:34 +10:00
hiker
f32a1961e2 Minor bugfix. 2017-06-05 09:06:12 +10:00
hiker
3747427c5f ixed handling of adding states to time step info to minimise
rewindw by assigning new events to existing time step info events.
2017-06-05 08:54:52 +10:00
hiker
34af963cc1 Fixed incorrect server-start-delay (caused by the start delay
being delivered in a different thread, so adding DT in the main
thread was not the right time step).
2017-05-29 15:08:32 +10:00
hiker
742be06c21 Removed code duplication by using macros. 2017-05-22 12:38:21 +10:00
hiker
fb5a600787 Remove 'duplicated' input events (e.g. auto-repeat might send
'accelerate' events over and over). This reduces traffic to
the server and other clients (and fixed a bug caused by rewinding
those events in the wrong order).
2017-05-17 09:19:19 +10:00
hiker
54fdd2d586 Add prefix for log messages during a rewind. 2017-05-16 22:01:32 +10:00
hiker
6162be9432 Add support for a 'prefix' to be printed for all log messages. 2017-05-16 22:00:35 +10:00
hiker
17751631f1 Protocol data structure uses now finer grained locks, avoiding that
asynchronous updates or event delivery can be delayed by synchronous
updates/event deliveries to a different protocol.
2017-02-15 09:57:38 +11:00
hiker
efeea8eeb2 More debug output. 2017-02-15 09:50:00 +11:00
hiker
69658c557b Refactored the event/state handling to make it somewhat faster by
avoiding creating smaller time steps on the server when events
from clients are received, and also made it easier to handle
duplicated states (i.e. server rewinds and sends a second state
for a certain time).
Still work in progress though.
2017-02-09 09:03:15 +11:00
hiker
ffff62ff52 Removed debug code. 2017-02-01 18:06:36 +11:00
hiker
9df07ac0c2 Rearranged code somewhat to make it easier to read - only cosmetic changes. 2017-01-31 18:25:30 +11:00
hiker
d8706e2319 Added log message when server starts a race on clients. 2017-01-30 09:29:58 +11:00
hiker
a3b959cee9 Avoid that the server replays states saved in the previous frame. 2017-01-30 08:58:00 +11:00
hiker
6cc795fc60 Use a std::list instead of std::vector for the list of events. This allows
not to lock the whole event queue while an event is being delivered, which
allows more parallelism (especially the asynchronous eventss queue is not
locked while e.g. the world is loaded, which can take several seconds).
2017-01-30 08:54:23 +11:00
hiker
dfc5c1499c Added separate log message for disconnecting clients. 2017-01-30 08:52:41 +11: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
7ad0a0cf69 Fixed coding style issues (same should be done with speedweight objects). 2017-01-25 21:55:16 +11:00
hiker
ecc4e30cbe Fixed compiler warning. 2017-01-25 21:51:26 +11:00
hiker
0e6daf9319 Fixed compiler warning. 2017-01-25 18:19:37 +11:00
hiker
096d68c361 Merge remote-tracking branch 'origin/master' into game_protocol 2017-01-25 18:15:24 +11:00
hiker
426cbaaff5 Added '--auto-connect' command line option to automatically connect
a client to the first LAN server it finds and start a race - strictly
for debuggint ;)
2017-01-25 14:29:48 +11:00
auria.mg
6e8480379b Add support of headlight models to karts 2017-01-23 20:14:42 -05:00
Arthur-D
925d756454 Adding some replays from Kitoko, thanks! Also removing a few so as to keep a low number of replays, and renamed easy replay files to novice. 2017-01-23 23:44:34 +01:00
hiker
b8bf4a3c2e Fixed documentation. 2017-01-24 08:35:15 +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
deve
a1e8cb8acd Try to fix build 2017-01-23 10:49:18 +01:00
deve
8c8d2ac8c4 Add a screen keyboard that can be used on touch screens 2017-01-23 07:14:09 +01:00
samuncle
d935f0318c The exhaust is tweaked a bit 2017-01-23 00:27:31 -05:00
samuncle
9e1afc89ee Add a permanant exhaust to the kart, tweaking needed 2017-01-22 23:20:07 -05:00
samuncle
50f3c224b3 change the name to development more accurate 2017-01-22 22:14:19 -05:00
samuncle
74cc87cd65 Merge branch 'master' of https://github.com/supertuxkart/stk-code 2017-01-22 22:10:12 -05:00
samuncle
d600720830 Add a new category of production babies 2017-01-22 22:09:56 -05:00
auria.mg
2bcc579f61 Fix crash 2017-01-22 21:23:33 -05:00
samuncle
996cea5a14 Oups, I forgot to drop the light 2017-01-22 20:32:25 -05:00
samuncle
979f61b8c1 Add support for day/night notion in tracks 2017-01-22 19:28:08 -05:00
hiker
9b38e401f4 Store special time events for clients (otherwise incorrect or even
way too large dt is used in rewind).
2017-01-23 08:23:54 +11:00
samuncle
4f1101d62b Activate headlight only for the player 2017-01-22 10:09:32 -05:00
samuncle
93011e934e Merge branch 'master' into headlight 2017-01-22 08:35:07 -05:00
hiker
d038848c2e If a client should have received a state in the future, use it (long
term this should not happen, since the server is behind the clients).
2017-01-22 17:41:47 +11:00
hiker
3712f1d600 Merge branch 'master' of github.com:supertuxkart/stk-code 2017-01-21 10:59:15 +11:00
samuncle
e86e146442 Add emit map to a shader, so cars in candela are like small dots 2017-01-20 00:06:35 -05:00