]> de.git.xonotic.org Git - xonotic/darkplaces.git/blob - README.md
2a59e2f0ce2c3cd6ab8221bfd889d7e0bf2ae96b
[xonotic/darkplaces.git] / README.md
1 # DarkPlaces Engine
2
3 DarkPlaces is a game engine based on the Quake 1 engine by id Software. It
4 improves and builds upon the original 1996 engine by adding modern rendering
5 features, and expanding upon the engine's native game code language QuakeC, as
6 well as supporting additional map and model formats.
7
8 Developed by LadyHavoc. See [CREDITS](CREDITS.md) for a list of contributors.
9
10 ## Help/support
11
12 ### IRC
13 #darkplaces on irc.anynet.org
14
15 ### [Matrix](https://matrix.org/docs/guides/introduction)
16 [![#darkplaces:matrix.org](https://img.shields.io/matrix/darkplaces:matrix.org?color=660000&label=%23darkplaces%3Amatrix.org)](https://matrix.to/#/#darkplaces:matrix.org)
17
18 ## Downloading and running
19
20 Linux x86_64 builds are available in [GitHub CI](https://github.com/DarkPlacesEngine/darkplaces/actions?query=branch%3Amaster) artifacts.  
21
22 More complete builds are available in [xonotic.org](https://beta.xonotic.org/autobuild/) engine zips.  
23 These support Windows, Linux and macOS, and include the current libraries needed for all features.
24
25 DarkPlaces supports many Quake-based games and you can select which it will run by renaming the executable so it's prefixed with the game's name, for example `rogue-sdl.exe`, or by passing a cmdline argument such as `-rogue`.  This changes various engine behaviours and cvar defaults to suit the game.  The supported list and related details are defined in [com_game.c](https://github.com/DarkPlacesEngine/darkplaces/blob/master/com_game.c).
26
27 Mods which aren't listed there can be run with (for example) `-game quake15` in which case DP will use the same behaviours and cvar defaults as for id1 Quake.
28
29 ## Quake Virtual File System
30
31 All of Quake's data access is through a hierarchical file system, the contents
32 of the file system can be transparently merged from several sources.
33
34 The "base directory" is the path to the directory holding the quake.exe and
35 all game directories.  The sys_* files pass this to host_init in
36 quakeparms_t->basedir.  This can be overridden with the "-basedir" command
37 line parm to allow code debugging in a different directory.  The base
38 directory is only used during filesystem initialization.
39
40 The "game directory" is the first tree on the search path and directory that
41 all generated files (savegames, screenshots, demos, config files) will be
42 saved to.  This can be overridden with the "-game" command line parameter.
43 If multiple "-game <gamedir>" args are passed the last one is the "primary"
44 and files will be saved there, the rest are read-only.
45
46 ## Build instructions (WIP)
47
48 These instructions are adequate for Quake, but for Xonotic please refer to [its wiki](https://gitlab.com/xonotic/xonotic/-/wikis/Compiling).
49
50 ### Required packages
51
52 The minimum SDL version is 2.0.18 for Linux and 2.24.0 for Windows.  
53 The following package names are for Debian, see below for Windows and Mac.
54
55 ##### Client
56 Build (mandatory): `build-essential` `libjpeg-dev` `libsdl2-dev`  
57 Runtime (optional): `libcurl` `libpng` `libfreetype6` `libvorbisfile`  
58
59 ##### Dedicated Server
60 Build (mandatory): `build-essential` `libjpeg-dev` `zlib1g-dev`  
61 Runtime (optional): `libcurl` `libpng`  
62
63 ### Windows (MSYS2):
64
65 1. Install MSYS2, found [here](https://www.msys2.org/).
66 2. Once you've installed MSYS2 and have fully updated it, open a MinGW64 terminal (***not an MSYS2 terminal***) and input the following command:
67
68 ```
69 pacman -S --needed gcc make mingw-w64-x86_64-{toolchain,libjpeg-turbo,libpng,libogg,libvorbis,SDL2}
70 ```
71
72 3. See [Unix instructions](#unix-(general)).
73
74 ### macOS
75 1. Open a terminal and input `xcode-select --install`
76 2. Install [Homebrew](https://brew.sh)
77 3. In the same (or a different terminal), input the following command:
78
79 ```
80 brew install sdl2 libjpeg-turbo libpng libvorbis curl
81 ```
82
83 4. See [Unix instructions](#unix-(general)).
84
85 ### Unix (General)
86
87 From a terminal, in the engine's root directory, input `make`. On macOS, input `make` with a target such as `make sdl-release`.
88
89 Input `make help` for options.
90
91 If you get errors (that don't seem to be about missing dependencies) try `make clean` before compiling, especially if you updated your system since the last time you compiled.
92
93
94 ### Windows (Visual Studio)
95
96 May work but not recommended due to lack of support for C standards, and lack of maintenance.
97 Instructions TODO.
98
99 ## Contributing
100
101 [DarkPlaces Contributing Guidelines](CONTRIBUTING.md)
102
103 ## Documentation
104
105 Doxygen: https://xonotic.org/doxygen/darkplaces