Commit graph

119 commits

Author SHA1 Message Date
bors[bot] 5528cde5f6 Merge #869
869: Complete rework of the ghost and race recorder r=Learath2 a=Redix

This PR fixes a lot of issues with the ghost and race recorder, introduces a new ghost file format and implements some pretty useful features.

**A quick overview:**
 - When you cross the start line multiple times, both (ghost and recorder) will only restart if it is a non-solo server
 - If available, both will use the race timer to recognize the start instead of searching for the start line
 - Fastcap support for both
 - The recorder immediately starts when the Tee spawns, so the preparation steps (which are quite important for speedruns) will be included in the demo. If you do not cross the start-line within 20 seconds, it will stop the demo until you really start.
 - Better ghost menu (colors, reloading, deleting and saving ghosts)
 - The ghosts are more resistant against lags (old ones were sometimes completely useless due to small lags)
 - New ghosts files are significantly smaller
 - Cleanup, bugfixes..


**About the new ghost format (version 4/5):**
This format is used by Teerace for over a year now. The code for handling the binary files was moved to the engine. It includes an auto updater which creates a backup of all ghosts and converts them to the new format afterwards. The major differences from the format used by DDNet right now (version 2), are the ability to store multiple types of data, the usage of delta-encoding and a more portable header.

For whatever reason, the ghost stores values for every predicted tick, but without tick information, so lost snapshots can make them unusable. The new code uses the original values from the snapshots including ticks but it can also handle the old ones without. Since hardly any server uses the high bandwidth option this practically reduces the file size.

Like the demo recorder the ghost recorder directly stores the data to a file (every 50 snapshots) instead of writing the whole file at the end of the race. Indeed this can be changed with only a few lines if the old behavior is preferred.

The updater can handle version 2 (DDNet) and 3 (old teerace format, only slightly different from version 2) files. The updating already happens when the files are scanned for generating the list in the menu and not only when you activate them. The change from version 4 to 5 was only needed due to a bug in the implementation, the ghost loader can read both.

Some numbers about the file size: (map: hotrun, both about 30 seconds)

 - Old ghost: 30.4 kB (converted: 10.7 kB)
 - New ghost: 5.4 kB


