LegendaryGuard / q3a_lms

Q3A Last Man Standing (LMS) source code by SantaClaws (1999-2000) using the last Q3A game version

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Q3A Last Man Standing source code

A Quake 3 Arena gamemode was started from the late 90s to early 2000s.

q3lms

History

Started: 1999
Ended: 2000

Last Man Standing (LMS for short) is a free for all variant of Elimination with a few minor twists.

The game is played in rounds. The goal of the game is to survive for as long as possible in each round and preferably make sure that your closest competitors don't survive for too long.

Each player begins with all weapons (ammo quantity selectable using variables), can't hurt himself with his own weapons, and there are no items in the maps. When you get fragged, you will have to wait until the end of the round.

By default Overtime (OT) is used so there can be at most 1 survivor each round.

Players might have multiple lives. If you set \g_lms_lives higher than 1, players will have more lives before they are out from each round: when someone is killed, he immediately returns in game (like in standard Free For All mode); when he runs out of lives, he will have to wait until the end of the round. You can see players' lives holding TAB key.

How to play

Begin multiplayer and select FFA or Team DeathMatch.

Gameplay cvars:

To initialize LMS gamemode:

I don't have a clear concept about this gamemode, but I'll told something: If you die, you're forced to spectate and the other players keep playing. Everytime the round ends, the player with lower health, it'll be forced to spectate.

  • g_sGameType 0 marathon.

  • g_sGameType 1 normal.

  • g_sGameType 2 round only.

  • g_sReward [0-999] reward points.

  • g_sPlayerSpeedMultiplier speed setting (a duplicated g_speed cvar? WTH, SantaClaws?).

Banned objects cvars:

Disable/enable items, ammo, weapons and/or runes for the gameplay.

  • g_sBannedItems [0-1]
  • g_sBannedAmmo [0-1]
  • g_sBannedWeapons [0-1]
  • g_sBannedRunes [0-1]

Starting values on player spawn cvars:

Put limits for weapons, health and/or armor when the player is being spawned in the game:

  • g_sStartingWeapons [0-9]
  • g_sStartingHealth [0-999]
  • g_sStartingArmor [0-999]

How to build

  • Windows:

  • Building QVM:

Execute build.bat to compile qvms, keep in mind you must be in the repository directory.

Once compiled successfully, look for pak9.pk3, copy and paste into baseq3/ or mod Q3 game directory.

  • MSYS2 (mingw) (Building dynamic libraries (.dll)):

IMPORTANT NOTE: Not tested on Windows 32-bit. MSYS2 comes with multilib disabled in gcc (means you can't compile for x86 in a 64-bit system), more info here.

To build, follow these instructions:

  1. Install msys2 from https://msys2.github.io/, following the instructions there.It doesn’t matter which version you download, just get one appropriate for your OS.

  2. Start "MSYS2 MinGW 64-bit" from the Start Menu. If you're using 32-bit system, use "MSYS2 MinGW 32-bit".

  3. Install mingw-w64-x86_64-gcc:

pacman -S mingw-w64-x86_64-gcc

32-bit:

pacman -S mingw-w64-i686-gcc
  1. Install make:
pacman -S make
  1. Compile with make
make ARCH=x86_64

32-bit:

make ARCH=x86 WINDRES="windres -F pe-i386"
  1. Find the dlls in build/release-mingw64-x86_64, for 32-bit: build/release-mingw32-x86.

If you can't compile 32-bit builds with MSYS2 MinGW, try Cygwin section.

  • Cygwin (mingw) (Building dynamic libraries (.dll)):

Detailed guide based on a post by MAN-AT-ARMS.

  1. Install Cygwin

Download the Cygwin setup package from http://cygwin.com/install.html.

Choose either the 32-bit or 64-bit environment. 32-bit will work fine on both 32 and 64 bit versions of Windows. The setup program is also your Cygwin environment updater. If you have an existing Cygwin environment, the setup program will, by default, update your existing packages.

Choose where you want to install Cygwin. The entire environment is self-contained in it's own folder, but you can also interact with files from outside the environment if you want to as well. The default install path is C:\Cygwin. Choose a mirror to download packages from, such as the kernel.org mirrors. Choose a "storage area" for your package downloads.

  1. Package selection

The next screen you see will be the package selections screen. In the upper left is a search box. This is where you will want to search for the necessary packages.

These are the package names you'll want to search for:

1- mingw64-i686-gcc-core (For building 32bit binaries)
2- mingw64-i686-gcc-g++ (Also for 32bit... C++ support... not required for the game, but useful for compiling other software)
3- mingw64-x86_64-gcc-core (For building 64bit binaries)
4- mingw64-x86_64-gcc-g++ (For 64bit, same as above)
5- make
6- bison
7- git

  • Linux:

  • Building QVM:

The alternative to execute and get the compiled qvms with build.bat requires wine package. So, in that part, needs the i386 package:

sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install wine32-development

But it could be executed without using 32-bit package, if your system supports 64-bits. Go to WineHQ page anyways.

Keep in mind, you must be in the repository directory to execute the script:

wine cmd /c build.bat

Once compiled successfully, look for pak9.pk3, copy and paste into baseq3/ or mod Q3 game directory.

NOTE: until now, there's no fully compileable QVM tool found for Linux.

  • Building shared libraries (.so):

If you don't have gcc tools, install the build-essential packages, which is also known as a meta-package, it contains the GCC compiler all the other essentials used to compile the software written in C and C++ language. Also, requires libc6-dev-i386 for x86 builds and g++-multilib and gcc-mingw-w64 for cross-compiling. More info about MinGW question in Linux here.

sudo apt-get install build-essential libc6-dev-i386 g++-multilib gcc-mingw-w64

Simply execute:

make

And find .so files in build/release-linux-x86_64, for 32-bit: build/release-linux-x86.

  • Optional:

You can execute optionally the parameters using the following ways:

  • To compile debug x86 .so builds:
make debug ARCH=x86 PLATFORM=linux # compiles debug x86 .so builds (creates "debug-linux-x86" directory inside "build")
  • To compile release x86 .dll builds:
make ARCH=x86 PLATFORM=windows # compiles release x86 .dll builds (creates "release-windows-x86" directory inside "build")

... Optionally, you can play the parameters like ARCH=x86_64 (compiles 64-bits builds), PLATFORM=windows (compiles dlls), PLATFORM=linux (compiles shared libraries (.so files)) ...


Credits

SantaClaws

About

Q3A Last Man Standing (LMS) source code by SantaClaws (1999-2000) using the last Q3A game version

License:GNU General Public License v2.0


Languages

Language:C 98.7%Language:Makefile 0.5%Language:Assembly 0.5%Language:Batchfile 0.3%