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
  • 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
  • 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
  • When you die from a falling on intel or with intel it will pick it up anyway

    When you die from a falling on intel or with intel it will pick it up anyway

    In the right hands, this can ruin the game. Used default config and Border_Hallway from repository, SpadesX (09ec0d2) compiled with GCC 12.1.1 on Fedora 36.

    This is an example of this bug:

    https://user-images.githubusercontent.com/28919772/182599899-90bba49c-fce2-4f1e-851a-b6c9ae619bcf.mp4

    opened by 000exploit 2
  • Lua plugin system

    Lua plugin system

    What about embed Lua as an optional dependency to write easy to use plugins, that can be hotplugged and hotunplugged from game? Or maybe not only Lua, but also something like mJS engine?

    opened by 000exploit 2
  • Fix for MinGW compatibility

    Fix for MinGW compatibility

    • max macro is already defined by <windows.h>, replaced by appropriate fmaxf()
    • your uint type is not defined anywhere
    • renamed log macros, because ERROR() is already present in <windows.h> or sth
    • strlcat() does not exist, replaced by windows api function
    • timespec_get() not yet? part of MinGW, replaced by equivalent C99 clock_gettime()
    opened by xtreme8000 1
  • Suggestions

    Suggestions

    Looks neat so far! Yet to try it out, but this project will absolutely propel the AoS community forward if it were to undergo a 'full-version' release.

    I've got some suggestions:

    • Either enable the Discussions feature on this repo's settings, or make a Discord server so discussion can be undergone for the project
    • A 'to-do list' and/or roadmap and/or a general indicator of progress, so people have an idea of how much is left to complete
    opened by lokka30 1
  • Refinements for documentations.

    Refinements for documentations.

    A summary:

    • The README.md was corrected & reorganized.
    • The logo & discord server(link that doesn't expire) was added in the README.md.
    • Added myself in CONTRIBUTORS.md as well as little fix ups.
    • Added CONTRIBUTING.md.
    opened by lancilloty 0
  • Sources: Introduce Version packets

    Sources: Introduce Version packets

    This commit adds the VersionRequest and VersionResponse packets, which are used to determine the client of each player.

    Thanks to DarkNeutrino for the help with the code and for helping me with the usage of git

    opened by Rakete175 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 47 Apr 25, 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 4 May 23, 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 13 Sep 7, 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 4 Jan 18, 2022
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 22 Sep 27, 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 Oct 3, 2022
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 183 Oct 4, 2022
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.1k Oct 5, 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 886 Sep 24, 2022
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 7.8k Sep 26, 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 891 Sep 28, 2022
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.1k Oct 3, 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 686 Sep 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 8.8k Sep 28, 2022
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 12k Sep 26, 2022
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.6k Oct 2, 2022
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 14.2k Sep 29, 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 Aug 16, 2022