Commit Graph

155 Commits

Author SHA1 Message Date
hiker
78b120a04f Moved wiimote handling into input manager. 2018-03-20 09:42:26 +11: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
b26b784b6a Various improvements to WAN and LAN connection 2018-02-24 15:48:30 +08:00
hiker
95f0bf9e3b Used functions in stk_config to convert between ticks and times. 2018-02-23 23:22:49 +11:00
Benau
7d14954012 Simpify network console 2018-02-23 14:57:59 +08:00
Benau
1458f3ef8e Fix wan connection, move get public address from stun to stk host 2018-02-22 15:11:07 +08:00
Benau
c5b986e874 Allow going back to online menu if server connection is lost 2018-02-18 14:06:17 +08:00
Benau
bcf8e4e5fe Allow shutdown STKHost from dialog 2018-02-17 16:25:53 +08:00
Benau
05f7c014dd Create a prototype for thread-safe protocol manager
Using weak and shared_ptr, if !lock(), than it was atomtically
destroyed
2018-02-15 16:47:04 +08:00
hiker
c0333fe0f7 Bugfix: TimeInfo objects were missing for substeps, resulting in
very stuttering game play.
2018-02-15 10:06:13 +11:00
hiker
4bd7848431 Removed duplicated update of the ProtocolManager, and only
update it when STKHost exists (otherwise STK will crash since
ProtocolManager can get called when it does not exist).
2018-02-14 09:27:13 +11:00
hiker
26401972d2 Merge branch 'fix-timestep' into game_protocol 2018-02-13 08:41:49 +11:00
hiker
fa20e4f866 Only issue sfx commands once per rendered frame (during the last
substep).
2018-02-12 18:01:05 +11:00
hiker
c7bc47f2e3 Fixed world update to be fixed at the physics frame rate. 2018-02-12 09:54:46 +11:00
hiker
b4d9e03e5c On GUI-less servers the frame rate can be <1ms. Previously the minimum
time-step size was 1 ms, which resulted in the world time advancing
faster than real time.  This caused problems in the communication
and synchronisation with clients.
2018-01-23 08:30:23 +11:00
hiker
373ec0f242 Made the history files use events for players (will break physics replay
for AIs for now). Useful for network debugging.
2018-01-03 16:29:35 +11:00
hiker
54b32ba6b1 Merge branch 'master' into game_protocol 2017-11-05 13:03:15 +11:00
hiker
1cc9f503a4 DT can actually be 0 :P (e.g. in server with no graphics, and I
guess on really fast computers). Bad things happen with dt=0, so
set dt to at least 1 ms.
2017-08-11 17:22:25 +10:00
hiker
3923da30bc Use unique names for profiler events. 2017-08-11 09:41:22 +10:00
hiker
28890aad33 Merge branch 'master' into game_protocol
Some minor changes to make code easier to read.
2017-08-09 09:50:46 +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
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
QwertyChouskie
0123228c20 Set menu FPS to 60 (#2823)
Smoother, see https://github.com/supertuxkart/stk-code/issues/2302.
2017-03-27 21:56:20 -04:00
Benau
668b28f632 Allow to config whether to limit game framerate with recordings 2017-03-22 07:43:00 +08:00
Benau
b0adb92964 Make sure all textures are uploaded without using timeout in TTL 2017-03-11 13:35:33 +08:00
Benau
d864995c7d First version of ThreadedTexLoader 2017-03-08 15:54:59 +08:00
hiker
9df07ac0c2 Rearranged code somewhat to make it easier to read - only cosmetic changes. 2017-01-31 18:25:30 +11:00
hiker
096d68c361 Merge remote-tracking branch 'origin/master' into game_protocol 2017-01-25 18:15:24 +11:00
auria.mg
68fe1e58c2 Fix a few divisions by zero, see #2727 2017-01-06 21:26:16 -05:00
hiker
5cde8f785f Fix crash in normal race (RaceEventManager NULL). 2016-12-16 23:26:34 +11:00
hiker
b73d08d089 Removed unnecessary cast. 2016-12-09 16:39:59 +11:00
hiker
fd5f60a786 Merge branch 'master' of github.com:supertuxkart/stk-code 2016-11-11 15:27:45 +11:00
hiker
fda3afad93 Fix 2658 by separating networking code from main loop. 2016-10-27 21:33:42 +11:00
hiker
b1f6632e5b Changed countdown from a mixture of ms and seconds to seconds only;
added documentation.
2016-10-27 08:40:45 +11:00
Benau
9aa92cfe30 Fix profiling mode framerate regression 2016-10-18 09:55:30 +08:00
hiker
91363f820b Disable slow-down of game time in case of very low FPS when networking
is used (this would desynchronise client and server).
2016-10-10 09:54:44 +11:00
hiker
9cf88ef874 Merge remote-tracking branch 'origin/master' into rewind.
Fixed conflicts.
2016-10-04 08:15:40 +11:00
hiker
74f521980a Fixed time handling to be in synch between history and rewind. 2016-09-23 07:56:21 +10:00
Suici Doga
1d75987fe6 Fix typo in main_loop.cpp 2016-09-19 13:54:42 +05:30
hiker
2a06036fb7 Changed order in which rendering and various updates are done, which
results in the physics reacting one frame earlier to user input.
2016-08-31 16:31:59 +10:00
hiker
a15c9529a5 Merge remote-tracking branch 'origin/master' into rewind 2016-08-01 08:18:38 +10:00
Benau
bbde4659c1 Allow arena ai profiling 2016-05-05 16:25:54 +08:00
hiker
2745e42935 Added a new 'testing ai', which can be started using a command line
option to either test it in play against computer, or in AI against
AI races. Atm the test_ai is nearly identical to the skidding
ai, except for one brake statement that needs to be investigated.
2016-05-03 21:28:11 +10:00
hiker
d092dcf96c Avoid slowdown in profile mode in profile mode when fps is < 60. 2016-04-22 16:04:27 +10:00
hiker
7d0953ad83 Merge branch 'master' into rewind 2016-04-12 17:36:56 +10:00
hiker
d25f3cee25 Added time step size as parameter to each protocol's synchromous update
function (which is needed for interpolation later).
2016-03-19 10:24:44 +11:00
hiker
7e6711e163 Renamged NetworkWorld to RaceEventManager (since this class is
not a 'world' in the sense our game modes are).
2016-02-11 09:03:51 +11:00
hiker
73e94e9824 Avoid race condition when a client exits in the lobby. 2015-11-28 12:33:01 +11:00
hiker
5fc830825f Refactoring: Created a separate NetworkConfiguration class which stores
all information to create the STKHost.
2015-11-12 09:53:12 +11:00