Coder Social home page Coder Social logo

axblk / teeworlds Goto Github PK

View Code? Open in Web Editor NEW

This project forked from teeworlds/teeworlds

11.0 5.0 2.0 113.06 MB

A retro multiplayer shooter

Home Page: http://teeworlds.com

License: Other

Lua 1.35% C++ 83.44% C 6.31% Shell 0.01% Objective-C 0.33% Python 5.73% Batchfile 0.01% CMake 2.73% Objective-C++ 0.11%

teeworlds'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.

teeworlds's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

pcjones ljnic

teeworlds's Issues

Client-side ui for race

  • Times in scoreboard
  • Map record
  • Replace kill-messages in top right corner with finish-messages
  • Rank browser (replacement for /top5)
  • Rank search (replacement for /rank)
  • More accurate timer and checkpoints?

Auto demo recording for race

The server should tell the client when the race starts and ends so that the client can capture more accurate race demos.

New race tiles

  • Teleport checkpoints
  • Hookthrough
  • Multi-direction stoppers
  • ...

Compatibility with DDNet map format

The race server should use the DDNet format for teleporters, speedups and settings, so no additional custom client is required for mapping.

Race client

Collection of race client related issues:

#16
#22
#23
#27

Editor:
#17
#18

Minor:
#24
#25
#26

This should be merged into some other client because I'm not really interested in supporting my own custom client.

Build Instructions

looking through the branches, I found that the master branch is quite outdated. The race Branch looks like the one I need to build, for the most recent race modded version(?).

Are the build instructions the same as for the original game (except the repository url ofc)?
Edit: yes it worked, the url could be changed in the README to make it easy for Users, copy pasting the commands.

Is this building a modded server as well or only the client side?
Edit: looks like yes

Is it possible to build only the server binary without the graphical dependencies on a headless device?

Race: tees get stuck after entering teleports

Forwarding this report.

Teleports are broken. Some tees get stuck after entering them. I've observed it on servers with more than one player. At first I thought it was only because the exit TP was very close to collision tiles and this is certainly true to some extent, but sometimes it can also teleport you to anywhere on the map even though the exit isn't occupied and was placed in a big open area - which is very weird.

TeeSlayer at https://www.teeworlds.com/forum/viewtopic.php?pid=122471#p122471

Any clue what could cause this? I haven't investigated, but I'll update if I find something.

Edit: this could be a bug introduced by player collision, which the teleport system could be counting on. In which case, it's on my side :) In fact, pure races don't seem to run into the issue.

Edit2:

so if a tee is moving exactly X+3 and Y+3 from the tp out (assuming 4th quandrant) and is standing on top of a collision tile, the tp out is moving to his location causing the other tee to get stuck

So it is indeed a player collision thing. I didn't understand the issue much yet, not sure if it should be fixed in race too.

Multiple teleport destinations

In DDRace this is useful for load balancing. Should be implemented in a predictable way.
In Race always the first destination should be used. Random things do not belong in Race.

Client-side race prediction

The server should tell the client which prediction features to enable.
This should not depend on the gametype string like in 0.6!

teerace: check if all 10 necessary server settings are within the map

This is for cheat prevention!

This check should only be done if the scoreing is set to "web". It should check if the following commands are within the map (values after the command are the values which should be set if one command is missing):

sv_regen 0
sv_strip 1
sv_inifinite_ammo 0
sv_no_items 1
sv_teleport 0
sv_teleport_grenade 0
sv_teleport_vel_reset 1
sv_delete_grenades_after_death 1
sv_rocket_jump_damage 1
sv_pickup_respawn 0

If one setting is missing it should print a warning to debug log and set the value so it is least likely that the time get better for it. The values after the command should be set if the command is missing in the map as I already pointed out.

Team-based race

See #28

  • Select team (chat + client ui)
  • Team scoring
  • Show teams in scoreboard
  • Hide other teams
  • No collision with other teams
  • ...

Всем русским сообществом ожидаем антипинг.

Разработчик мне так лень переводить тебе то , что я сейчас буду писать. Мы уже довольно долго ждем хороший антипинг. Не только мы русские но и йорданцы и другие пользователи с пингом выше 60. В чем проблема взять открытый код антипинга из DDnet и просто ctr+c и ctr+v в твой код? Он же идеально работает и получше чем тот который создал ты. Просто сделай так как я написал выше пока делаешь новую "улучшенную" версию. Благодарю за прочтения Ваш Fallet лучший игрок в TeeWar

