• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

3rdparty/H03-May-2022-629,235458,923

build_tools/H03-May-2022-823730

cmake/H03-May-2022-1,9531,707

data/H03-May-2022-367,018365,314

doc/H03-May-2022-9,0426,338

docker/H18-Apr-2021-281203

icons/H03-May-2022-178174

lib/H03-May-2022-105,16173,510

macosx/H18-Apr-2021-2,4081,672

pkg/H03-May-2022-6,2124,863

po/H03-May-2022-717,355596,797

src/H03-May-2022-154,971115,499

tests/H18-Apr-2021-4,0053,498

tools/H18-Apr-2021-28,92824,353

win32/H03-May-2022-633480

.dockerfilelintrcH A D18-Apr-20212.9 KiB10577

.drone.ymlH A D18-Apr-20211.9 KiB6859

.editorconfigH A D18-Apr-2021769 4637

.eslintrc.jsonH A D18-Apr-20215.3 KiB185184

.snapcraft.yamlH A D18-Apr-20215.8 KiB221208

AUTHORSH A D18-Apr-202116.2 KiB375349

COPYINGH A D18-Apr-202117.6 KiB341281

COPYING.NONGPLH A D18-Apr-20213.9 KiB7270

COPYING.READMEH A D18-Apr-20213.6 KiB7360

ChangeLogH A D18-Apr-2021288.1 KiB3,4333,311

README.mdH A D18-Apr-202118.6 KiB376296

configure_mac.cmakeH A D03-May-202212.1 KiB329263

get-dependencies_linux.shH A D18-Apr-20213.8 KiB11666

get-dependencies_win.ps1H A D18-Apr-20215 KiB139103

vcpkg.jsonH A D18-Apr-20211.1 KiB6766

COPYING.README

1Warzone 2100 Source & Data
2--------------------------
3
4This document replaces the file "readme.txt" as present in the Warzone 2100 GPL
5 release of December 6th 2004.
6
71) These source and data files are provided as is with no guarantees:
8   - No assistance or support will be offered or given.
9   - Everything you will require to make a build of the game should be here. If
10      it isn't, you'll have to improvise.
11   - None of us here at Pivotal Games are in a position to be able to offer any
12      help with making this work.
13
142) Everything included (source code and data), as well as the not included
15    videos and music, is released under the terms of the GNU General Public
16    License, version 2 or (at your option) any later version.
17   Please be sure to read the entirety of this license, but the summary is that
18    you're free to do what you want with the source subject to making the full
19    source code freely available in the event of the distribution of new
20    binaries.
21
223) Following exception to the GPL is granted:
23   ------
24    Linking Warzone 2100 statically or dynamically with other modules is making
25     a combined work based on Warzone 2100. Thus, the terms and conditions of
26     the GNU General Public License cover the whole combination.
27
28    In addition, as a special exception, the copyright holders of Warzone 2100
29     give you permission to combine Warzone 2100 with code included in the
30     standard release of libraries that are accessible, redistributable and
31     linkable free of charge. You may copy and distribute such a system
32     following the terms of the GNU GPL for Warzone 2100 and the licenses of the
33     other code concerned.
34
35    Note that people who make modified versions of Warzone 2100 are not
36     obligated to grant this special exception for their modified versions; it
37     is their choice whether to do so. The GNU General Public License gives
38     permission to release a modified version without this exception; this
39     exception also makes it possible to release a modified version which
40     carries forward this exception.
41   ------
42
434) Permission is granted to use the name "Warzone 2100", the logos, stories,
44    texts and related materials.
45
465) Permission is granted to copy and distribute unaltered copies and/or images
47    of the original game discs in any medium, provided that they are distributed
48    free of charge and retain their original copyright and trademark notices.
49
50Finally, the primary motivation for this release is for entertainment and
51 educational purposes. On the subject of the latter, don't be surprised to see
52 some pretty gnarly old-school C code in here; the game was a classic, but large
53 areas of the code aren't pretty; OO design and C++ evangelists beware! We
54 haven't spent any time cleaning the code or making it pretty - what you see is
55 what you're getting, warts n' all.
56
57Thank you to Jonathan Kemp of Eidos Europe for permitting the release. Thanks to
58 Martin Severn for allowing to use his soundtrack. Thanks to Jason Walker for
59 helping to facilitate the release of the movies and sound tracks, as well as
60 clarifying the meaning of this license. Thanks also to Frank Lamboy for
61 assistance with the release and for campaigning along with many many others
62 over the years for the source to be made available.
63The correspondence, online petitions and persistence made this possible. We were
64 constantly amazed at the community support for Warzone even after all this
65 time; it's nice to be able to give something back, assuming you can get it to
66 compile... ;-)
67
68Original - 6th December 2004
69Alex M - ex Pumpkin Studios (Eidos)
70
71Amended - 10th June 2008
72Jason W - Eidos
73

