An Ace of Spades server implementation done in C

Overview

SpadesX

What is SpadesX and why ?

TL;DR Ace of Spades server written in C (Currently in full on development and thus early Alpha) Now if you would like to know the full picture read bellow:

SpadesX is project started by 3 people. We love Ace of Spades (Mainly the open source alternative OpenSpades) but we hated the fact that the only type of server that was there for it was Python based. While thats not the worst thing in the world it did give us a lot of headaches when managing our servers. Some scripts were just too much for it to handle and it would start lagging. And in FPS game thats not ideal. So we decided why not make it in C ? And thats what we did. That is what SpadesX is. Ace of Spades server fully written in C.

Why the SpadesX name ?

Honestly we dont know. We just one day decided to brainstorm the name and decide on something that sounded cool yet still had the original naming. There we truly a lot of great names thrown around. But SpadesX was one day thrown into the mix and we just knew this is IT

OK thats all great but i want to test it. How do i test it ?????

Rather simple. Are you on Unix based system ? You are in luck.

git clone https://github.com/SpadesX/SpadesX

cd SpadesX

git submodule init && git submodule update

mkdir build && cd build

cmake ..

make -jX (Replace X with number of threads you have on your system)

Windows users will have to use WSL.

HEY DEVELOPERS I HAVE A BUG. WHERE DO I REPORT IT ?

Ok Ok calm down first of all. All we need from you is to open an Issue in this repo. Fully explaining your bug. Beware tho that it may take days or even weeks before we fix the issue. While we would love to fix issues all day (OK maybe not that actually sounds horrible) we are people too with our lives too. Just like you we have jobs or other things we have to take care of. Please remember this before you start yelling at us why we cant fix your bug fast enough. THIS IS WHY.