no-weapons maps needed for initial start

When a no-weapons FastCap server starts up for the first time, since it doesn't have no-weapons maps under the maps directory, the server cannot be started. For example, I set this in the configs:

sv_map ctf2-no-weapons

Since ctf2-no-weapons doesn't exist, the server refuses to boot.

Test mode for race

  • Setting map-settings via rcon
  • Teleporting players
  • Separate or non-persistent scoring database

Map update overhaul

This tiny tool could be a lot more powerful.
Some features I'm thinking about:

  • Up- and Downgrading maps
  • Two modes: embed tilesets or update tile indices
  • Compatibility mode: embed tilesets and use 0.6 tile-layer format, so bother versions can use the map
  • Support DDNet map extensions (#15)
  • Maybe: use some more extensible format as output (UUID based)
  • Maybe: web version for easy usage

Ghosts for race

The server should tell the client when the race starts and ends so that the client can capture more accurate ghosts.

Can't compile map_update tool with bam

D:\Work\teeworlds\teeworlds-race>bam conf=release tools
[1/2] [1] c++ src/tools/map_update.cpp
In file included from src/tools/map_update.cpp:7:0:
src/tools/map/map.h:442:11: error: redeclaration of 'MOD_NONE'
  MOD_NONE=0,
           ^
src/tools/map/map.h:59:2: note: previous declaration '<anonymous enum> MOD_NONE'

  MOD_NONE = 0,
  ^~~~~~~~
src/tools/map/map.h:443:2: error: redeclaration of 'MOD_RACE'
  MOD_RACE
  ^~~~~~~~
src/tools/map/map.h:60:2: note: previous declaration '<anonymous enum> MOD_RACE'

  MOD_RACE
  ^~~~~~~~
src/tools/map/map.h:448:12: error: redefinition of 'int gs_ModifyIndexDeletedInd
ex'
 static int gs_ModifyIndexDeletedIndex;
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/tools/map/map.h:65:12: note: 'int gs_ModifyIndexDeletedIndex' previously dec
lared here
 static int gs_ModifyIndexDeletedIndex;
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/tools/map/map.h: In function 'void ModifyIndexDeleted(int*)':
src/tools/map/map.h:449:13: error: redefinition of 'void ModifyIndexDeleted(int*
)'
 static void ModifyIndexDeleted(int *pIndex)
             ^~~~~~~~~~~~~~~~~~
src/tools/map/map.h:66:13: note: 'void ModifyIndexDeleted(int*)' previously defi
ned here
 static void ModifyIndexDeleted(int *pIndex)
             ^~~~~~~~~~~~~~~~~~
src/tools/map/map.h: At global scope:
src/tools/map/map.h:462:24: error: redeclaration of 'TILEFLAG_EX_INVISIBLE'
  TILEFLAG_EX_INVISIBLE=1,
                        ^
src/tools/map/map.h:79:2: note: previous declaration '<anonymous enum> TILEFLAG_
EX_INVISIBLE'
  TILEFLAG_EX_INVISIBLE = 1,
  ^~~~~~~~~~~~~~~~~~~~~
src/tools/map/map.h:463:24: error: redeclaration of 'TILEFLAG_EX_ONE_COLOR'
  TILEFLAG_EX_ONE_COLOR=2,
                        ^
src/tools/map/map.h:80:2: note: previous declaration '<anonymous enum> TILEFLAG_
EX_ONE_COLOR'
  TILEFLAG_EX_ONE_COLOR = 2,
  ^~~~~~~~~~~~~~~~~~~~~
src/tools/map/map.h:465:18: error: redeclaration of 'MAX_SKIP'
  MAX_SKIP=(1<<8)-1
                  ^
src/tools/map/map.h:82:2: note: previous declaration '<anonymous enum> MAX_SKIP'

  MAX_SKIP = (1 << 8) - 1
  ^~~~~~~~
src/tools/map/map.h:468:8: error: redefinition of 'struct CEntity'
 struct CEntity
        ^~~~~~~
