Code Monkey home page Code Monkey logo

documentation's Introduction

Packaging status

Teeworlds GitHub Actions

A retro multiplayer shooter

Teeworlds is a free online multiplayer game, available for all major operating systems. Battle with up to 16 players in a variety of game modes, including Team Deathmatch and Capture The Flag. You can even design your own maps!

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. See license.txt for full license text including copyright information.

Please visit https://www.teeworlds.com/ for up-to-date information about the game, including new versions, custom maps and much more.

Originally written by Magnus Auvinen.


Teeworlds supports two build systems: CMake and bam.

Building on Linux or macOS (CMake)

Installing dependencies

# Debian/Ubuntu
sudo apt install build-essential cmake git libfreetype6-dev libsdl2-dev libpnglite-dev libwavpack-dev python3

# Fedora
sudo dnf install @development-tools cmake gcc-c++ git freetype-devel pnglite-devel python3 SDL2-devel wavpack-devel

# Arch Linux (doesn't have pnglite in its repositories)
sudo pacman -S --needed base-devel cmake freetype2 git python sdl2 wavpack

# macOS
brew install cmake freetype sdl2

Downloading repository

git clone https://github.com/teeworlds/teeworlds --recurse-submodules
cd teeworlds

# If you already cloned the repository before, use:
# git submodule update --init

Building

mkdir -p build
cd build
cmake ..
make

On subsequent builds, you only have to repeat the make step.

You can then run the client with ./teeworlds and the server with ./teeworlds_srv.

Build options

The following options can be passed to the cmake .. command line (between the cmake and ..) in the "Building" step above.

-GNinja: Use the Ninja build system instead of Make. This automatically parallelizes the build and is generally faster. (Needs sudo apt install ninja-build on Debian, sudo dnf install ninja-build on Fedora, and sudo pacman -S --needed ninja on Arch Linux.)

-DDEV=ON: Enable debug mode and disable some release mechanics. This leads to faster builds.

-DCLIENT=OFF: Disable generation of the client target. Can be useful on headless servers which don't have graphics libraries like SDL2 installed.

Building on Linux or macOS (bam)

Installing dependencies

# Debian/Ubuntu 19.10+
sudo apt install bam git libfreetype6-dev libsdl2-dev libpnglite-dev libwavpack-dev python3

# Fedora
sudo dnf install bam gcc-c++ git freetype-devel pnglite-devel python3 SDL2-devel wavpack-devel

# Arch Linux (doesn't have pnglite in its repositories)
sudo pacman -S --needed base-devel bam freetype2 git python sdl2 wavpack

# macOS
brew install bam freetype sdl2

# other (add bam to your path)
git clone https://github.com/teeworlds/bam
cd bam
./make_unix.sh

Downloading repository

git clone https://github.com/teeworlds/teeworlds --recurse-submodules
cd teeworlds

# If you already cloned the repository before, use:
# git submodule update --init

Building

bam

The compiled game is located in a sub-folder of build. You can run the client from there with ./teeworlds and the server with ./teeworlds_srv.

Build options

One of the following targets can be added to the bam command line: game (default), server, client, content, masterserver, tools.

The following options can also be added.

conf=release to build in release mode (defaults to conf=debug).

arch=x86 or arch=x86_64 to force select an architecture.

Building on Windows with Visual Studio & CMake

Download and install some version of Microsoft Visual Studio (as of writing, MSVS Community 2019) with the following components:

  • Desktop development with C++ (on the main page)
  • Python development (on the main page)
  • Git for Windows (in Individual Components → Code tools)

Run Visual Studio. Open the Team Explorer (View → Team Explorer, Ctrl+^, Ctrl+M). Click Clone (in the Team Explorer, Connect → Local Git Repositories). Enter https://github.com/teeworlds/teeworlds into the first input box. Wait for the download to complete (terminals might pop up).

Wait until the CMake configuration is done (watch the Output windows at the bottom).

Select teeworlds.exe in the Select Startup Item… combobox next to the green arrow. Wait for the compilation to finish.