Comments
  • [Suggestion] Server-side weapon limits

    [Suggestion] Server-side weapon limits

    Due to the limitations of the Ace of Spades v0.75 protocol, everything calculates on client-side. In today's world with "mass" online servers, it's unacceptable to give players so much control over the game. For example, it's possible to bypass max damage value for each weapon and kill everyone with one shot, even using SMG from the other end of the map. For example OpenSpades rifle damage values for v0.75 protocol:

    https://github.com/yvt/openspades/blob/8bdaeb06c116693ef617357bfb350847bc50b8b8/Sources/Client/Weapon.cpp#L212-L216

    It's also possible to change the spread and reload speed, as well as the delay between shots:

    https://github.com/yvt/openspades/blob/8bdaeb06c116693ef617357bfb350847bc50b8b8/Sources/Client/Weapon.cpp#L223

    https://github.com/yvt/openspades/blob/8bdaeb06c116693ef617357bfb350847bc50b8b8/Sources/Client/Weapon.cpp#L207

    https://github.com/yvt/openspades/blob/8bdaeb06c116693ef617357bfb350847bc50b8b8/Sources/Client/Weapon.cpp#L204

    I'm sure it would be great to create some limits, at least the max damage for each weapon, accordingly to the OpenSpades or protocol (if defined). Vulnerability demonstration on a local SpadesX server (d812a40): (buggy, due to client-server packet processing limitations and very low delay)

    https://user-images.githubusercontent.com/28919772/182958995-807c48e0-8977-4be2-b263-e7ca4bc2fb2d.mp4

    opened by 000exploit 10
  • Players able to use ansi code and troll console

    Players able to use ansi code and troll console

    Description:

    • Any player can troll the console using ANSI Code, like: \033[2J or \033[31;5m. (Maybe can be fixed using iscntrl()?)

    How to reproduce:

    • Start the server, join and send a message with any ANSI code or just set your nickname to it.
    opened by DryByte 9
  • Port for windows

    Port for windows

    Well, it's functional and it compiles and runs perfectly and without warnings on Windows, I haven't tested it on Linux distros or on MacOS because I don't have it in my hands, but I would be grateful if someone could talk later if there was any problem compiling/running on Linux/MacOS.

    The only defect is in the console, which in Windows the escape characters are different, so the text output looks like this: image

    I'll fix this and do a PR when I can.

    opened by luizfernandonb 8
  • Add fallbacks for the config variables that can't be found in the config file

    Add fallbacks for the config variables that can't be found in the config file

    Made these changes before I found out that the config file together with map are located in the source directory, though they aren't copied to the build directory. What a dumbass!

    Anyway, I think that having a fallback for the config values is a great feature.

    Also, while rewriting config reading routines, I've found these lines of code:

    https://github.com/SpadesX/SpadesX/blob/9a5b9f10d8f13c0e0f5910f2d92d8dc8660cf304/Source/Server.c#L180-L185

    Is it supposed to read only 2 elements from the 3 element array? Or is it just me having an amount of braincells that is roughly equal to the size of said arrays?

    opened by rndtrash 6
  • The git submodule command doesn't work

    The git submodule command doesn't work

    I'm trying to configure the server on Windows but the git submodule command doesn't work, the command only brings the libmapvxl library, and nothing else

    Follow the image below: image

    opened by luizfernandonb 5
  • Bug color text

    Bug color text

    Whit this version of SpadesX (https://aos.party/jenkins/job/SpadesX/lastSuccessfulBuild/artifact/build/) when you put this symbols in your name when you enter in SpadesX your name now is Limbo. I think my name should appear ignoring those symbols because if I change the color of my name they wouldn't know which team I'm from red or blue. simbol Limbo

    And if you put in periodic_messages or welcome_messages this symbols dont apper in red like if you copy and paste in the chat that text. Messeges color

    simbols and config.zip

    opened by X-DE1 4
  • Added Maps repo to Extern.

    Added Maps repo to Extern.

    Fixes:

    • Ensures the development of multi-map support will work with the default maps out of the box.

    Changes proposed in this pull request:

    • Adding Maps repo to Extern.
    opened by lancilloty 4
  • TODO

    TODO

    • [x] - Movement in server
    • [x] - Fall damage
    • [x] - Grenades
    • [x] - Grenades player damage
    • [x] - Fix the damn ID bug
    • [x] - Implement actual gameplay (intel pickup etc.)
    • [x] - Add ban command
    • [x] - Normalize vectors to prevent speed movement hacks.
    • [x] - Floating block detection.
    • [x] - Map split sending
    • [x] - Fix invisible players on joining
    • [x] - Make players not die on new user joining (libvxl_write takes way too long to fixing causing physics to go out of sync too much making players get fall damage).
    • [x] - Grenade floating block destroying

    More to be added later.

    enhancement 
    opened by Haxk20 4
  • SpadesX does not work in NucetoSpades

    SpadesX does not work in NucetoSpades

    Describe the bug I tried to connect to a server without port forwarding using this build on 12/31/2022 (https://aos.party/jenkins/job/SpadesX/lastSuccessfulBuild/artifact/build/zip/build.zip) with this link aos://16777343 and this other aos://192.168.0.6:32887 in NucetoSpades 0.5 | v7.7.7 but it logged me out using any of the links instead OpenSpades 0.1.3 let me log in with any of the links. Im using Windows 10 Error Text (Screenshot) 1213123

    opened by X-DE1 3
  • (Feature request) Fork features from OpenSpades

    (Feature request) Fork features from OpenSpades

    OpenSpades has wonderful features from UI to graphics, why not implement some of them?

    Would be nice, because OpenSpades development is very slow, even to fix bugs/crashes.

    opened by hardBSDk 3
  • Can't get/capture intel in water

    Can't get/capture intel in water

    Description:

    • Can't get or capture the intel when tent/intel is in the water (if you not crouch on it).

    How to Reproduce:

    • Start the server using a map with water, where the intel can spawn on there. Join in the server and try to get the intel without crouching.

    Client used: Voxlap (tried to use openspades, but my os keeps dropping packets) Map used: https://aos.party/view/9

    opened by DryByte 2
  • Predictable intel and player respawn coordinates

    Predictable intel and player respawn coordinates

    Hello. Thanks for a wonderful app! Really tiny and minor security issue here.

    From what I see in your server you use C standard rand to generate random data, like coordinates for game objects: intel and player respawn points.

    As it is known, libc uses linear congruential pseudo-random number generator (PRNG) that can be easily cracked given some inputs.

    So for example when doing some of the cups on this game, one command can achieve an unfair advantage knowing where the intel will be spawned and where the players' spawnpoints will be generated - being able to plan their offensive beforehand.

    As for the proposed solution: you may use some more cryptosecure PRNG algos, for example Mersenne Twister PRNG or any other. For example you can see tiny implementation here.

    bug enhancement 
    opened by B1Z0N 1
  • Auto map rotation

    Auto map rotation

    Is your feature request related to a problem? Please describe. This probably is related to #47

    Describe the solution you'd like Adding a maps folder, then add an option to config for "auto_rotation", that will read all maps into maps folder then adding it to rotation, overwriting the currently rotation setted on config.

    Describe alternatives you've considered Using the #47 combined with the above idea.

    enhancement 
    opened by DryByte 2
  • Help wanted: Adding features documentation

    Help wanted: Adding features documentation

    Is your feature request related to a problem? Please describe. SpadesX has many features, from configurations to anti-cheating etc, but lack of documentation on what features SpadesX has will make it's use harder by the community & may hamper it's adoption.

    Describe the solution you'd like Adding documentation of the features SpadesX has & how to use them when they allow for customization or such.

    Describe alternatives you've considered We could decide not to document the features but then people wouldn't know what SpadesX can do & they wouldn't want to use it.

    Additional context Looking at previous commits & issues as well as PRs might help find the features SpadesX has.

    documentation enhancement good first issue help wanted 
    opened by lancilloty 1
  • Help wanted: Water damage

    Help wanted: Water damage

    Is your feature request related to a problem? Please describe. Many maps are designed with water damage in mind but right now SpadesX doesn't support it, which makes those maps, well, problematic.

    Describe the solution you'd like It would be nice to add a water damage option in the map configurations allowing sysadmins to active it for specific maps & specify the inflicted damage in the map configurations.

    Describe alternatives you've considered We could simply not add this but many maps would then be problematic since their designs are based around this feature & even some gamemodes require this feature.

    Additional context This is probably a good first issue for a first time contributor since it's relatively easy to implement.

    enhancement 
    opened by lancilloty 1
  • Help wanted: Install, Update & Build scripts

    Help wanted: Install, Update & Build scripts

    Is your feature request related to a problem? Please describe. People often have to manually build the software, update it & install it which requires a lot of manual commands. For less technical people or those that are more lazy, this can be cumbersome & eat up a lot of time.

    Describe the solution you'd like It would be ideal to add the following scripts to help automated standard "workflows" that people have to do:

    • [ ] Install script
    • [ ] Build script
    • [x] ~~Update script~~

    Describe alternatives you've considered Running the commands manually is an option or making rudimentary script too, but properly made scripts would ensure an easier learning curve when it comes to using SpadesX.

    Additional context @Haxk20 Pointed out that he wanted properly built scripts for this in PR #25 .

    enhancement 
    opened by lancilloty 1
  • Help wanted: Support for Maps repo

    Help wanted: Support for Maps repo

    Is your feature request related to a problem? Please describe. We currently only support an array of maps hardcoded in the configuration & have 1 map located in the configuration of SpadesX. However most people running a server will want to avoid modifying the configuration to enter 100+ maps in it, so it would be preferable to add support for the Maps repo which was created to solve this issue: https://github.com/SpadesX/Maps .

    Describe the solution you'd like Adding support for the Maps repo & linking the repo in the SpadesX repo so maps are no longer kept in the main repository of SpadesX but rather referenced and managed in another.

    Describe alternatives you've considered We could keep maps in the current repo, but this would clutter it & centralize the software too much.

    Additional context The Maps repo was created in advance expecting this in the future.

    enhancement 
    opened by lancilloty 0
Owner
null
LAppS - Lua Application Server for micro-services with default communication over WebSockets. The fastest and most vertically scalable WebSockets server implementation ever. Low latency C++ <-> Lua stack roundtrip.

LAppS - Lua Application Server This is an attempt to provide very easy to use Lua Application Server working over WebSockets protocol (RFC 6455). LApp

null 48 Oct 13, 2022
Windows named pipe server that forwards connections to given TCP server

PipeTcp An asynchronous Windows named pipe server that forwards connections to given TCP server. Pre-built binaries can be found in Releases. Invocati

Jinoh Kang 5 Nov 3, 2022
A project designed for the esp8266 D1 Mini or the esp8266 D1 Mini PRO to provide a wifi http server and dns server.

PS4 Server 9.00 This is a project designed for the esp8266 D1 Mini or the esp8266 D1 Mini PRO to provide a wifi http server and dns server. this is fo

null 14 Nov 28, 2022
A language server protocol implementation

A barebone LSP implementation Starting point for server implementations of the LSP protocol. Provides the infrastructure to easily hook in functionali

Henner Zeller 5 Jan 7, 2023
A Tcp/Ip stack implementation on top of Solarflare ef_vi, and a C++ headers only framework for tcp multiplexing client/server.

Efvitcp Efvitcp is a tcp library using Solarflare ef_vi interface on linux, and also a tcp multiplexing framework for both C++ client and server progr

Meng Rao 23 Nov 26, 2022
mvfst is a client and server implementation of IETF QUIC protocol in C++ by Facebook.

mvfst (Pronounced move fast) is a client and server implementation of IETF QUIC protocol in C++ by Facebook.

Meta Incubator 1.2k Jan 8, 2023
an easy implementation of a multi-process tcp server and a multi-thread tcp client

一个TCP多进程服务器-多线程客户端的简单实现。 客户端类似Apache ab的测试功能,能够通过向某一个ip端口发送指定并发量和总数量的tcp短连接;服务端处理tcp短连接,每来一条消息就打印一条log。 使用cmake编译,建议在vscode里编译,或者命令行 # 终端进入目录 mkdir bu

adin 1 Nov 28, 2021
Cmake-language-server - CMake LSP Implementation

cmake-language-server CMake LSP Implementation. Alpha Stage, work in progress. Features Builtin command completion Documentation for commands and vari

Regen 198 Jan 9, 2023
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.

Welcome! The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design

Microsoft 7.2k Dec 30, 2022
Cross-platform, efficient, customizable, and robust asynchronous HTTP/WebSocket server C++14 library with the right balance between performance and ease of use

What Is RESTinio? RESTinio is a header-only C++14 library that gives you an embedded HTTP/Websocket server. It is based on standalone version of ASIO

Stiffstream 924 Jan 6, 2023
A C++ header-only HTTP/HTTPS server and client library

cpp-httplib A C++11 single-file header-only cross platform HTTP/HTTPS library. It's extremely easy to setup. Just include the httplib.h file in your c

null 8.3k Dec 31, 2022
Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution

CppServer Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and

Ivan Shynkarenka 958 Jan 3, 2023
H2O - the optimized HTTP/1, HTTP/2, HTTP/3 server

H2O - an optimized HTTP server with support for HTTP/1.x, HTTP/2 and HTTP/3 (experimental) Copyright (c) 2014-2019 DeNA Co., Ltd., Kazuho Oku, Tatsuhi

H2O 10.2k Dec 30, 2022
C++ library for creating an embedded Rest HTTP server (and more)

The libhttpserver reference manual Tl;dr libhttpserver is a C++ library for building high performance RESTful web servers. libhttpserver is built upon

Sebastiano Merlino 711 Dec 27, 2022
Mongoose Embedded Web Server Library - a multi-protocol embedded networking library with TCP/UDP, HTTP, WebSocket, MQTT built-in protocols, async DNS resolver, and non-blocking API.

Mongoose - Embedded Web Server / Embedded Networking Library Mongoose is a networking library for C/C++. It implements event-driven non-blocking APIs

Cesanta Software 9k Jan 1, 2023
Event-driven network library for multi-threaded Linux server in C++11

Muduo is a multithreaded C++ network library based on the reactor pattern. http://github.com/chenshuo/muduo Copyright (c) 2010, Shuo Chen. All righ

Shuo Chen 12.4k Jan 1, 2023
A collection of C++ HTTP libraries including an easy to use HTTP server.

Proxygen: Facebook's C++ HTTP Libraries This project comprises the core C++ HTTP abstractions used at Facebook. Internally, it is used as the basis fo

Facebook 7.7k Jan 4, 2023
Simple, secure & standards compliant web server for the most demanding of applications

Simple, secure[1] & standards compliant[2] web server for the most demanding[3] of applications. Read more... ?? Optimized security Being meticulously

uNetworking AB 15k Dec 30, 2022
WAFer is a C language-based software platform for scalable server-side and networking applications. Think node.js for C programmers.

WAFer WAFer is a C language-based ultra-light scalable server-side web applications framework. Think node.js for C programmers. Because it's written i

Riolet Corporation 693 Dec 6, 2022