Commit graph

105 commits

Author SHA1 Message Date
Dennis Felsing 39b36b2c3b Check file system operations and log them 2018-08-23 09:58:35 +02:00
heinrich5991 e8c7dca035 Fix storage.cfg reading broken by the str_startswith change 2018-07-26 15:46:54 +02:00
heinrich5991 5c4e819e44 Use str_startswith, str_endswith instead of ad-hoc implementations 2018-07-26 14:18:23 +02:00
yangfl 46b7e4198b Allow specifying DATA_DIR by compiler option, retry #1042 2018-04-05 11:11:31 +08:00
def a9a71094dd Revert "Allow specifying DATA_DIR by compiler option"
This reverts commit 3c488ff5c7.
2018-04-03 19:18:27 +02:00
yangfl 3c488ff5c7 Allow specifying DATA_DIR by compiler option 2018-02-22 00:12:52 +08:00
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
Redix 2586c001b7 Use demos/auto/race for the race recorder 2017-09-28 19:14:36 +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
Dennis Felsing ed59b0f4a2 Fix binary dirs for installed locations on POSIX
Also rename them from teeworlds to ddnet
2017-09-01 13:37:01 +02:00
heinrich5991 22be1be389 Fix and rename the CEditor::ExtractName function
Fixes #846.
2017-08-30 13:59:42 +02:00
def 0b5942fc04 Add special handling for infClass class selection (fixes #794) 2017-07-21 21:43:56 +02:00
def f2444b0de7 Add map_diff tool to compare tile layers of map versions 2017-07-12 20:15:00 +02:00
heinrich5991 1a50d405cb Use str_find from src/base/system.h and check for C: on Windows
Previously, using drive-relative paths could be used to escape the
Teeworlds directory on Windows.
2017-06-18 16:26:29 +02:00
def 59b33b95e4 Stronger catch for .. 2017-06-17 23:07:02 +02:00
def d3daa51486 Correct filter 2017-06-16 22:19:36 +02:00
def 624fd38188 Oops 2017-06-16 20:46:41 +02:00
def 1b0de108c6 Forbid escaping base directory 2017-06-16 20:22:43 +02:00
necropotame b8e4e5beea Fix style in several places 2017-03-22 19:45:14 +01:00
def 61e47422f6 Clean up debug messages a bit (lower case, no useless errors) 2016-05-02 21:35:32 +02:00
def 644a23ba57 Fix folder creation 2016-05-01 14:45:47 +02:00
fstd d276f2c0e7 add /usr/pkg to the list of paths searched for data files (this is the default installation prefix on NetBSD (pkgsrc)) 2015-09-23 16:47:01 +02:00
east 675c6eb1e0 Demo browser column listbox added 2015-08-27 15:05:24 +02:00
heinrich5991 53d7e0dd4c Fix file opening in config_* tools 2015-08-27 12:55:35 +02:00
heinrich5991 d13ebf93a2 Add config_store and config_retrieve tool 2015-08-27 12:55:35 +02:00
BeaR 839db0a04a Create directory for statboard screenshots 2015-06-17 14:13:19 +02:00
def d835826461 Use proper path for autoupdater on *nix 2015-03-14 20:01:18 +01:00
def d092b8007d Add editor undo function (by MAP94) 2014-01-19 04:02:01 +01:00
GreYFoX cd4ba53bae Merge branch 'master' of git://github.com/teeworlds/teeworlds into DDRace
Conflicts:
	bam.lua
	scripts/build.py
	scripts/make_release.py
	src/engine/server.h
	src/game/client/gameclient.cpp
	src/game/server/gamecontext.cpp
	src/game/server/gamecontext.h
	src/game/server/gamecontroller.cpp
	src/game/server/gamecontroller.h
	src/game/server/player.cpp
	src/game/version.h
2012-04-12 02:09:31 +02:00
oy 4073520214 cleaned up content folder creation. Closes #845 2012-01-09 01:38:45 +01:00
oy bafd22ebe7 show path in the editor file dialog. Closes #786 2012-01-08 13:14:02 +01:00
GreYFoX 0df6d0541f Merge branch 'master' of git://github.com/oy/teeworlds into HEAD
Conflicts:
	bam.lua
	src/engine/console.h
	src/engine/server.h
	src/engine/server/server.cpp
	src/engine/shared/config.h
	src/engine/shared/config_variables.h
	src/engine/shared/console.cpp
	src/engine/shared/console.h
	src/game/client/components/binds.cpp
	src/game/client/components/chat.h
	src/game/client/components/console.cpp
	src/game/client/components/console.h
	src/game/client/components/controls.cpp
	src/game/client/components/emoticon.h
	src/game/client/components/maplayers.cpp
	src/game/client/components/menus.h
	src/game/client/components/scoreboard.h
	src/game/client/components/spectator.h
	src/game/client/components/voting.h
	src/game/client/gameclient.cpp
	src/game/client/gameclient.h
	src/game/client/render.h
	src/game/collision.cpp
	src/game/editor/ed_layer_tiles.cpp
	src/game/gamecore.cpp
	src/game/gamecore.h
	src/game/layers.cpp
	src/game/layers.h
	src/game/mapitems.h
	src/game/server/entities/character.cpp
	src/game/server/entities/laser.cpp
	src/game/server/entities/laser.h
	src/game/server/entities/pickup.cpp
	src/game/server/entities/pickup.h
	src/game/server/entities/projectile.cpp
	src/game/server/gamecontext.cpp
	src/game/server/gamecontroller.cpp
	src/game/server/gamecontroller.h
	src/game/server/gameworld.cpp
	src/game/server/gameworld.h
	src/game/server/player.cpp
	src/game/variables.h
2011-04-14 01:27:49 +02:00
oy 06115dd49d added "Whitespace and line Endings cleanup" by GreYFoX 2011-04-13 20:37:12 +02:00
GreYFoX f7f6058a92 Merged Oy, Cleaned up, removed some useless features and code parts
Added Icon by landil
alot more...
2011-04-09 22:32:17 +02:00
oy de1e8fc851 improved FindFile so it stops on a match 2011-04-07 18:45:24 +02:00
oy d9ce720387 made engine an interface 2011-02-27 15:03:57 +01:00
oy 088ec3e2f3 made the client's map search work with sub folders. Closes #254 2011-02-21 11:23:30 +01:00
GreYFoXGTi 24a688b2c3 Added AutoDemoRecord and ghost made by Race mod team, implemented to DDRace by noother 2011-02-04 22:15:02 +02:00
oy c75a75b64f made it possible to automatically take game over screenshots. Closes #339 2010-12-12 16:48:13 +01:00
oy 49bea07df7 show the path of $CURRENTDIR. Closes #323 2010-12-11 23:10:13 +01:00
oy 48cd937234 fixed wrong $DATADIR path. Closes #316 2010-12-11 22:48:37 +01:00
oy 7c26dcbadd moved function to remove files 2010-12-08 00:13:59 +01:00
oy d30dd9da8f added Storage function to move/rename files by Batchyx 2010-12-08 00:09:18 +01:00
Batchyx c3966413e9 Storage: fix RemoveFile and CreateFolder ret value
Removefile returns remove() and CreateFolder returns fs_makedir(),
but they returns 0 on success and non-zero on error. Fix that,
RemoveFile and CreateFolder should return true on success.
(they return false when the type argument is invalid).

note: bug has remained unoticed because noone uses CreateFolder, and the
user of RemoveFile (the demo browser's remove button) doesn't
check the return value.
2010-11-24 01:15:18 +01:00
Sworddragon fc9211c777 Updated copyrights 2010-11-20 21:26:06 +01:00
oy fd3d01ef14 removed no longer needed data-dir override param - mods system should be used instead. Closes #267 2010-11-17 01:02:29 +01:00
oy e306cc45d5 show real $USERDIR and $DATADIR path on startup 2010-11-13 23:54:34 +01:00
oy 85fd272846 added the possibility to create a new folder within the editor's save file dialog 2010-10-16 18:33:54 +02:00
oy 3a98f7a048 added mod system. Closes #34 2010-10-06 23:07:35 +02:00
oy 7e0b37e06c fixed that it checks the current dir for demos too 2010-09-24 13:38:03 +02:00
Choupom fcfaa8389f added Remove button in demos browser (#66) 2010-09-05 17:40:51 +02:00
oy 4a365d41b6 added fix for crash when there is no datadir 2010-08-05 20:34:16 +02:00
oy 665205327d added lost datadir override feature 2010-08-05 20:26:03 +02:00
oy a5113c6740 added commands to dump the output of the consoles into a file 2010-06-20 14:12:59 +02:00
Magnus Auvinen 72c06a2589 copied refactor to trunk 2010-05-29 07:25:38 +00:00