Skip to content

Latest commit

 

History

History
98 lines (70 loc) · 6.88 KB

README_en.md

File metadata and controls

98 lines (70 loc) · 6.88 KB

Burg'war GB flag

Iconic Burgwar burger

Burg'war is a food-themed 2D multiplayer platform game where you play as a hamburger fighting against other hamburgers using weapons such as Emmentalibur, Tomace, Potato Thrower, and many more!

In fact, behind this seemingly simple game is a sandbox game (in the same way as Garry's Mod), the whole gameplay part of the game is programmed in Lua and is open to modification. So you're free to modify the game, add your weapons, your way of playing, your assets and launch a server! The game handles all the stuff to make people play following the rules of your creativity!

How to play?

Download the latest release to play should suffice, you can also download the map editor to make your own maps.

How to compile?

Burg'War is compiled using XMake, a build tool system which will download and compile all dependencies it won't find on your computer, except for Qt which you will need to install yourself if you wish to compile the map editor.

Warning, because of a current limitation of XMake, compilation will fail is Qt is nowhere to be found on your computer, even if you don't compile the map editor.
As a temporary fix, delete all lignes from xmake.lua following the line target("BurgWarMapEditor") if you wish not to use it and don't have Qt.
This will be improved in a future XMake version.

If you are under Linux, Burg'War uses an older version of Nazara which doesn't use XMake. Although XMake will build the engine for you it, it requires some system dependencies and may fail if they are missing:

  • With apt: sudo apt-get install libopenal-dev libsndfile1-dev libfreetype6-dev libsdl2-dev libxcb-cursor-dev libxcb-ewmh-dev libxcb-keysyms1-dev libx11-dev mesa-common-dev libgl1-mesa-dev libassimp-dev
  • With pacman: sudo pacman -S openal libsndfile freetype2 libxcb libx11 sdl2 mesa assimp
  • With portage: sudo emerge media-libs/assimp media-libs/mesa media-libs/libsdl2 x11-libs/libX11 x11-libs/libxcb media-libs/freetype media-libs/libsndfile media-libs/openal

Once Burg'War moves to the latest version of Nazara (which uses XMake), this won't be necessary.

Once XMake is installed (note that you can also download a portable version of XMake if you wish not to install it), you'll need to run xmake config --mode=releasedbg in the project folder (you can also use --mode=debug if you wish to build a debug version of the game).

XMake will try to find all the project dependencies on your computer and ask you to install the missing ones (except for Qt).

Compile using command-line (first method)

Once you're ready to compile the game itself, run xmake (or xmake -jX if you wish not to use all your computer threads, with X being the number of threads you wish to use) and watch the game compile.

Generate a project (second method)

XMake can also generate a project file for another tool:

  • Visual Studio: xmake project -k vsxmake
  • CMakeLists.txt (which you can open in CLion and more): xmake project -k cmake
  • Makefile: xmake project -k make
  • Ninja: xmake project -k ninja
  • XCode: xmake project -k xcode

You should now be able to the project file with the tool of your choice.

Run the game

Once the compilation finished, you should have the game binaries in the bin/<config> folder (where <config> is your platform/arch/mode, for example: windows_x64_debug).

Now, copy the clientconfig.lua, editorconfig.lua and serverconfig.lua files next to your Burg'War executables. You'll also need the game assets which you can download from the releases.

Beware, by default configurations files specifies directories next to the executables, which is probably not what you want for developing. You can update configurations files to tell the executables to fetch assets/mods/scripts at the repository root. In order to do that, update the Resources section of your configuration files, for example:

Resources = {
	AssetDirectory = "../../assets",
	ModDirectory = "../../mods",
	ScriptDirectory  = "../../scripts"
}

You should now be able to run the game using XMake, by running xmake run <target> (replace <target> by the executable name you wish to run, for example xmake run BurgWar will run the game binary).

Note: you need to use xmake run to run the game because of the dependencies installed by XMake which wouldn't be found otherwise, you can use xmake install -o installed to have XMake copy all necessary files in the installed/bin folder.

Run the docker image for the server

You need only few steps to build and run BurgWar server image:

  • git clone the repository
  • Build image with docker build --tag burgwar-server:latest .
  • Run server:
docker run -ti --rm --name=burgwar-server -p 14768:14768/udp \
 -v /relativeOrAbsolute/path/to/assets:/srv/assets/ \
 -v /relativeOrAbsolute/path/to/mods:/srv/mods/ \
 -v /relativeOrAbsolute/path/to/scripts:/srv/scripts/ \
 -v /absolute/path/to/serverconfig.lua:/srv/serverconfig.lua \
 burgwar-server:latest

Warning: If you are using Docker Desktop on Windows, you should execute this command under a WSL console. Executing with Git bash for example won't work.

What technologies are used by Burg'War?

The technologies behind Burg'War are :

  • concurrentqueue : a lock-free queue used to send and receive messages from the network threads
  • cURL : used by the client to download assets from a HTTP(S) server
  • cxxopts : used by maptool to parse commandline parameters
  • fmt : a well-known C++ formatting library used by the logging system
  • hopscotch-map : a fast hashmap based on hopscotch hashing
  • Nazara Engine : my own game engine, which handles rendering, audio, physics and more
  • nlohmann_json : a simple and powerful JSon parser for C++
  • Qt : a very famous C++ framework to make GUI
  • sol : C++ <=> Lua interface, very fast and handy
  • tl_expected : A Result-like class for C++
  • tl_function_ref : A lambda or function reference (more efficient than std::function when you don't need to store functions)
  • XMake : a very powerful build and dependency system which compiles the project and download missing dependencies, which is why you don't need to care about this list to build the game!