Skip to content

WIP, not completed. Bid For Power source code replica. A legendary 90s era Quake 3 Arena mod.

License

Notifications You must be signed in to change notification settings

LegendaryGuard/BFP

Repository files navigation

Bid For Power (BFP) source code

A legendary 90s era Quake 3 Arena mod.

bfpq3logo

WARNING! UNDER CONSTRUCTION!

Table of contents

  1. TODO list
  2. History
  3. About the repository
  4. References and clues to know how should be the game
  5. How to build

5.1. Introduction
5.2. Windows

5.1.1. Building QVM (using .bat)
5.1.2. Building QVM (mingw)
5.1.3. MSYS2 (mingw) (Building dynamic libraries (.dll))
5.1.4. Cygwin (mingw) (Building dynamic libraries (.dll))

5.3. Linux

5.3.1. Building QVM (make)
5.3.2. Building QVM (using .bat)
5.3.3. Building shared libraries (.so)

5.4. Optional

  1. Notes
  2. License
  3. Credits

TODO list:

  • Toggeable flight (bind key). Hint: FLIGHT POWERUP
  • Gauntlet logic must be replaced as a bind key, it will use fight animation (using kicks and fists)
  • Remove weapon visuals (models and stuff)
  • Animations as listed on the old docs
  • Bind key to recover ki energy
  • Bind key to toggle speed (ki boost). HINT: HASTE POWERUP
  • Replace ammo to ki energy stamina
  • Third person traceable crosshair
  • Make ki energy regeneration, ki use, attacks, charging balance indicated on old docs
  • Powerlevel and Power Tiers indicated on old docs
  • Hit Stun (makes player can't use ki, melee, block and charge)
  • Power Struggles (when two beam attacks collide)
  • Blocking (consumes ki energy, transfers all damage to ki instead of health, deflect missile attacks, more info on old docs)
  • Short-Range Teleport (when pressing 2 times left or right)
  • Transformations (related to Power Tiers)
  • Attacksets (configurable for cfgs)
  • Skin Config File (explosionModel, explosionShader, missileRotation, missileShader, ... look old docs about that. "Custom plugin models")
  • Playable third person mode and first person vis mode (add the options in the UI Setup menu)
  • Cvars as described on old docs
  • Survival gametype (g_gametype 3)
  • Oozaru gametype (g_gametype 4)
  • Last Man Standing gametype (g_gametype 6)
  • 6 different selectable characters, each with 5 attacks (can be referenced to some previous tasks)
  • 21 different ki attacks including controllable, homing, and chargeable attacks (no guns) (can be referenced to some previous tasks)

History

BFP_ZEQ2_history

Started: 1999
Ended: 2002

Bid For Power is a total conversion for QuakeIII that plays nothing like the original game. Players take control of Ki-powered superheros and battle it out in a mostly aerial fight. The game is highlighted by the work of a great art team and an original style, and the gameplay is extremely fast paced. It can be difficult to keep up with until you get the hang of it.

The source code was lost, but the assets and some docs are in any place.

Old dev journals (1999 - 2002)

Click here to see the Old Yrgol dev journal (Markdown edition)

Click here to see the Old Rodney Olmos dev journal (Markdown edition)

Click here to see the Old PyroFragger dev journal (Markdown edition)

About the repository

We're making a replica of the lost source code.
The highest priority goal is copying and recreating completely BFP game logical structure.
Any fixes, improvements and contributions are welcome. But we can't accept secondary things and other stuff that don't reach the goals.

References and clues to know how should be the game

Documentations, references and extracted stuff will give us clues to reach the goals.


We can see a cvar, e.g. g_plKillBonusPct, which means we need to find the function that rewards the player and do something with that. Something like this:

if ( killedSomeone ) {
   pl = currentPL + (currentPL * g_plKillBonusPct.value);
}

Click on some image to see it complete.

  • How should the HUD be:

hud_display


  • When player receives a hit stun (g_hitStun 1):

hit_stun_received


  • When player is being ready to shot (holding a key):

ready_to_attack


  • cfg files:

A sample inside models/players/player_name/default.cfg:

Server config:

Attacksets:

Weapon settings:

BFP config (general binding and some client stuff, unused. WARNING: when executing, game crashes):

Other q3 config:

How to build

Introduction

IMPORTANT NOTE TO THE DEVELOPMENT: all source code files should be UTF-8 without BOM and Unix (LF), otherwise, it will cause compiler errors when using MakefileQVM (most likely, syntax error will be displayed).

  • .map file is a linker map file, which is generated by the linker when it links together multiple object files into an executable or shared library. It contains information about the symbols (such as functions and variables) defined in each object file, as well as their addresses in the final executable or library. The information in the map file can be useful for debugging and performance analysis. For example, it can help you identify which functions are taking the most time to execute, or which functions are being called from which parts of the code.

  • The external JTS (Jump Target Segment) (.jts) files are used to improve the bytecode generation in the Quake 3 engine. The JTS file contains information about jump targets that are used by the VM (Virtual Machine) to execute the bytecode. It helps to avoid bugs, improve performance and it can be beneficial for better stability. JTS files are obtained compiling from q3asm, which can generate 1.32c-compatible QVMs along with the external JTS file.

  • Windows:

    • Building QVM (using .bat):

    1. Keep in mind you must be in the repository directory. Execute build.bat to compile qvms.

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

    Alternatively, in build.bat, you can set NO_MAP=0 to obtain .map files, you can see them in binaries and intermediate directories.

    You can set NO_JTS=1, if you don't want to obtain .jts files inside pk3 file.

    • Building QVM (mingw):

    Note: that also uses 7z tool to compress them in a pk3 file.

    1. If you're using MSYS2 and you didn't install the prerequisites, follow the steps (from step 1 to step 4) on MSYS2 (mingw) section.

    If you're using Cygwin and you didn't install the prerequisites, follow the steps (from step 1 to step 2) on Cygwin (mingw) section.

    1. Keep in mind you must be in the repository directory. To compile qvms, execute:
    make -f MakefileQVM
    1. Once compiled successfully, look for pak9.pk3, copy and paste into baseq3/ or mod Q3 game directory. You can look vm/ where you can see the objects and compiled files.

    Alternatively, you can execute:

    make -f MakefileQVM NO_JTS=1

    If you don't want to obtain .jts files inside pk3 file.

    Clean the compiled objects with:

    make -f MakefileQVM clean
    • 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. Go to the directory where you cloned the repository and 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

    1. Open Cygwin, go to the directory where you cloned the repository and compile with make
  • Linux:

    • Building QVM (make):

    Note: that uses 7z tool to compress them in a pk3 file. If you don't have 7z tool, install with:

    sudo apt-get install p7zip-full
    1. If you didn't install the prerequisites, follow the step 1 on Building shared libraries (.so).

    2. Keep in mind you must be in the repository directory. To compile qvms, execute:

    make -f MakefileQVM
    1. Once compiled successfully, look for pak9.pk3, copy and paste into baseq3/ or mod Q3 game directory. You can look vm/ where you can see the objects and compiled files.

    Alternatively, you can execute:

    make -f MakefileQVM NO_JTS=1

    If you don't want to obtain .jts files inside pk3 file.

    Clean the compiled objects with:

    make -f MakefileQVM clean
    • Building QVM (using .bat):

    1. 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.

    1. Keep in mind, you must be in the repository directory to execute the script:
    wine cmd /c build.bat
    1. Once compiled successfully, look for pak9.pk3, copy and paste into baseq3/ or mod Q3 game directory.
    • Building shared libraries (.so):

    1. 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
    1. Simply execute (-j4 is the number of parallel jobs you want to run during the compilation, in that case is set to 4):
    make -j4
    1. And find .so files in build/release-linux-x86_64, for 32-bit: build/release-linux-x86.

  • Optional:

    You can use the optional part, if you followed and used some of these sections:

    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)) ...