**One thing about the race recorder:**
The old implementation compared the new file only with the first file it found for the particular map. The new one compares with all related demos and deletes them possibly, so that only the best demo is left. Since DDNet can also store the demos without name, this might also delete demos from other players, that you might have in your directory.
To prevent this I at least check whether the demo contains the player name if `cl_demo_name` is on. 
In my opinion the better solution would be to remove `cl_demo_name` and always use the player name.
2017-10-30 20:27:10 +00:00
def 04820b44f8 Simplify emoji 2017-10-28 09:08:17 +02:00
Dennis Felsing 77ca35567d Merge pull request #930 from heinrich5991/pr_ddnet_crosscompile_mac
Allow cross-compilation from Linux to macOS
2017-10-26 08:42:34 +02:00
heinrich5991 ab2738ca1b Allow cross-compilation from Linux to macOS 2017-10-25 16:57:25 +02:00
Dennis Felsing 233ec0a5f2 cmake fixes 2017-10-25 10:35:33 +02:00
heinrich5991 f3abdd43cb Add crypto and ssl if using bundled curl
Fixes #926.
2017-10-24 15:29:53 +02:00
Dennis Felsing 19a8054df6 Merge pull request #925 from heinrich5991/pr_ddnet_cmake_fix_bundle_libs
Only use bundled includes only if also using bundled libs
2017-10-24 12:24:50 +02:00
Dennis Felsing bf2edba73f Merge pull request #918 from heinrich5991/pr_ddnet_test_info
Add `CTestInfo` class, add test for create-close-remove process
2017-10-24 12:20:46 +02:00
heinrich5991 5ef723c7f6 Only use bundled includes only if also using bundled libs
Fixes #867. Fixes #922.
2017-10-24 12:10:46 +02:00
Dennis Felsing 2d889a0584 Merge pull request #920 from Jupeyy/master
VBO deletion after VAO deletion & viewport adjustment for dpi scaled displays at fullscreen
2017-10-24 07:58:37 +02:00
Dennis Felsing d9ababfce7 Merge pull request #921 from heinrich5991/pr_ddnet_crosscompile
Add toolchain files for MinGW 32- and 64-bit cross-compilation
2017-10-24 07:56:34 +02:00
Jupeyy ada954ea4e add shader directory to the install directory 2017-10-23 17:58:55 +02:00
heinrich5991 b1db90dbaa Don't build GTest in the default target 2017-10-23 14:43:33 +02:00
heinrich5991 8b1559ae14 Drop CMake 3.4 support for MSVS
Windows users don't have old versions of CMake from their repositories,
Visual Studio installs CMake 3.9.
2017-10-23 13:58:44 +02:00
heinrich5991 b463197348 Add CTestInfo class, add test for create-close-remove process 2017-10-23 00:13:53 +02:00
Jupeyy daee0a13a8 use spaces 2017-10-22 18:32:04 +02:00
Jupeyy 205b054026 move manifest to other directory and add MinGW support 2017-10-22 18:06:20 +02:00
Jupeyy 9a4efe758c use proper CMake 3.4 support for manifest files 2017-10-22 16:44:55 +02:00
Jupeyy 162b24c2b3 respect the CFG dir 2017-10-22 04:52:33 +02:00
Jupeyy 907622e108 don't read the manifest of the target 2017-10-22 04:10:21 +02:00
Jupeyy 152a71546f Add DPI awareness support for MSVC compiling for Win8.1 and Win10 2017-10-22 03:34:15 +02:00
heinrich5991 d01c892bbd Don't copy files twice in CMakeLists.txt 2017-10-20 12:22:46 +02:00
Dennis Felsing f679c3e1bd GLEW_STATIC 2017-10-20 11:52:18 +02:00
Dennis Felsing 6c7f6e3a7e glew on macosx as well... 2017-10-20 11:49:00 +02:00
Dennis Felsing 5a75dc7f27 New glew try 2017-10-20 11:35:44 +02:00
Dennis Felsing 88c0778b21 Bundle glew instead 2017-10-20 11:12:27 +02:00
Dennis Felsing d6999bb726 Merge "Pull Request using OpenGL 3.3" 2017-10-18 12:49:27 +02:00
heinrich5991 6452c7e5c3 Enable automatic download of GTest on Windows by default 2017-10-15 10:25:26 +02:00
heinrich5991 ea978e1db7 Add a flag -DDOWNLOAD_GTEST to automatically download and build GTest
Enable tests on Circle CI, macOS on Travis and Appveyor.
2017-10-15 09:57:21 +02:00
heinrich5991 e989ffad78 Rename async_* to aio_* and add test for nondivisible buffer lengths 2017-10-13 02:48:42 +02:00
heinrich5991 2fc018aac3 Add asynchronous file output, port dbg_msg()s to that system
Also add tests.
2017-10-10 04:11:14 +02:00
heinrich5991 7de42a1414 Couple of thread fixes 2017-10-10 00:08:24 +02:00
Learath2 d15dcd3c58 Merge pull request #871 from heinrich5991/ddnet_teehistorian
Teehistorian
2017-10-09 18:42:27 +02:00
Redix 134a79a225 Move RaceHelper to src/game/client 2017-10-06 22:13:35 +02:00
Redix b1e7138847 Added ghost file handling classes 2017-09-28 16:01:56 +02:00
heinrich5991 f43480aeed Add testing infrastructure for teehistorian 2017-09-28 02:03:30 +02:00
heinrich5991 72a17da716 Change to C++11 in CMakeLists.txt, bam.lua 2017-09-21 23:34:51 +02:00
Dennis Felsing 94c7c8d864 Use C++14 2017-09-21 15:11:09 +02:00
heinrich5991 6ef9c8dbcd First working version of teehistorian
teehistorian records all inputs from the players as well as the player
positions in each tick. It stores this info in a highly compressible
output format (I've achived 5x compression using xz or bz2).
2017-09-20 02:16:11 +02:00
Jupeyy cb1ab7ff9e sort opengl_sl files alphabetically 2017-09-16 18:58:24 +02:00
def 75d3eeaa09 Try linking against security framework on macosx 2017-09-16 11:39:09 +02:00
Dennis Felsing f60eb5658f Merge pull request #836 from heinrich5991/pr_ddnet_unify_icons
Unify icons for gcc and MSVC, fix server icon
2017-09-16 11:18:40 +02:00
heinrich5991 a34b1f4dd7 Add compatibility with older CMake for package 2017-09-13 22:38:25 +02:00
Jupeyy 7e0146be97 replace tabs with spaces 2017-09-13 20:09:40 +02:00
Jupeyy de43d410fe merged cmakelist 2017-09-12 21:03:27 +02:00
Jupeyy 629bf2c5f9 Merge branch 'master' of https://github.com/ddnet/ddnet 2017-09-12 20:24:58 +02:00
Jupeyy 4d8cf36e29 add GLEW to cmake 2017-09-12 20:03:06 +02:00
heinrich5991 8b2e31620f Compatibility with older CMake
Copy each file individually, only pass --type parameter for creating
zips.
2017-09-05 21:52:54 +02:00
heinrich5991 45d944162a Add package targets independent of CPack
This makes packaging compatible to CMake versions prior to CMake 3.6.
2017-09-05 16:00:50 +02:00
heinrich5991 38c26de47b Add install, package and package_source targets to CMake
On Linux, `install` installs DDNet into the normal file system (root
rights required).

`package` tries to create an archive similar to today's release archives
and `package_source` tries to create a source archive similar to today's
source archives.
2017-09-05 15:55:38 +02:00