src/tools/map/map.h:85:8: error: previous definition of 'struct CEntity'
 struct CEntity
        ^~~~~~~
src/tools/map/map.h:474:7: error: redefinition of 'class CEnvelope'
 class CEnvelope
       ^~~~~~~~~
src/tools/map/map.h:91:7: error: previous definition of 'class CEnvelope'
 class CEnvelope
       ^~~~~~~~~
src/tools/map/map.h:568:7: error: redefinition of 'class CLayer'
 class CLayer
       ^~~~~~
src/tools/map/map.h:185:7: error: previous definition of 'class CLayer'
 class CLayer
       ^~~~~~
src/tools/map/map.h:600:7: error: redefinition of 'class CLayerGroup'
 class CLayerGroup
       ^~~~~~~~~~~
src/tools/map/map.h:217:7: error: previous definition of 'class CLayerGroup'
 class CLayerGroup
       ^~~~~~~~~~~
src/tools/map/map.h:657:7: error: redefinition of 'class CEditorImage'
 class CEditorImage : public CImageInfo
       ^~~~~~~~~~~~
src/tools/map/map.h:274:7: error: previous definition of 'class CEditorImage'
 class CEditorImage : public CImageInfo
       ^~~~~~~~~~~~
src/tools/map/map.h:683:7: error: redefinition of 'class CEditorMap'
 class CEditorMap
       ^~~~~~~~~~
src/tools/map/map.h:300:7: error: previous definition of 'class CEditorMap'
 class CEditorMap
       ^~~~~~~~~~
src/tools/map/map.h:772:7: error: redefinition of 'class CLayerTiles'
 class CLayerTiles : public CLayer
       ^~~~~~~~~~~
src/tools/map/map.h:389:7: error: previous definition of 'class CLayerTiles'
 class CLayerTiles : public CLayer
       ^~~~~~~~~~~
src/tools/map/map.h:799:7: error: redefinition of 'class CLayerQuads'
 class CLayerQuads : public CLayer
       ^~~~~~~~~~~
src/tools/map/map.h:416:7: error: previous definition of 'class CLayerQuads'
 class CLayerQuads : public CLayer
       ^~~~~~~~~~~
src/tools/map/map.h:816:7: error: redefinition of 'class CLayerGame'
 class CLayerGame : public CLayerTiles
       ^~~~~~~~~~
src/tools/map/map.h:433:7: error: previous definition of 'class CLayerGame'
 class CLayerGame : public CLayerTiles
       ^~~~~~~~~~
src/tools/map/map.h:941:43: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aDesertMainShadowIndicesOld),
                                           ^
src/tools/map/map.h:964:42: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aGrassMainShadowIndicesOld),
                                          ^
src/tools/map/map.h:977:43: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aJungleMainShadowIndicesOld),
                                           ^
src/tools/map/map.h:987:39: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aGrassDoodadsIndicesOld),
                                       ^
src/tools/map/map.h:988:39: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aGrassDoodadsIndicesDel),
                                       ^
src/tools/map/map.h:997:37: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aWinterMainIndicesOld),
                                     ^
src/tools/map/map.h:998:37: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aWinterMainIndicesDel),
                                     ^
src/tools/map/map.h:1008:37: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aDesertMainIndicesDel),
                                     ^
src/tools/map/map.h:1009:35: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aDesertMainMoveData),
                                   ^
src/tools/map/map.h:1018:44: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aGenericUnhookableIndicesDel),
                                            ^
src/tools/map/map.h:1028:36: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aGrassMainIndicesDel),
                                    ^
src/tools/map/map.h:1029:34: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aGrassMainMoveData),
                                  ^
src/tools/map/map.h:1039:35: error: 'ARRAY_SIZE' was not declared in this scope
   ARRAY_SIZE(s_aJungleMainMoveData),
                                   ^
src/tools/map_update.cpp: In function 'void UpdateLayer(CLayerGroup*, CLayerTile
s*, const CTilesetUpdateData*)':
src/tools/map_update.cpp:84:62: error: cannot convert 'const CTilesetMoveData' t
o 'const CTilesetMoveData*' in initialization
             const CTilesetMoveData *pMoveData = pUpdateData->m_pMoveData;
                                                              ^~~~~~~~~~~