For subsequent builds you only have to click the button with the green arrow again.

Building on Windows with MSVC build tools & bam

Download and install Microsoft C++ Build Tools and Python.

Download and unzip Teeworlds stable sources or Teeworlds latest sources.

Download and unzip bam to teeworlds-version\bam.

Run the x64 Native Tools Command Prompt (or x86 for 32-bit) from the start menu.

# Navigate to the Teeworlds source directory
cd ...\teeworlds-version

# Build bam (use make_win32_msvc.bat for 32-bit)
cd bam
make_win64_msvc.bat
copy bam ..
cd ..

# Build Teeworlds
bam conf=release

Use conf=debug to build the debug version instead. You can also provide a target after the bam command : game (default), server, client, content, masterserver, tools.

Building on Windows with MinGW & CMake

Download and install MinGW with at least the following components:

  • mingw-developer-toolkit-bin
  • mingw32-base-bin
  • mingw32-gcc-g++-bin
  • msys-base-bin

Also install Git (for downloading the source code), Python and CMake.

Open CMake ("CMake (cmake-gui)" in the start menu). Click "Browse Source" (first line) and select the directory with the Teeworlds source code. Next, click "Browse Build" and create a subdirectory for the build (e.g. called "build"). Then click "Configure". Select "MinGW Makefiles" as the generator and click "Finish". Wait a bit (until the progress bar is full). Then click "Generate".

You can now build Teeworlds by executing mingw32-make in the build directory.

documentation's People

Contributors

chillerdragon avatar cinaera avatar dune-jr avatar fisico avatar mbi010 avatar minus7 avatar oy avatar phistep avatar richrd avatar robyt3 avatar sonix- avatar tardo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

documentation's Issues

Port CMake doc

CMake doc should be on the website
Bam doc should be on the README fixed on the teeworlds/teeworlds repo

Too many people come forward thinking we only support X (or no longer maintain Y) because they read it from one place

Documentation for demo recording and player

Documentation on how to record demos and use the demo player should probably go in a new file.

Explain demo recording:

  • Add add_demomarker command to lists of commands. Also explain that this has to be used during recording, not playback.

Explain the controls and hotkeys of the demo player:

  • Esc: show/hide the demo player menu
  • Ctrl: show/hide the seek bar
  • Space: pause/resume playback
  • +/-: increase/decrease playback speed
  • Left/Right: skip backwards/forwards 5 seconds
  • Shift+Left/Right: skip backwards/forwards 30 seconds
  • Ctrl+Left/Right: skip to the previous/next demo marker (or the beginning/end of the demo if no more markers)

Feel free to copy from the above.

Remove SDL and FreeType download instructions for Windows

I don't think they should be left in the doc?

Do the .dll get copied now or does it have to be done manually? Also, the paths are wrong here:

To start your compiled game, you need SDL2.dll and freetype.dll. Copy them from teeworlds-version\other\sdl\lib\x64 and teeworlds-version\other\freetype\win64 into teeworlds-version\build\x64.

Proposal: Rearrange docs, make them more visible

I haven't figured where the docs were located for most of my stay on the forum. I once saw it linked somewhere but never could find it back. This is because the link to the actual documentation index is buried in "Support".

Here is a proposal.

What it would look like:
image

I believe it would be much more visible that way, more people would be aware of the existence of site docs, and there would still be the "search the FAQ first" message.

PS: header levels need to be adjusted

cl_cpu_throttle not documented

as a result of a discord conversation, it seems that the command argument passed as integer is a millisecond value and not a boolean 0/1 one.
the passed milliseconds are waited before starting another loop iteration, reducing fanspin of laptops.

Compiling on mac with SDL2

Yet this issue is only a suggestion to extend the actual tutorial for compiling teeworlds on macOS.

It says:

Download libsdl from the http://libsdl.org and put SDL.framework in /Library/Frameworks

But this step is not enough. You should add that (if you are using homebrew) that you can install the other sdl requirements using brew install sdl2 and also tell that SDL2 is required for teeworlds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.