README.md

1Warzone 2100
2============
3
4[Homepage of the Warzone 2100 Project](https://wz2100.net/)
5
6Origins
7-------
8
9Warzone 2100, released in 1999 and developed by Pumpkin Studios, was a
10ground-breaking and innovative 3D real-time strategy game.
11
12In 2004 Eidos, in collaboration with Pumpkin Studios, decided to release
13the source for the game under the terms of the GNU GPL, including everything
14but the music and in-game video sequences, which were released later.
15
16State of the game
17-----------------
18
19After the liberation of the Warzone 2100 source-code on December 6th, 2004, all
20proprietary technologies have been replaced with open-source counterparts.
21
22Right now supported platforms are Linux, Windows, and macOS. There are reports
23that Warzone 2100 is working on BSD, too.
24
25Latest development builds
26-------------------------
27
28[![Windows Build Status](https://img.shields.io/github/workflow/status/Warzone2100/warzone2100/Windows/master?label=Windows&logo=windows)](https://github.com/Warzone2100/warzone2100/actions?query=workflow%3AWindows+branch%3Amaster+event%3Apush)
29 [![macOS Build Status](https://img.shields.io/github/workflow/status/Warzone2100/warzone2100/macOS/master?label=macOS&logo=apple)](https://github.com/Warzone2100/warzone2100/actions?query=workflow%3AmacOS+branch%3Amaster+event%3Apush)
30 [![Ubuntu Build Status](https://img.shields.io/github/workflow/status/Warzone2100/warzone2100/Ubuntu/master?label=Ubuntu&logo=ubuntu&logoColor=FFFFFF)](https://github.com/Warzone2100/warzone2100/actions?query=workflow%3AUbuntu+branch%3Amaster+event%3Apush)
31 [![Fedora Build Status](https://img.shields.io/github/workflow/status/Warzone2100/warzone2100/Fedora/master?label=Fedora&logo=fedora&logoColor=FFFFFF)](https://github.com/Warzone2100/warzone2100/actions?query=workflow%3AFedora+branch%3Amaster+event%3Apush)
32 [![FreeBSD Build Status](https://img.shields.io/cirrus/github/Warzone2100/warzone2100/master?label=FreeBSD&logo=FreeBSD)](https://cirrus-ci.com/github/Warzone2100/warzone2100/master)
33 [![Drone Cloud CI ARM64 Build Status](https://img.shields.io/drone/build/Warzone2100/warzone2100/master?label=ARM64%20Linux)](https://cloud.drone.io/Warzone2100/warzone2100)
34 [![Packaging status](https://repology.org/badge/tiny-repos/warzone2100.svg)](https://repology.org/project/warzone2100/versions)
35
36### Windows
37
38How to get the latest Windows development builds:
391. View the **[latest successful Windows builds](https://github.com/Warzone2100/warzone2100/actions?query=workflow%3AWindows+branch%3Amaster+event%3Apush+is%3Asuccess)**.
402. Select the latest workflow run in the table / list.
41   This should display a list of **Artifacts** from the run.
423. Download the `warzone2100_win_x86_portable` or `warzone2100_win_x86_installer` artifact (depending on whether you want the portable build or the full / regular installer).
43> Note: A free GitHub account is currently required to download the artifacts.
44
45### macOS
46
47How to get the latest macOS development builds:
481. View the **[latest successful macOS builds](https://github.com/Warzone2100/warzone2100/actions?query=workflow%3AmacOS+branch%3Amaster+event%3Apush+is%3Asuccess)**.
492. Select the latest workflow run in the table / list.
50   This should display a list of **Artifacts** from the run.
513. Download the `warzone2100_macOS_universal` or `warzone2100_macOS_universal_novideos` artifact (depending on whether you want the full app bundle or not).
52> Note: A free GitHub account is currently required to download the artifacts.
53
54### Ubuntu
55
56How to get the latest Ubuntu development builds:
571. View the **[latest successful Ubuntu builds](https://github.com/Warzone2100/warzone2100/actions?query=workflow%3AUbuntu+branch%3Amaster+event%3Apush+is%3Asuccess)**.
582. Select the latest workflow run in the table / list.
59   This should display a list of **Artifacts** from the run.
603. Download the appropriate `warzone2100_ubuntu<version>_amd64_deb` artifact.
61   - If you are running Ubuntu 18.04: `warzone2100_ubuntu18.04_amd64_deb`
62   - If you are running Ubuntu 20.04: `warzone2100_ubuntu20.04_amd64_deb`
63> Note: A free GitHub account is currently required to download the artifacts.
644. Extract the contents of the downloaded .zip (`warzone2100_ubuntu<version>_amd64.deb`) to your Desktop.
655. Execute the following commands in Terminal:
66```
67cd ~/Desktop
68sudo apt install ./warzone2100_ubuntu<version>_amd64.deb
69```
70
71### Linux (from source)
72
73Clone this Git repo and build, following the instructions under:
74[How to Build](#how-to-build)
75
76> Development builds are a snapshot of the current state of development, from the
77> latest (successfully-built) commit. Help testing these builds is always welcomed,
78> but they should be considered a work-in-progress.
79
80Reporting bugs
81--------------
82
83This game still has bugs and if you run into one, please use the GitHub bugtracker
84(https://github.com/Warzone2100/warzone2100/issues) to report this bug. In order to faster fix
85those bugs we require that you follow these rules:
86
87   1. If the game crashes you may save a memory dump. Please do so and upload it
88      when reporting the bug. (Linux locates that file at /tmp/warzone2100.gdmp,
89      Windows at /Program Files/Warzone 2100/warzone2100.RPT, macOS by
90      clicking "Details" in the crash error message)
91      A self created backtrace is just as useful.
92   2. Give as much information about what you were doing before the crash/bug
93      occurred.
94   3. Try to reproduce the bug and add a description of the process to your bug-
95      report.
96   4. You may even upload save-games. These consist of one or two file(s) and
97      one folder. All two/three are named after your save-game (e.g.
98      MySaveGame.es, MySaveGame.gam and the folder MySaveGame).
99   5. Bug-reports are not submit-and-forget. It may be that you forgot some
100      information or forgot to upload a file. So it is, too, in your interest to
101      watch the bug-report after it has been submitted. Additionally you receive
102      e-mails of comments to your bug-report.
103
104Configuration
105-------------
106
107Warzone 2100 uses an own sub-directory in a user's home directory to save
108configuration data, save-games and certain other things. Additionally you can
109use this directory to place custom maps and mods so the game can find them. The
110location of this directory depends on the operating system.
111
112### Warzone directory under GNU/Linux
113
114Under GNU/Linux, Warzone conforms to the [XDG base directory spec](https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html).
115
116By default, the directory `warzone2100-<version>` can be found in your home-directory
117under the path `~/.local/share/`.
118(If the `XDG_DATA_HOME` environment variable is defined, the Warzone folder will
119be located within `$XDG_DATA_HOME`.)
120
121The leading dot in the `.local` part of the path indicates that it is a hidden
122directory, so depending on your configuration you may not be able to see it.
123However, you can still access it by typing the path into your address-bar.
124
125### Warzone directory under Windows
126
127The directory `Warzone 2100 Project\Warzone 2100 <version>` is located under the
128`%APPDATA%` folder.
129
130Typical `%APPDATA%` paths:
131- Windows XP: `\Documents and Settings\$USER$\Application Data`
132- Windows Vista+: `\Users\$USER$\AppData\Roaming`
133
134Hence, the default path for the Warzone configuration data on Windows Vista+ would be:
135`C:\Users\$USER$\AppData\Roaming\Warzone 2100 Project\Warzone 2100 <version>\`
136
137By default, the `%APPDATA%` folder is hidden. Entering:
138`%APPDATA%\Warzone 2100 Project\` into the address bar of Windows Explorer
139will browse to your Warzone directory.
140
141### Warzone directory under macOS
142
143The directory `Warzone 2100 <version>` can be found in your home-directory at:
144`~/Library/Application Support/`
145
146By default, recent version of macOS hide your account's Library folder. To view it in
147**Finder**, hold down the **Option (⌥)** key while clicking the **Go** menu, and your Library folder
148will appear as a menu choice.
149
150### Configuration file
151
152The configuration file is just called 'config' and contains several configuration
153options, some of them can be changed by using command-line options or using
154the in-game menus, others can only be changed by editing the file by hand.
155
156If at any point you did something wrong, you can delete the old configuration
157file and just restart Warzone 2100. Then the game will regenerate a new
158configuration file with default values.
159
160Command-line options
161--------------------
162
163Warzone 2100 can be started with different options and arguments. For a list
164of these options, run the game with the --help option.
165
166Notes: These options all have two dashes (--), not one dash only (-). Also,
167if the option has an argument, you need to separate the option and its argument
168with a '=' sign - spaces do not work.
169
170Note: Some options have corresponding entries in the configuration-file and will
171persist from one start of Warzone 2100 to the next.
172
173Multiplaying via internet
174-------------------------
175
176There are two methods to start a multiplayer-game via internet: using the host's
177IP or using the lobby-server. Make sure to be able to communicate on TCP-ports
1782100 and 9999. Note that for port forwarding, you only need to configure your
179router to forward port 2100.
180
181You can choose whether to connect via Lobby or IP:
182
183* If you choose IP, Warzone 2100 asks you for the ip-address of the host and
184  will try to connect to that IP.
185* If you choose Lobby, Warzone 2100 will connect to the lobby server, as long as
186  the lobby-server-address in your config-file has not been changed.
187
188You will see a list of games from which you can select one.
189
190You can kick unwanted players out of not-yet-started game by clicking left on
191them while holding the right mouse button.
192
193When you are hosting a game it will automatically be listed on the lobby-server.
194If you do not want your games to be listed on the lobby-server, you have to
195change the entry "masterserver_name=lobby.wz2100.net" in your config to some-
196thing invalid as "nomasterserverplease".
197
198If you then want to see the games that are listed on the lobby-server you may
199enter "lobby.wz2100.net" when prompted to enter the host's IP or change the
200entry in the config-file back. You will have to restart Warzone 2100 in order
201for config-changes to take effect.
202
203Cheats
204------
205
206Like many other games Warzone 2100 features a certain set of cheats that can be
207used to have an advantage in the singleplayer-campaign and skirmish-games, or to
208just help mod- and map-makers with testing. Cheats do not work in multiplayer,
209unless all players agree to it.
210
211Cheats are likely to contain or trigger bugs, so use with care, especially
212during campaign.
213
214### Entering cheat mode
215
216To be able cheats while in-game, press shift and backspace simultaneously.
217An on-screen message should appear telling you that cheat-mode has been enabled.
218You can disable it using the same key combination again.
219
220Pressing ctrl+o opens up the debug menu, which is useful for inspecting the
221game state, or just messing around.
222
223### Cheat commands
224
225After activating cheat-mode cheats can be entered using the normal chat-
226function. Cheats are ordered by their use and where they can be used.
227
228There are many cheat commands. Some examples:
229
230* "biffer baker" - Your units do more damage and are stronger
231* "double up" - Your units are twice as strong
232* "give all" - Allows you to build and research everything
233* "work harder" - All currently active research topics are instantly researched
234* "research all" - Everything is researched instantly
235* "let me win" - You win the current campaign mission
236* "superpower" - Gives you maximum power
237
238Modding information
239-------------------
240
241Warzone AI, maps and campaign can be scripted using javascript.
242
243Links to further information
244* [Scripting](doc/Scripting.md)
245* [Model format](doc/PIE.md)
246* [Animation](doc/Animation.md)
247
248How to build
249-------------------
250
251### Getting the Source
252
253To properly build the game, either:
254- Download a release `tar.xz`, which contains all the source code and revision information.
255
256  _OR_
257
258- Clone the Git repo:
259  ```
260  git clone https://github.com/Warzone2100/warzone2100.git
261  cd warzone2100
262  git fetch --tags
263  git submodule update --init --recursive
264  ```
265  > Note: Initializing submodules is required.
266
267Do **not** use GitHub's "Download Zip" option, as it does not contain submodules or the Git-based autorevision information.
268
269### Linux
270
271* Prerequisites
272   * Compiling tools (ex. CMake, GCC/G++/Clang, ninja-build)
273   * Archiving tools (ex. zip, p7zip)
274   * Various libraries:
275      * [SDL](https://www.libsdl.org) ≥ 2.0.5 _(strongly recommended: ≥ 2.0.8)_
276      * [PhysicsFS](https://icculus.org/physfs/) ≥ 2.0.3-3 _(strongly recommended: ≥ 3.0.2)_
277      * [libpng](https://www.libpng.org/pub/png/libpng.html) ≥ 1.2
278      * [libtheora](https://theora.org)
279      * [libvorbis](https://xiph.org/vorbis)
280      * [Freetype](https://www.freetype.org/)
281      * [Harfbuzz](https://github.com/harfbuzz/harfbuzz) ≥ 1.0
282      * [OpenAL-Soft](https://openal-soft.org)
283      * [libcurl](https://curl.haxx.se/libcurl/) _(strongly recommended: ≥ 7.58.0)_
284      * [libsodium](https://github.com/jedisct1/libsodium) ≥ 1.0.14
285      * [SQLite](https://www.sqlite.org/index.html) ≥ 3.14
286   * For language support: [Gettext](https://www.gnu.org/software/gettext/)
287   * To generate documentation: [Asciidoctor](https://asciidoctor.org) ≥ 1.5.3
288   * To build with Vulkan support: the full [Vulkan SDK](https://vulkan.lunarg.com/sdk/home) _(strongly recommended: ≥ 1.2.148.1)_
289* **Installing prerequisites:**
290   * Using `get-dependencies_linux.sh`:
291      1. Specify one of the linux distros supported by the script: (`ubuntu`, `fedora`, `alpine`, `archlinux`) _REQUIRED_
292      2. Specify a mode: (`build-all` (default), `build-dependencies`) _OPTIONAL_
293
294      Example:
295      ```
296      sudo ./get-dependencies_linux.sh ubuntu build-dependencies
297      ```
298   * Manually (Ubuntu 18.04)+:
299     ```
300     sudo apt-get -u update
301     sudo apt-get -y install git gcc g++ clang cmake libc-dev dpkg-dev ninja-build zip unzip pkg-config gettext asciidoctor
302     sudo apt-get -y install libpng-dev libsdl2-dev libopenal-dev libphysfs-dev libvorbis-dev libtheora-dev libxrandr-dev libfribidi-dev libfreetype6-dev libharfbuzz-dev libfontconfig1-dev libcurl4-gnutls-dev gnutls-dev libsodium-dev libsqlite3-dev
303     ```
304   * Manually (Fedora):
305     ```
306     sudo dnf -y update && dnf clean all
307     sudo dnf -y install git gcc gcc-c++ cmake ninja-build p7zip gettext rubygem-asciidoctor
308     sudo dnf -y install libpng-devel SDL2-devel openal-soft-devel physfs-devel libogg-devel libvorbis-devel libtheora-devel freetype-devel harfbuzz-devel libcurl-devel openssl-devel libsodium-devel sqlite-devel
309     ```
310* **Building from the command-line:**
311   1. Starting from the _parent_ directory of the warzone2100 source code (which is assumed to be in a folder named `warzone2100`), create a **sibling** build directory:
312      ```
313      mkdir build
314      ```
315   2. Change directory into the sibling `build` directory:
316      ```
317      cd build
318      ```
319   3. Run CMake configure to generate the build files:
320      ```
321      cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH=~/wz/install -GNinja ../warzone2100
322      ```
323      > - [Modify the `CMAKE_INSTALL_PREFIX` parameter value as desired](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html) to configure the base installation path.
324      > - The `../warzone2100` path at the end should point to the warzone2100 source directory.
325   4. Run CMake build:
326      ```
327      cmake --build . --target install
328      ```
329
330### Windows using MSVC
331
332* Prerequisites
333   * **Visual Studio 2019** (Visual Studio 2015-2017 may work, but 2019 is strongly encouraged)
334      - If you do not already have Visual Studio installed, you can download the free **Visual Studio Community** from: https://developer.microsoft.com/en-us/windows/downloads
335      - IMPORTANT: You need the fully-featured Visual Studio IDE. “Visual Studio Code” does not include the necessary support for building C++ Windows apps.
336   * **CMake 3.10+** (https://cmake.org/)
337   * **Git** (if not building from a release source archive)
338   * **7-Zip** (https://www.7-zip.org)
339   * **Vulkan SDK 1.2.148.1+** (https://vulkan.lunarg.com/sdk/home)
340      - Required only if you want to build with Vulkan support.
341* **Preparing to build:**
342   Build dependencies are provided via [vcpkg](https://github.com/Microsoft/vcpkg) from Microsoft.
343   * Run the `get-dependencies_win.ps1` script from powershell in order to download and build the dependencies.
344* **Building from the command-line:**
345   * Change directory to the warzone2100 repo directory
346   * Configure
347      * Visual Studio 2019: `cmake -H. -DCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake -Bbuild -G "Visual Studio 16 2019"`
348      * Visual Studio 2017: `cmake -H. -DCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake -Bbuild -G "Visual Studio 15 2017"`
349      * Visual Studio 2015: `cmake -H. -DCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake -Bbuild -G "Visual Studio 14 2015"`
350   * Build
351      * Release: `cmake --build build --config Release`
352      * Debug: `cmake --build build --config Debug`
353* **Building using Visual Studio 2019:**
354   1. Open Visual Studio 2019
355   2. Open the warzone2100 folder using **File** > **Open** > **Folder...**
356      - Allow Visual Studio some time to load the project and retrieve information from CMake.
357   3. Create a VS CMake settings JSON file using **CMake** > **Change CMake settings**. You can also reach this dialog by clicking "Manage Configurations" in the configuration dropdown in the toolbar. Make sure the CMake components in Visual Studio are installed (by running the Visual Studio Installer).
358      - This creates `CMakeSettings.json`
359   4. Add the following variables to `CMakeSettings.json`:
360      - To `cmakeCommandArgs`, add: `-DCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake`
361      - If you're running a 64-bit platform, you need to set the compilation to 32-bit by setting `inheritEnvironments` to `[ "msvc_x86_x64" ]`
362      - Note: Visual Studio automatically escapes and turns each `\` into `\\`
363   5. After letting Visual Studio re-run CMake configure with the new settings, you can build using the **CMake** menu.
364
365### macOS
366See [macosx/README.md](macosx/README.md)
367
368Licensing
369-------------------
370
371Warzone 2100 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
372
373[![SPDX-License-Identifier: GPL-2.0-or-later](https://img.shields.io/static/v1?label=SPDX-License-Identifier&message=GPL-2.0-or-later&color=blue&logo=open-source-initiative&logoColor=white&logoWidth=10&style=flat-square)](COPYING)
374
375More information: [COPYING.README](COPYING.README), [COPYING.NONGPL](COPYING.NONGPL)
376