src/tools/map_update.cpp:118:66: error: cannot convert 'const CTilesetMoveData'
to 'const CTilesetMoveData*' in initialization
                 const CTilesetMoveData *pMoveData = pUpdateData->m_pMoveData;
                                                                  ^~~~~~~~~~~
src/tools/map_update.cpp: In function 'void UpdateMap(CEditorMap*)':
src/tools/map_update.cpp:154:66: error: 'ARRAY_SIZE' was not declared in this sc
ope
         for(int Index = 0; Index < ARRAY_SIZE(s_TilesetUpdateData); Index++)
                                                                  ^
src/tools/map_update.cpp: In function 'int main(int, const char**)':
src/tools/map_update.cpp:219:5: warning: this 'if' clause does not guard... [-Wm
isleading-indentation]
     if(!Map.Save(s_pStorage, argv[2]))
     ^~
src/tools/map_update.cpp:222:2: note: ...this statement, but the latter is misle
adingly indented as if it is guarded by the 'if'
  return 0;
  ^~~~~~
In file included from src/tools/map_update.cpp:7:0:
src/tools/map/map.h: At global scope:
src/tools/map/map.h:843:20: warning: 's_aImageNames' defined but not used [-Wunu
sed-variable]
 static const char *s_aImageNames[] = {
                    ^~~~~~~~~~~~~
src/tools/map/map.h:449:13: warning: 'void ModifyIndexDeleted(int*)' defined but
 not used [-Wunused-function]
 static void ModifyIndexDeleted(int *pIndex)
             ^~~~~~~~~~~~~~~~~~
bam: 'c++ src/tools/map_update.cpp' error 1
bam: error: a build step failed

Usage documentation

Add some simple instructions how to use the mod, how to configure the scoring backend and how to create or update maps.

Bug: New record: -X second(s) better

For some reason people get this message. More information in the chat logs.

[5c39ff87][chat]: *** Win10 finished in: 10 minute(s) 43.507 second(s)
[5c39ff87][chat]: *** New record: -445.105 second(s) better
[5c39ff87][chat]: *** KeseBrod finished in: 11 minute(s) 14.778 second(s)
[5c39ff87][chat]: *** New record: -867.432 second(s) better
[5c39ff90][game]: pickup player='11:Win10' item=4
[5c39ff95][game]: pickup player='9:KeseBrod' item=4
[5c39ff95][game]: pickup player='11:Win10' item=2
[5c39ff9b][chat]: *** 11. Win10 Time: 10 minute(s) 43.507 second(s) (SP | Someone)
[5c39ff9c][server]: ClientID=12 rcon='teleport 12 11'
[5c39ffa4][server]: player is ready. ClientID=4 addr=<IP_ADDRESS>:63651
[5c39ffa4][server]: player has entered the game. ClientID=4 addr=<IP_ADDRESS>:63651
[5c39ffa4][game]: team_join player='4:coer76' team=0
[5c39ffa5][game]: pickup player='12:TeeSlayer' item=4
[5c39ffad][chat]: 7:1:Puchy: Zargon: MY BOY
[5c39ffaf][game]: pickup player='12:TeeSlayer' item=2
[5c39ffb2][game]: pickup player='9:KeseBrod' item=2
[5c39ffb3][chat]: 6:1:Zargon: Puchy:
[5c39ffb5][chat]: 6:1:Zargon: where are you
[5c39ffb8][chat]: 11:1:Win10: xD
[5c39ffbb][chat]: 14:1:SP | Someone: TeeSlayer: -445 seconds better sounds like it should be worse
[5c3a006c][chat]: 14:1:SP | Someone: i dont have a rank
[5c3a0097][chat]: 14:1:SP | Someone: TeeSlayer: i saw Win10 finish and it said -445 seconds better
[5c3a00a4][chat]: 14:1:SP | Someone: i think it shouldnt have -

Pausing a race

Useful for DDRace. In Race it should only be available if it is activated in the map settings.

Status of antiping

Hello,

Thanks for working on prediction for 0.7!
Could you please tell me whether the code for prediction on antiping branch is any different from the one you pushed into teeworlds/teeworlds? Should it be more advanced prediction than what's now found upstream?

Also, what are your plans with regard to the antiping? Are you still planning to work on it?
I could help working on it if needed, but I am not familiar with how it is typically implemented.

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.