Notes

IMPORTANT NOTE: This repository was initialized from https://github.com/marconett/q3a.

Added source code files:

  • cg_cvar.h
  • g_cvar.h
  • ui_cvar.h
  • ui_bfpoptions.c
  • ui_mem.c
  • ui_mp3decoder.c
  • ui_mp3decoder.h

Removed source code files from the build tools:

  • ui_cinematics.c
  • ui_mods.c
  • ui_playersettings.c
  • ui_splevel.c
  • ui_sppostgame.c
  • ui_spskill.c

Unused source code files and unavailable in the build tools:

  • cg_particles.c
  • ui_rankings.c
  • ui_rankstatus.c
  • ui_signup.c
  • ui_specifyleague.c
  • ui_spreset.c

License

The mod source code is GPLv3 licensed, the source code contents are based on Quake III Arena which is GPLv2 licensed.

The ancient abandoned MP3 decoder (ui_mem.c, ui_mem.h, ui_mp3decoder.c and ui_mp3decoder.h) is based on code from various contributors:

  • Copyright (C) 1993 Sun Microsystems
  • Copyright (C) 1995-1997 Michael Hipp
  • Copyright (C) 1999 Aaron Holtzman
  • Copyright (C) 2000-2001 Tim Angus

Credits

Bid For Power is made by these staff members. We don't own materials such as art designs, maps and character models from their assets.

Bid For Power Staff Members

Ansel
Skin Artist

Anthony
2D Artist

Chris
Founder

Dash
Level Designer / Texture Artist

Disco Stu
Web Designer

Gangsta Poodle
Level Designer

Kit Carson
Level Designer / Texture Artist

NilreMK
Modeler / Animator

Number17
Sound Engineer

Pyrofragger
Modeler / Animator

Remisser
Sound / Music Engineer

Rodney
Modeler / Animator

Yngwie
Level Designer / Texture Artist

Yrgol
Project Lead, Lead Programmer

::Additional Assistance::
Mooky, Perfect Chaos, Dakota, Bardock, DethAyngel, Ebola, Badhead, $onik, Gigatron, Timex & Nat.

About

WIP, not completed. Bid For Power source code replica. A legendary 90s era Quake 3 Arena mod.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages