Giter Site home page Giter Site logo

openarena / engine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ioquake/ioq3

209.0 33.0 50.0 58.25 MB

OpenArena modifications to the ioquake3 engine

Home Page: http://openarena.ws

License: GNU General Public License v2.0

Makefile 0.46% C 97.70% Assembly 0.26% Objective-C 0.10% MATLAB 0.01% GLSL 0.48% HTML 0.39% Shell 0.22% NSIS 0.07% Yacc 0.02% Roff 0.12% Perl 0.05% Rich Text Format 0.01% CMake 0.11% VBScript 0.01% AMPL 0.01%

engine's Introduction

OpenArena Engine Build Status

This project is a fork of ioquake3 with OpenArena specific changes to the client and server.

Building

This a standard ioquake3 build which they describe here

It's not an autotools based build. If you don't have the dependencies, it will break in the middle of the build.

If you are on Ubuntu or Debian, the easiest way to compile this is to install the build dependencies for the "ioquake3" package.

$ sudo aptitude build-dep ioquake3
$ sudo apt-get install libsdl1.2-dev libxmp-dev
$ git clone https://github.com/OpenArena/engine.git
$ cd engine
$ make

You may want to change a few things in Makefile.local. Other than installing the build dependencies, you shouldn't need to do anything else. By default it builds a modular renderer so you need the binary + *.so or *.dll files in the same directory to run it.

Development

# Get this project or sign up on github and fork it
$ git clone https://github.com/OpenArena/engine.git
$ cd engine

# Create a reference to the upstream project
$ git remote add upstream https://github.com/ioquake/ioq3.git

# View changes in this project compared to ioquake3
$ git fetch upstream
$ git diff upstream/master

Switching renderers

Recent ioquake3 versions allow for a modular renderer. This allows you to select the renderer at runtime rather than compiling in one into the binary.

This feature is enabled by default. If you wish to disable it, uncomment USE_RENDERER_DLOPEN=0 in Makefile.local. With ioquake3, this embeds the opengl1 renderer. In OpenArena, it embeds the openarena1 renderer.

When you start OpenArena, you can pass the name of the dynamic library to load. ioquake3 assumes a naming convention renderer_*_.

Example:

# Enable the default OpenArena renderer with GLSL, bloom support and more.
# This is based on the renderergl1 code.
$ ./openarena.x86_64 +set cl_renderer openarena1

# Enable the default ioquake3 renderer (renderergl1).
# If you are having trouble with OA's renderer, this is a safe alternative.
$ ./openarena.x86_64 +set cl_renderer opengl1

# Enable renderergl2 which is now in upstream
# It doesn't work with OpenArena yet
$ ./openarena.x86_64 +set cl_renderer opengl2

TODO

  • Wait for ioquake3 to add/reject vorbis so we can fix Windows builds
    • Cross compiling on Windows works in experimental/latest-libraries branch
  • Wait for ioquake3 to add/reject latest curl
    • Required to fix build problems on Windows for some users
    • Also in the experimental/latest-libraries branch
  • Verify that allowing say/say_team to bypass Cmd_Args_Sanitize is safe.
  • Try to avoid changing qcommon area to support GLSL. Canete's renderergl2 didn't need this change so this renderer shouldn't either.
  • Build in FreeBSD and Mac OS X
  • Remove compiler warnings. I kept them in for now so the code would be as close as possible to 0.8.8.
  • Potential GLSL debugging fix that was made available after 0.8.8 release
    • Need to find a link to this. Is this real?
  • Fix Ogg Vorbis music looping hitching bug.
  • Software rendering module based on TinyGL, optimized for performance.
  • Direct3D7 rendering module. 7 particularly, for compatibility with more legacy graphics chipsets and underperforming onboard video chipsets without a good OpenGL driver.
  • Restore Win9X support (Regressions are in PSAPI and the TCP stack)
  • Restore the use of the WGL_3DFX_gamma_control extension

Status

  • Initial testing on Debian and Windows
  • Need help testing on other platforms
  • Need help testing the SDL2 branch since ioquake3 is moving to SDL2
    • sdl2 branch is considered finished in ioquake3 so it is a good base
    • See experimental/latest-libraries-sdl2 branch in this repository to test with OpenArena.

Changes from 0.8.8 release

  • Sync with upstream so openarena.i386 uses the OA 0.8.8 renderer, openarena_opengl2.i386 uses Canete's opengl2 and openarena_opengl1.i386 uses the default renderer. (plus minor updates).
  • OA's renderer is now in renderer_oa and the base ioquake3 renderer is left untouched
  • This does not remove the game or cgame files. They are never referenced or built. This makes it easier to keep in sync with upstream. It would also be possible to integrate the OA engine and OA game code at some point in the future.
  • Makefile has fewer changes since the recent upstream Makefile makes it easier to support standalone games
  • cl_yawspeed and cl_pitchspeed are CVAR_CHEAT instead of removing the variables and using a constant.
  • r_aviMotionJpegQuality was left untouched
  • Enables STANDALONE so the CD key and authorize server related changes are no longer needed.
  • Enables LEGACY_PROTOCOL and sets the version to 71.
  • This uses a different GAMENAME_FOR_MASTER than 0.8.8. It also uses the new HEARTBEAT_FOR_MASTER name since the code says to leave it unless you have a good reason.
  • Any trivial whitespace changes were left out

renderer_oa changes

  • Widescreen horizontal expansion support
  • Paletted texturing support, for the few older cards that support the paletted texture extensions (3dfx)
  • Many changes to the flares code - sun flares, support for custom flare shaders, a lower quality flare option (huge framerate jump on oa_pvomit), additional lens reflection effects, configurable lens reflection types for dynamic lights, sun or map lights
  • Brightness by blended quad, allowing overbrights to work in a window without the need for a fragment shader
  • More postprocessing effects, including a multipass shader effect for simulating the looks of a popular 1996 3d card
  • Slowness feature to simulate the rough speed of a typical 6th generation computer setup by default (common 1998 computers), potentially useful for content producers looking to optimize their stuff

client changes

  • Module player for music as an alternative to streams (.mod, .it, .xm and .s3m formats). Uses the libxmp library.

ioquake3 README

               ,---------------------------------------.
               |   _                     _       ____  |
               |  (_)___  __ _ _  _ __ _| |_____|__ /  |
               |  | / _ \/ _` | || / _` | / / -_)|_ \  |
               |  |_\___/\__, |\_,_\__,_|_\_\___|___/  |
               |            |_|                        |
               |                                       |
               `---------- http://ioquake3.org --------'

The intent of this project is to provide a baseline Quake 3 which may be used for further development and baseq3 fun. Some of the major features currently implemented are:

  • SDL backend
  • OpenAL sound API support (multiple speaker support and better sound quality)
  • Full x86_64 support on Linux
  • VoIP support, both in-game and external support through Mumble.
  • MinGW compilation support on Windows and cross compilation support on Linux
  • AVI video capture of demos
  • Much improved console autocompletion
  • Persistent console history
  • Colorized terminal output
  • Optional Ogg Vorbis support
  • Much improved QVM tools
  • Support for various esoteric operating systems
  • cl_guid support
  • HTTP/FTP download redirection (using cURL)
  • Multiuser support on Windows systems (user specific game data is stored in "%APPDATA%\Quake3")
  • PNG support
  • Many, many bug fixes

The map editor and associated compiling tools are not included. We suggest you use a modern copy from http://icculus.org/gtkradiant/.

The original id software readme that accompanied the Q3 source release has been renamed to id-readme.txt so as to prevent confusion. Please refer to the web-site for updated status.

Compilation and installation

For *nix

  1. Change to the directory containing this readme.
  2. Run 'make'.

For Windows,

  1. Please refer to the excellent instructions here: http://wiki.ioquake3.org/Building_ioquake3

For Mac OS X, building a Universal Binary

  1. Install MacOSX SDK packages from XCode. For maximum compatibility, install MacOSX10.4u.sdk and MacOSX10.3.9.sdk, and MacOSX10.2.8.sdk.
  2. Change to the directory containing this README file.
  3. Run './make-macosx-ub.sh'
  4. Copy the resulting ioquake3.app in /build/release-darwin-ub to your /Applications/ioquake3 folder.

Installation, for *nix

  1. Set the COPYDIR variable in the shell to be where you installed Quake 3 to. By default it will be /usr/local/games/quake3 if you haven't set it. This is the path as used by the original Linux Q3 installer and subsequent point releases.
  2. Run 'make copyfiles'.

It is also possible to cross compile for Windows under *nix using MinGW. Your distribution may have mingw32 packages available. On debian/Ubuntu, you need to install 'mingw-w64'. Thereafter cross compiling is simply a case running 'PLATFORM=mingw32 ARCH=x86 make' in place of 'make'. ARCH may also be set to x86_64.

The following variables may be set, either on the command line or in Makefile.local:

  CFLAGS             - use this for custom CFLAGS
  V                  - set to show cc command line when building
  DEFAULT_BASEDIR    - extra path to search for baseq3 and such
  BUILD_SERVER       - build the 'ioq3ded' server binary
  BUILD_CLIENT       - build the 'ioquake3' client binary
  BUILD_BASEGAME     - build the 'baseq3' binaries
  BUILD_MISSIONPACK  - build the 'missionpack' binaries
  BUILD_GAME_SO      - build the game shared libraries
  BUILD_GAME_QVM     - build the game qvms
  BUILD_STANDALONE   - build binaries suited for stand-alone games
  SERVERBIN          - rename 'ioq3ded' server binary
  CLIENTBIN          - rename 'ioquake3' client binary
  BASEGAME           - rename 'baseq3'
  BASEGAME_CFLAGS    - custom CFLAGS for basegame
  MISSIONPACK        - rename 'missionpack'
  MISSIONPACK_CFLAGS - custom CFLAGS for missionpack (default '-DMISSIONPACK')
  USE_OPENAL         - use OpenAL where available
  USE_OPENAL_DLOPEN  - link with OpenAL at runtime
  USE_CURL           - use libcurl for http/ftp download support
  USE_CURL_DLOPEN    - link with libcurl at runtime
  USE_CODEC_VORBIS   - enable Ogg Vorbis support
  USE_CODEC_OPUS     - enable Ogg Opus support
  USE_CODEC_XMP      - enable libxmp support for Module player
  USE_MUMBLE         - enable Mumble support
  USE_VOIP           - enable built-in VoIP support
  USE_INTERNAL_SPEEX - build internal speex library instead of dynamically
                       linking against system libspeex
  USE_FREETYPE       - enable FreeType support for rendering fonts
  USE_INTERNAL_ZLIB  - build and link against internal zlib
  USE_INTERNAL_JPEG  - build and link against internal JPEG library
  USE_INTERNAL_OGG   - build and link against internal ogg library
  USE_INTERNAL_OPUS  - build and link against internal opus/opusfile libraries
  USE_LOCAL_HEADERS  - use headers local to ioq3 instead of system ones
  DEBUG_CFLAGS       - C compiler flags to use for building debug version
  COPYDIR            - the target installation directory
  TEMPDIR            - specify user defined directory for temp files

The defaults for these variables differ depending on the target platform.

Console

New cvars

  cl_autoRecordDemo                 - record a new demo on each map change
  cl_aviFrameRate                   - the framerate to use when capturing video
  cl_aviMotionJpeg                  - use the mjpeg codec when capturing video
  cl_guidServerUniq                 - makes cl_guid unique for each server
  cl_cURLLib                        - filename of cURL library to load
  cl_consoleKeys                    - space delimited list of key names or
                                      characters that toggle the console
  cl_mouseAccelStyle                - Set to 1 for QuakeLive mouse acceleration
                                      behaviour, 0 for standard q3
  cl_mouseAccelOffset               - Tuning the acceleration curve, see below

  in_joystickUseAnalog              - Do not translate joystick axis events
                                      to keyboard commands

  j_forward                         - Joystick analogue to m_forward,
                                      for forward movement speed/direction.
  j_side                            - Joystick analogue to m_side,
                                      for side movement speed/direction.
  j_up                              - Joystick up movement speed/direction.
  j_pitch                           - Joystick analogue to m_pitch,
                                      for pitch rotation speed/direction.
  j_yaw                             - Joystick analogue to m_yaw,
                                      for yaw rotation speed/direction.
  j_forward_axis                    - Selects which joystick axis
                                      controls forward/back.
  j_side_axis                       - Selects which joystick axis
                                      controls left/right.
  j_up_axis                         - Selects which joystick axis
                                      controls up/down.
  j_pitch_axis                      - Selects which joystick axis
                                      controls pitch.
  j_yaw_axis                        - Selects which joystick axis
                                      controls yaw.

  s_useOpenAL                       - use the OpenAL sound backend if available
  s_alPrecache                      - cache OpenAL sounds before use
  s_alGain                          - the value of AL_GAIN for each source
  s_alSources                       - the total number of sources (memory) to
                                      allocate
  s_alDopplerFactor                 - the value passed to alDopplerFactor
  s_alDopplerSpeed                  - the value passed to alDopplerVelocity
  s_alMinDistance                   - the value of AL_REFERENCE_DISTANCE for
                                      each source
  s_alMaxDistance                   - the maximum distance before sounds start
                                      to become inaudible.
  s_alRolloff                       - the value of AL_ROLLOFF_FACTOR for each
                                      source
  s_alGraceDistance                 - after having passed MaxDistance, length
                                      until sounds are completely inaudible
  s_alDriver                        - which OpenAL library to use
  s_alDevice                        - which OpenAL device to use
  s_alAvailableDevices              - list of available OpenAL devices
  s_alInputDevice                   - which OpenAL input device to use
  s_alAvailableInputDevices         - list of available OpenAL input devices
  s_sdlBits                         - SDL bit resolution
  s_sdlSpeed                        - SDL sample rate
  s_sdlChannels                     - SDL number of channels
  s_sdlDevSamps                     - SDL DMA buffer size override
  s_sdlMixSamps                     - SDL mix buffer size override
  s_backend                         - read only, indicates the current sound
                                      backend
  s_muteWhenMinimized               - mute sound when minimized
  s_muteWhenUnfocused               - mute sound when window is unfocused
  sv_dlRate                         - bandwidth allotted to PK3 file downloads
                                      via UDP, in kbyte/s

  com_ansiColor                     - enable use of ANSI escape codes in the tty
  com_altivec                       - enable use of altivec on PowerPC systems
  com_standalone (read only)        - If set to 1, quake3 is running in
                                      standalone mode
  com_basegame                      - Use a different base than baseq3. If no
                                      original Quake3 or TeamArena pak files
                                      are found, this will enable running in
                                      standalone mode
  com_homepath                      - Specify name that is to be appended to the
                                      home path
  com_legacyprotocol                - Specify protocol version number for
                                      legacy Quake3 1.32c protocol, see
                                      "Network protocols" section below
                                      (startup only)
  com_maxfpsUnfocused               - Maximum frames per second when unfocused
  com_maxfpsMinimized               - Maximum frames per second when minimized
  com_busyWait                      - Will use a busy loop to wait for rendering
                                      next frame when set to non-zero value
  com_pipefile                      - Specify filename to create a named pipe 
                                      through which other processes can control
                                      the server while it is running. 
                                      Nonfunctional on Windows.
  com_gamename                      - Gamename sent to master server in
                                      getservers[Ext] query and infoResponse
                                      "gamename" infostring value. Also used
                                      for filtering local network games.
  com_protocol                      - Specify protocol version number for
                                      current ioquake3 protocol, see
                                      "Network protocols" section below
                                      (startup only)

  in_joystickNo                     - select which joystick to use
  in_availableJoysticks             - list of available Joysticks
  in_keyboardDebug                  - print keyboard debug info

  sv_dlURL                          - the base of the HTTP or FTP site that
                                      holds custom pk3 files for your server
  sv_banFile                        - Name of the file that is used for storing
                                      the server bans

  net_ip6                           - IPv6 address to bind to
  net_port6                         - port to bind to using the ipv6 address
  net_enabled                       - enable networking, bitmask. Add up
                                      number for option to enable it:
                                      enable ipv4 networking:    1
                                      enable ipv6 networking:    2
                                      prioritise ipv6 over ipv4: 4
                                      disable multicast support: 8
  net_mcast6addr                    - multicast address to use for scanning for
                                      ipv6 servers on the local network
  net_mcastiface                    - outgoing interface to use for scan

  r_allowResize                     - make window resizable (SDL only)
  r_ext_texture_filter_anisotropic  - anisotropic texture filtering
  r_zProj                           - distance of observer camera to projection
                                      plane in quake3 standard units
  r_greyscale                       - desaturate textures, useful for anaglyph,
                                      supports values in the range of 0 to 1
  r_stereoEnabled                   - enable stereo rendering for techniques
                                      like shutter glasses (untested)
  r_anaglyphMode                    - Enable rendering of anaglyph images
                                      red-cyan glasses:    1
                                      red-blue:            2
                                      red-green:           3
                                      green-magenta:       4
                                      To swap the colors for left and right eye
                                      just add 4 to the value for the wanted
                                      color combination. For red-blue and
                                      red-green you probably want to enable
                                      r_greyscale
  r_stereoSeparation                - Control eye separation. Resulting
                                      separation is r_zProj divided by this
                                      value in quake3 standard units.
                                      See also
                                      http://wiki.ioquake3.org/Stereo_Rendering
                                      for more information
  r_marksOnTriangleMeshes           - Support impact marks on md3 models, MOD
                                      developers should increase the mark
                                      triangle limits in cg_marks.c if they
                                      intend to use this.
  r_sdlDriver                       - read only, indicates the SDL driver
                                      backend being used
  r_noborder                        - Remove window decoration from window
                                      managers, like borders and titlebar.
  r_screenshotJpegQuality           - Controls quality of jpeg screenshots
                                      captured using screenshotJPEG
  r_aviMotionJpegQuality            - Controls quality of video capture when
                                      cl_aviMotionJpeg is enabled
  r_mode -2                         - This new video mode automatically uses the
                                      desktop resolution.

New commands

  video [filename]        - start video capture (use with demo command)
  stopvideo               - stop video capture
  stopmusic               - stop background music
  minimize                - Minimize the game and show desktop
  togglemenu              - causes escape key event for opening/closing menu, or
                            going to a previous menu. works in binds, even in UI

  print                   - print out the contents of a cvar
  unset                   - unset a user created cvar

  banaddr <range>         - ban an ip address range from joining a game on this
                            server, valid <range> is either playernum or CIDR
                            notation address range.
  exceptaddr <range>      - exempt an ip address range from a ban.
  bandel <range>          - delete ban (either range or ban number)
  exceptdel <range>       - delete exception (either range or exception number)
  listbans                - list all currently active bans and exceptions
  rehashbans              - reload the banlist from serverbans.dat
  flushbans               - delete all bans

  net_restart             - restart network subsystem to change latched settings
  game_restart <fs_game>  - Switch to another mod

  which <filename/path>   - print out the path on disk to a loaded item

  execq <filename>        - quiet exec command, doesn't print "execing file.cfg"

  kicknum <client number> - kick a client by number, same as clientkick command
  kickall                 - kick all clients, similar to "kick all" (but kicks
                            everyone even if someone is named "all")
  kickbots                - kick all bots, similar to "kick allbots" (but kicks
                            all bots even if someone is named "allbots")

  tell <client num> <msg> - send message to a single client (new to server)

README for Users

Using shared libraries instead of qvm

To force Q3 to use shared libraries instead of qvms run it with the following parameters: +set sv_pure 0 +set vm_cgame 0 +set vm_game 0 +set vm_ui 0

Using Demo Data Files

Copy demoq3/pak0.pk3 from the demo installer to your baseq3 directory. The qvm files in this pak0.pk3 will not work, so you have to use the native shared libraries or qvms from this project. To use the new qvms, they must be put into a pk3 file. A pk3 file is just a zip file, so any compression tool that can create such files will work. The shared libraries should already be in the correct place. Use the instructions above to use them.

Please bear in mind that you will not be able to play online using the demo data, nor is it something that we like to spend much time maintaining or supporting.

Help! Ioquake3 won't give me an fps of X anymore when setting com_maxfps!

Ioquake3 now uses the select() system call to wait for the rendering of the next frame when com_maxfps was hit. This will improve your CPU load considerably in these cases. However, not all systems may support a granularity for its timing functions that is required to perform this waiting correctly. For instance, ioquake3 tells select() to wait 2 milliseconds, but really it can only wait for a multiple of 5ms, i.e. 5, 10, 15, 20... ms. In this case you can always revert back to the old behaviour by setting the cvar com_busyWait to 1.

Using HTTP/FTP Download Support (Server)

You can enable redirected downloads on your server even if it's not an ioquake3 server. You simply need to use the 'sets' command to put the sv_dlURL cvar into your SERVERINFO string and ensure sv_allowDownloads is set to 1

sv_dlURL is the base of the URL that contains your custom .pk3 files the client will append both fs_game and the filename to the end of this value. For example, if you have sv_dlURL set to "http://ioquake3.org", fs_game is "baseq3", and the client is missing "test.pk3", it will attempt to download from the URL "http://ioquake3.org/baseq3/test.pk3"

sv_allowDownload's value is now a bitmask made up of the following flags:

  • 1 - ENABLE
  • 4 - do not use UDP downloads
  • 8 - do not ask the client to disconnect when using HTTP/FTP

Server operators who are concerned about potential "leeching" from their HTTP servers from other ioquake3 servers can make use of the HTTP_REFERER that ioquake3 sets which is "ioQ3://{SERVER_IP}:{SERVER_PORT}". For, example, Apache's mod_rewrite can restrict access based on HTTP_REFERER.

On a sidenote, downloading via UDP has been improved and yields higher data rates now. You can configure the maximum bandwidth for UDP downloads via the cvar sv_dlRate. Due to system-specific limits the download rate is capped at about 1 Mbyte/s per client, so curl downloading may still be faster.

Using HTTP/FTP Download Support (Client)

Simply setting cl_allowDownload to 1 will enable HTTP/FTP downloads assuming ioquake3 was compiled with USE_CURL=1 (the default). like sv_allowDownload, cl_allowDownload also uses a bitmask value supporting the following flags:

  • 1 - ENABLE
  • 2 - do not use HTTP/FTP downloads
  • 4 - do not use UDP downloads

When ioquake3 is built with USE_CURL_DLOPEN=1 (default on some platforms), it will use the value of the cvar cl_cURLLib as the filename of the cURL library to dynamically load.

Multiuser Support on Windows systems

On Windows, all user specific files such as autogenerated configuration, demos, videos, screenshots, and autodownloaded pk3s are now saved in a directory specific to the user who is running ioquake3.

On NT-based such as Windows XP, this is usually a directory named:

C:\Documents and Settings\%USERNAME%\Application Data\Quake3\

Windows 95, Windows 98, and Windows ME will use a directory like:

C:\Windows\Application Data\Quake3

in single-user mode, or:

C:\Windows\Profiles\%USERNAME%\Application Data\Quake3

if multiple logins have been enabled.

In order to access this directory more easily, the installer may create a Shortcut which has its target set to:

%APPDATA%\Quake3\

This Shortcut would work for all users on the system regardless of the locale settings. Unfortunately, this environment variable is only present on Windows NT based systems.

You can revert to the old single-user behaviour by setting the fs_homepath cvar to the directory where ioquake3 is installed. For example:

ioquake3.exe +set fs_homepath "c:\ioquake3"

Note that this cvar MUST be set as a command line parameter.

SDL Keyboard Differences

ioquake3 clients have different keyboard behaviour compared to the original Quake3 clients.

  • "Caps Lock" and "Num Lock" can not be used as normal binds since they do not send a KEYUP event until the key is pressed again.

  • SDL > 1.2.9 does not support disabling dead key recognition. In order to send dead key characters (e.g. ~, ', `, and ^), you must key a Space (or sometimes the same character again) after the character to send it on many international keyboard layouts.

  • The SDL client supports many more keys than the original Quake3 client. For example the keys: "Windows", "SysReq", "ScrollLock", and "Break". For non-US keyboards, all of the so called "World" keys are now supported as well as F13, F14, F15, and the country-specific mode/meta keys.

On many international layouts the default console toggle keys are also dead keys, meaning that dropping the console potentially results in unintentionally initiating the keying of a dead key. Furthermore SDL 1.2's dead key support is broken by design and Q3 doesn't support non-ASCII text entry, so the chances are you won't get the correct character anyway.

If you use such a keyboard layout, you can set the cvar cl_consoleKeys. This is a space delimited list of key names that will toggle the console. The key names are the usual Q3 names e.g. "~", "`", "c", "BACKSPACE", "PAUSE", "WINDOWS" etc. It's also possible to use ASCII characters, by hexadecimal number. Some example values for cl_consoleKeys:

"~ ` 0x7e 0x60"           Toggle on ~ or ` (the default)
"WINDOWS"                 Toggle on the Windows key
"c"                       Toggle on the c key
"0x43"                    Toggle on the C character (Shift-c)
"PAUSE F1 PGUP"           Toggle on the Pause, F1 or Page Up keys

Note that when you elect a set of console keys or characters, they cannot then be used for binding, nor will they generate characters when entering text. Also, in addition to the nominated console keys, Shift-ESC is hard coded to always toggle the console.

QuakeLive mouse acceleration

(patch and this text written by TTimo from id)

I've been using an experimental mouse acceleration code for a while, and decided to make it available to everyone. Don't be too worried if you don't understand the explanations below, this is mostly intended for advanced players: To enable it, set cl_mouseAccelStyle 1 (0 is the default/legacy behavior)

New style is controlled with 3 cvars:

sensitivity cl_mouseAccel cl_mouseAccelOffset

The old code (cl_mouseAccelStyle 0) can be difficult to calibrate because if you have a base sensitivity setup, as soon as you set a non zero acceleration your base sensitivity at low speeds will change as well. The other problem with style 0 is that you are stuck on a square (power of two) acceleration curve.

The new code tries to solve both problems:

Once you setup your sensitivity to feel comfortable and accurate enough for low mouse deltas with no acceleration (cl_mouseAccel 0), you can start increasing cl_mouseAccel and tweaking cl_mouseAccelOffset to get the amplification you want for high deltas with little effect on low mouse deltas.

cl_mouseAccel is a power value. Should be >= 1, 2 will be the same power curve as style 0. The higher the value, the faster the amplification grows with the mouse delta.

cl_mouseAccelOffset sets how much base mouse delta will be doubled by acceleration. The closer to zero you bring it, the more acceleration will happen at low speeds. This is also very useful if you are changing to a new mouse with higher dpi, if you go from 500 to 1000 dpi, you can divide your cl_mouseAccelOffset by two to keep the same overall 'feel' (you will likely gain in precision when you do that, but that is not related to mouse acceleration).

Mouse acceleration is tricky to configure, and when you do you'll have to re-learn your aiming. But you will find that it's very much forth it in the long run.

If you try the new acceleration code and start using it, I'd be very interested by your feedback.

README for Developers

pk3dir

ioquake3 has a useful new feature for mappers. Paths in a game directory with the extension ".pk3dir" are treated like pk3 files. This means you can keep all files specific to your map in one directory tree and easily zip this folder for distribution.

64bit mods

If you wish to compile external mods as shared libraries on a 64bit platform, and the mod source is derived from the id Q3 SDK, you will need to modify the interface code a little. Open the files ending in _syscalls.c and change every instance of int to intptr_t in the declaration of the syscall function pointer and the dllEntry function. Also find the vmMain function for each module (usually in cg_main.c g_main.c etc.) and similarly replace the return value in the prototype with intptr_t (arg0, arg1, ...stay int).

Add the following code snippet to q_shared.h:

#ifdef Q3_VM
typedef int intptr_t;
#else
#include <stdint.h>
#endif

Note if you simply wish to run mods on a 64bit platform you do not need to recompile anything since by default Q3 uses a virtual machine system.

Creating mods compatible with Q3 1.32b

If you're using this package to create mods for the last official release of Q3, it is necessary to pass the commandline option '-vq3' to your invocation of q3asm. This is because by default q3asm outputs an updated qvm format that is necessary to fix a bug involving the optimizing pass of the x86 vm JIT compiler.

Creating standalone games

Have you finished the daunting task of removing all dependencies on the Q3 game data? You probably now want to give your users the opportunity to play the game without owning a copy of Q3, which consequently means removing cd-key and authentication server checks. In addition to being a straightforward Q3 client, ioquake3 also purports to be a reliable and stable code base on which to base your game project.

However, before you start compiling your own version of ioquake3, you have to ask yourself: Have we changed or will we need to change anything of importance in the engine?

If your answer to this question is "no", it probably makes no sense to build your own binaries. Instead, you can just use the pre-built binaries on the website. Just make sure the game is called with:

+set com_basegame <yournewbase>

in any links/scripts you install for your users to start the game. The binary must not detect any original quake3 game pak files. If this condition is met, the game will set com_standalone to 1 and is then running in stand alone mode.

If you want the engine to use a different directory in your homepath than e.g. "Quake3" on Windows or ".q3a" on Linux, then set a new name at startup by adding

+set com_homepath <homedirname>

to the command line. You can also control which game name to use when talking to the master server:

+set com_gamename <gamename>

So clients requesting a server list will only receive servers that have a matching game name.

Example line:

+set com_basegame basefoo +set com_homepath .foo
+set com_gamename foo

If you really changed parts that would make vanilla ioquake3 incompatible with your mod, we have included another way to conveniently build a stand-alone binary. Just run make with the option BUILD_STANDALONE=1. Don't forget to edit the PRODUCT_NAME and subsequent #defines in qcommon/q_shared.h with information appropriate for your project.

Standalone game licensing

While a lot of work has been put into ioquake3 that you can benefit from free of charge, it does not mean that you have no obligations to fulfill. Please be aware that as soon as you start distributing your game with an engine based on our sources we expect you to fully comply with the requirements as stated in the GPL. That includes making sources and modifications you made to the ioquake3 engine as well as the game-code used to compile the .qvm files for the game logic freely available to everyone. Furthermore, note that the "QIIIA Game Source License" prohibits distribution of mods that are intended to operate on a version of Q3 not sanctioned by id software:

"with this Agreement, ID grants to you the non-exclusive and limited right
to distribute copies of the Software ... for operation only with the full
version of the software game QUAKE III ARENA"

This means that if you're creating a standalone game, you cannot use said license on any portion of the product. As the only other license this code has been released under is the GPL, this is the only option.

This does NOT mean that you cannot market this game commercially. The GPL does not prohibit commercial exploitation and all assets (e.g. textures, sounds, maps) created by yourself are your property and can be sold like every other game you find in stores.

Network protocols

There are now two cvars that give you some degree of freedom over the reported protocol versions between clients and servers: "com_protocol" and "com_legacyprotocol". The reason for this is that some standalone games increased the protocol number even though nothing really changed in their protocol and the ioquake3 engine is still fully compatible.

In order to harden the network protocol against UDP spoofing attacks a new network protocol was introduced that defends against such attacks. Unfortunately, this protocol will be incompatible to the original quake3 1.32c which is the latest official release from id. Luckily, ioquake3 has backwards compatibility, on the client as well as on the server. This means ioquake3 players can play on old servers just as ioquake3 servers are able to service old clients.

The cvar "com_protocol" denotes the protocol version for the new hardened protocol, whereas the "com_legacyprotocol" cvar denotes the protocol version for the legacy protocol. If the value for "com_protocol" and "com_legacyprotocol" is identical, then the legacy protocol is always used. If "com_legacyprotocol" is set to 0, then support for the legacy protocol is disabled.

Mods that use a standalone engine obviously do not require dual protocol support, and it is turned off if the engine is compiled with STANDALONE per default. If you desire backwards compatibility to older versions of your game you can still enable it in q_shared.h by defining LEGACY_PROTOCOL.

cl_guid Support

cl_guid is a cvar which is part of the client's USERINFO string. Its value is a 32 character string made up of [a-f] and [0-9] characters. This value is pseudo-unique for every player. Id's Quake 3 Arena client also sets cl_guid, but only if Punkbuster is enabled on the client.

If cl_guidServerUniq is non-zero (the default), then this value is also pseudo-unique for each server a client connects to (based on IP:PORT of the server).

The purpose of cl_guid is to add an identifier for each player on a server. This value can be reset by the client at any time so it's not useful for blocking access. However, it can have at least two uses in your mod's game code:

  1. improve logging to allow statistical tools to index players by more than just name
  2. granting some weak admin rights to players without requiring passwords

PNG support

ioquake3 supports the use of PNG (Portable Network Graphic) images as textures. It should be noted that the use of such images in a map will result in missing placeholder textures where the map is used with the id Quake 3 client or earlier versions of ioquake3.

Recent versions of GtkRadiant and q3map2 support PNG images without modification. However GtkRadiant is not aware that PNG textures are supported by ioquake3. To change this behaviour open the file 'q3.game' in the 'games' directory of the GtkRadiant base directory with an editor and change the line:

texturetypes="tga jpg"

to

texturetypes="tga jpg png"

Restart GtkRadiant and PNG textures are now available.

Building with MinGW for pre Windows XP

IPv6 support requires a header named "wspiapi.h" to abstract away from differences in earlier versions of Windows' IPv6 stack. There is no MinGW equivalent of this header and the Microsoft version is obviously not redistributable, so in its absence we're forced to require Windows XP. However if this header is acquired separately and placed in the qcommon/ directory, this restriction is lifted.

Contributing

Please send all patches to bugzilla (https://bugzilla.icculus.org), or join the mailing list (http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org) and submit your patch there. The best case scenario is that you submit your patch to bugzilla, and then post the URL to the mailing list.

The focus for ioq3 is to develop a stable base suitable for further development and provide players with the same Quake 3 experience they've had for years. As such ioq3 does not have any significant graphical enhancements and none are planned at this time. However, improved graphics and sound patches will be accepted as long as they are entirely optional, do not require new media and are off by default.

Building Official Installers

We need help getting automated installers on all the platforms that ioquake3 supports. We don't necessarily care about all the installers being identical, but we have some general guidelines:

  • Please include the id patch pk3s in your installer, which are available from http://ioquake3.org/patch-data/ subject to agreement to the id EULA. Your installer shall also ask the user to agree to this EULA (which is in the /web/include directory for your convenience) and subsequently refuse to continue the installation of the patch pk3s and pak0.pk3 if they do not.

  • Please don't require pak0.pk3, since not everyone using the engine plans on playing Quake 3 Arena on it. It's fine to (optionally) assist the user in copying the file or tell them how.

  • It is fine to just install the binaries without requiring id EULA agreement, providing pak0.pk3 and the patch pk3s are not referred to or included in the installer.

  • Please include at least an SDL so/dylib/dll on every platform.

  • Please include an OpenAL so/dylib/dll, since every platform should be using it by now.

  • Please contact the mailing list when you've made your installer.

  • Please be prepared to alter your installer on the whim of the maintainers.

  • Your installer will be mirrored to an "official" directory, thus making it a done deal.

Credits

Maintainers

Significant contributions from

engine's People

Contributors

amanieu avatar andreyv avatar cmf028 avatar dersaidin avatar ensiform avatar grantwwoodford avatar hgs3 avatar icculus avatar inolen avatar ir4t4 avatar jeremiah-sypult avatar jonathangray avatar leilei- avatar lnussel avatar losinggeneration avatar nuclearmonster avatar oitzujoey avatar opvolger avatar r-a-sattarov avatar razish avatar richard-allen avatar rilysh avatar sago007 avatar smiletheory avatar thiloschulz avatar timangus avatar tjdub avatar xhairball avatar zturtleman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

engine's Issues

"Ignoring surfaces... the max is 32 surfaces" warning (resulting in missing texture) on nightly builds binaries

An user on Discord reported to me about a problem he noticed while using a certain third party model with OA nightly build binaries.

The model is this one
http://en.ws.q3df.org/models/downloads/q3mdl-q4hybrid.zip
it's a quite "heavy" model, the zip even contains two pk3 files, one with lower and one with higher polycount.

If using nightly builds binaries, the model's face is shown as "missing texture", as are the "holograms" it generates during its idle animation. In console there is "WARNING: Ignoring surfaces in 'models/players/q4hybrid/lower_classica.skin', the max is 32 surfaces!" message.

If using classic OA 0.8.8 binaries, instead, that specific warning is not shown and model's face and its "holograms" are shown correctly.

Here you can see a comparison between classic 0.8.8 binaries and nightly build binaries:
shot0093
shot0094
(By the way, by doing this test I see that playing the game with nightly build binaries -with same settings- it looks noticeably darker - I was using Windows 10 with an ATI card, with the game in "windowed" mode, but the same also happens in "fullscreen").

Side notes: using the model shows some issues in general, I just mention them here to say it's not a model I think I would actually use, despite some cool things:

  • I don't like the fact that in the idle animation the model moves away from its hitbox, making it an harder target.
  • Some of its skins appear to rely in some Q3A textures, so with some skins part of its body is just transparent (invisible). This seems to happen the same with 0.8.8 and nightly builds binaries.

Make r_slowness platform-agnostic.

r_slowness and related are a series of cvars introduced by leilei. Here's what they do:

r_slowness
r_slowness_cpu
r_slowness_gpu

should roughly fake the speed of the MHz you set CPU to (based on p2 performance, default is 300) GPU is much looser and is based on mhz (like 93-96 for Voodoo2) and also scales the slowness by screen resolution. There's even a synthetic bottleneck. It won't be practical for play, but may be useful for content production (like for realizing the critical performance choke points in the maps - oa_spirit3 has a BAD one thanks to the portal in the water, for example)

What it really is, is just a sleep command called every finished backend buffer determined by a bunch of division on numbers of vertices, indices, surface count, etc... It's much better for nailing low performance that com_maxfps can't reach.

Currently no way to simulate texture thrashing (r_slowness_vram would be such a cvar, notably R_SumOfUsedImages does not function at all - and would have been great for doing this)

Such useful feature for development should be platform-agnostic, since it currently works only in Windows. How can this be achieved?

Extension list crash with UI

Clicking the "driver info" button in old menu modules with a really long extension list would cause a crash.

I'd probably want only showing the available extensions that the renderer actually uses and leave off with "and x more" exposed to the modules.

This bug happens in both Linux and Windows.

Placeholder shader scripts

Reason: filling in/substitute specific missing textures with special placeholder scripts if a texture is missing. for q3 mapmodels particularly (i.e. generic stone for major/visor/gargoyle/fem/jesus statues, metal for lampposts)

Right now it's

  • load texture, if fail, use a default placeholder shader
  • if default placeholder ishader aren't found, do the white/gray box image

Desired behavior:

  • load texture, if fail, find and load a placeholder special shader script
  • if placeholder shader doesn't exist, do the default placeholder shader
  • if default placeholder ishader aren't found, do the white/gray box image
  • load texture, if exists, disregard whatever the placeholder shader is

Reasonable texture sizes

OA textures are 2x the resolution at least. Addons for Q3 don't obey this rule so they would look visually inconsistent with their texel density.

The proposal/idea I'm thinking is a text script (scripts/*.texsize) that specifies the "reasonable base width" for each hi-res OA texture so it would be consistent with Q3 picmip values. like

textures/gothic_block/killblock69tall 256
textures/gothic_block/killblock69short 256

which resizes the 512x1024 texture (of any image format) to 256x512 at upload32 time. Specifying height won't be neccessary

To disable it would be r_picmip -1.

Possible memory leak with XMP playback

To reproduce:

  • get a nice big mod/s3m/it/xm file.
  • "music" it a bunch of times
  • watch a ncie crash happen.

This might have also been related to using an outdated (2014) libxmp while trying this though, Have not yet updated that to see if it's reproducable in it, but there's still the possibility it's OA's fault here

Restore 8-bit sound painting

Q3 had this from the start, defaulted it enabled (s_loadas8bit 1 / s_compression 1 would use this) and had significant memory/performance differences. It was gutted out in some 1.30+ version with no trace in the released source nor the released sources of RTCW and JK2.

Reimplementing this might take some work.

FUN FACT: the 4-bit ADPCM painting is still in the code (what used to be s_compression 2) but that's generally slower, but had larger memory savings.

Modularizing the audio/video renderers

This is something we talked on Discord.

3DJ implemented support for OpenAL Soft. The problem is that such support replaces OpenAL HW rather than having it as an alternative. And, well, we don't have exactly a fond memory of when IOQ3 implemented SDL in an invasive way (long story short: it was the beginning of all the big problems).

The ideal solution would be two engine cvars controlling the audio and video devices. This has lots of utilities, among them helping troubleshooting and allowing new devices to be integrated.

That said, unlike gamecode, I don't have enough knowledge of engine to do something about it. So I'm leaving this as just an issue.

Com_QueueEvent: overflow

oa_issues

and ^3Can't use keys or values with a '"': verload" =

My system is ubuntu16.04.
I can not refresh anything from the server sometime, but most of time it is just fine.
Is there some wrong?

Restore r_gldriver

This cvar is intended to select different GL ICDs and MiniGL drivers, most importantly for using secondary video cards (i.e. 3Dfx Voodoo Graphics / 3Dfx Voodoo2) or using certain wrappers (i.e. GLDirect, AltoGL) or even some software rendering drivers (i.e. SGI OpenGL for Windows)

Currently this is not present, and it causes the game to be forced to use opengl32.dll via SDL.

3dfx V1 paletted texture errors

OA's paletted texture feature is designed for an Index w/ transparent color format, which the 3dfx Voodoo Graphics GL ICD does not support (but all the later Voodoos starting from Voodoo2 do). As a result, all the indexed alpha texels on paletted textures are not rendered transparent.

A solution would be to have them processed as 16-bit RGBA (with a paletted processing, how GLQuake and Quake2 did it) and upload them as that, though it would be trickier to detect the V1's palette support limits to determine this behavior.

3dfx gamma control is broken

You can't adjust brightness or have overbrights on a 3dfx card.

Not an issue in q3 - both can be done. The extension WGL_3DFX_gamma_control is used for this.

Raspberry Pi2/3 support officially

The "Raspberry Pi version" of OA has mysteriously disappeared, the ioquake3 Raspberry Pi build is over 4 years old, and the latest ioquake3 requires compiling your own kernel to build properly on Pi.

The OpenGL wrapper for the Pi 3 is experimental, and while it "works", it's extremely slow (worse than Rage Pro performance easily), and crash-prone. So that's not a good solution either.

Perhaps an no-nonsense Pi port is in order? Tons of deb packages of everyone reinventing the wheel, but no source code.

directional shrapnel damage

if rocket blows up towards opponent vector say a ground shot directly at them it should spray more damage to make it more realistic as peices of shrapnel and floor would still hit them. also ricashae's would be neat.

A map crashing with "Unsupported color conversion request" on nightly builds binaries

Hello.
Trying "TrueCombat" Q3 mod (http://www.moddb.com/mods/true-combat/downloads/true-combat-13-full) with OA, it has been noticed that trying to load the map named "Bahamot" casuses the game to crash (tested on Windows with nightly build binaries), with an error saying "Unsupported color conversion request".
The bug happens with nightly builds, while the map works flawlessly with old OA 0.8.8 Windows binaries. Crashing isn't a nice thing, so, although not urgent, I think this may be worth a look before OA3 will be released.

Probably the crash may be caused by some texture with some strange encoding, but I don't know which one.
Probably not the same problem which causes the game to crash in "oacmpctf1" map in OACMP Vol1 v3 (IIRC, jpeg "progressive encoding" not supported in Windows binaries -while supported in Linux binaries-), because that crashed in OA 0.8.8, while the TC "bahamot" map works in 0.8.8 binaries.
Searching a bit, I found this https://dev.etlegacy.com/issues/993 (Enemy Territory Legacy): there, they said the problem was due to a jpg file using "CMYK" color mode. But in their case, it wasn't a crash, it was just a texture not shown, with a warning. So maybe it's yet another thing (grayscale maybe?)...

Particle spawn issues

The particle system in renderer_oa has trouble initializing new particle effects for a reason I overlooked.

Filing this issue to remind myself.

Dynamic lights to light up areas

Jedi Academy has a way of doing this and is open source, but under the GPLv2 (with no later version) so that may be incompatible.

Earlier Q3Tests also had a way of doing this by the old Q2-ish way of updating the lightmap, but I think this is all torn out on the source release anyway and it's unlikely that Carmack has kept an archive of the older code and it's also legally unlikely he can clear it for release anyhow.

Not clear how to disable filtering

I am running the latest version of the OA3 engine...and I noticed that the game looks a lot worse than it usually does. I tried setting r_tvfilter to 0 to see if that would help at all.

...what settings should I set so it looks clear again?

A few sound-related bugs

I didn't know if I had to open a distinct "issue" for each one.

These bugs have been tested with engine and gamecode nightly builds from July 2016 (see this forum post). I haven't noticed changes related to them in these last months, so they should still be there.

  • Bug which affects both SDL and OpenAL modes. Specifying "[path]\filename.ogg" in target_speaker causes the game to search for "filename.ogg.wav" and "filename.ogg.ogg", but NOT for "filename.ogg"... I can guess searching for all three (or four, considering also "filename.wav") would be the "safer" solution.
  • Bug which affects OpenAL mode only. Stereo sound files (which in theory should not be used, but maybe somone used them anyway) are played at FULL VOLUME even if you go far from them (in SDL mode, they actually fade out as you go away, like mono sounds do in both modes).

Also, small differences I noticed between DSL and OpenAL modes are yellow warnings related to sounds:

  • In SDL mode, each time the music backgound track (worldspawn) re-starts, "warning: music is not 22k stereo" is shown. That is not shown in OpenAL mode. If that message has no need to exist anymore, it may be completely removed or may be shown only with "/developer 1", maybe...
  • In SDL mode, if it cannot find a sound file for target_speaker, there are warnings in console at map loading AND everytime the sound should have played. In OpenAL mode, only the warning at map loading applies. Which one is better?

I do not know if there are other entities capable of playing user-defined sound files.

Overbright consistency bug with vertex colors

Filing this issue to remind myself.

For example, marks are half the opacity when overbright's on. Vertex-baked colors in maps are also affected

This is entirely my fault and I've just got to figure out where I screwed up in renderer_oa/tr_shader.c

I'm sure my original intent for this was to get the rgbGen vector values shifted down for more practical use with consistent visuals.

NT4 crashes with Sys_WritePIDFile

During startup, after "unable to get SHFolder.dll" it sends openarena.x86.exe to Dr. Watson with an illegal exception.

I believe it may be related to creating a PID file. Dummying out the Sys_WritePIDFile stuff in common.c lets the game start properly.

Using Wayland render results in Crash

In Arch under a Wayland GNOME session, I get the following error when I try to launch OpenArena using Wayland:

[luke@lt-arch openarena-0.8.8]$ SDL_VIDEODRIVER=wayland ./openarena.x86_64 
ioq3+oa 3.0.0a_GIT_e120f49e-2018-06-16 linux-x86_64 Jul 24 2018
Have SSE support
----- FS_Startup -----
Current search path:
/home/luke/.local/share/OpenArena/baseoa
./baseoa
./baseoa/pak6-patch088.pk3 (711 files)
./baseoa/pak6-patch085.pk3 (559 files)
./baseoa/pak6-misc.pk3 (229 files)
./baseoa/pak5-TA.pk3 (139 files)
./baseoa/pak4-textures.pk3 (1753 files)
./baseoa/pak2-players.pk3 (669 files)
./baseoa/pak2-players-mature.pk3 (231 files)
./baseoa/pak1-maps.pk3 (100 files)
./baseoa/pak0.pk3 (1042 files)

----------------------
5433 files in pk3 files
execing default.cfg
execing q3config.cfg
couldn't exec autoexec.cfg
Hunk_Clear: reset the hunk ok
Gtk-Message: 14:48:09.764: GtkDialog mapped without a transient parent. This is discouraged.
----- Client Initialization -----
----- Initializing Renderer ----
-------------------------------
QKEY found.
----- Client Initialization Complete -----
----- R_Init -----
SDL_Init( SDL_INIT_VIDEO ) FAILED (No available video device)
SDL_Init( SDL_INIT_VIDEO ) FAILED (No available video device)
Setting r_mode -1 failed, falling back on r_mode 3
SDL_Init( SDL_INIT_VIDEO ) FAILED (No available video device)
----- Client Shutdown (Client fatal crashed: GLimp_Init() - could not load OpenGL subsystem) -----
RE_Shutdown( 1 )
Hunk_Clear: reset the hunk ok
-----------------------
GLimp_Init() - could not load OpenGL subsystem
Gtk-Message: 14:48:16.548: GtkDialog mapped without a transient parent. This is discouraged.

DDS texture load support

Pros:

  • Saves lots and lots of video memory
  • Very quick loading
  • Modern video cards, usually made after 1999 natively support it
  • Smaller overall base data size than TGA+JPG as well as aggressively optimized PNGs

Cons:

  • an evil patent prevents authentic legal software decoding. (Darkplaces has its own patent-free decoding method)
  • No texture processing (which is okay to compromise since there's already mips made in the dds's anyway...usually.)
  • Artifacts occur, like sudden squares being formed around curves and edges. Can be worked around with alternate encoders, like S2TC
  • Not implemented everywhere, particularly Free display drivers steer clear of it due to the aforementioned patent issue. (It is ubiquitous on Windows however, mostly from 1999-2000 hardware on)

Windows version with XMP cannot be compiled as a static linked binary

Currently the Windows nightly builds (http://openarena.ws/board/index.php?topic=5263.0) are compiled without XMP support.

The nightly build are compiled with static linking in an MXE environment.

I have constructed a Docker image with a static version of libxmp-lite but I get the following linker errors:

LD build/release-mingw32-x86/openarena.x86.exe
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x19fb): undefined reference to `_imp__xmp_get_frame_info'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x1a11): undefined reference to `_imp__xmp_get_module_info'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x1a5d): undefined reference to `_imp__xmp_play_buffer'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x1ce5): undefined reference to `_imp__xmp_end_player'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x1cf3): undefined reference to `_imp__xmp_release_module'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x1d01): undefined reference to `_imp__xmp_free_context'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x234a): undefined reference to `_imp__xmp_create_context'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x2364): undefined reference to `_imp__xmp_load_module_from_memory'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x242b): undefined reference to `_imp__xmp_start_player'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x2445): undefined reference to `_imp__xmp_get_module_info'
/usr/lib/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/../../../../i686-w64-mingw32.static/lib/../lib/libxmp.a(control.o): In function `xmp_free_context':
/tmp/libxmp-lite-4.4.1/src/control.c:57: undefined reference to `_imp__xmp_release_module'
/usr/lib/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/../../../../i686-w64-mingw32.static/lib/../lib/libxmp.a(load.o): In function `xmp_release_module':
/tmp/libxmp-lite-4.4.1/src/load.c:604: undefined reference to `_imp__xmp_end_player'
/usr/lib/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/../../../../i686-w64-mingw32.static/lib/../lib/libxmp.a(format.o): In function `format_list':
/tmp/libxmp-lite-4.4.1/src/format.c:62: undefined reference to `xm_loader'
/usr/lib/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/../../../../i686-w64-mingw32.static/lib/../lib/libxmp.a(format.o):format.c:(.rdata+0x0): undefined reference to `xm_loader'
/usr/lib/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/../../../../i686-w64-mingw32.static/lib/../lib/libxmp.a(format.o):format.c:(.rdata+0x8): undefined reference to `it_loader'
/usr/lib/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/../../../../i686-w64-mingw32.static/lib/../lib/libxmp.a(format.o):format.c:(.rdata+0xc): undefined reference to `s3m_loader'
collect2: error: ld returned 1 exit status

As far as I can see the "imp_" means that the binary expect to be linked against a DLL instead.

The solution likely involves a strategic placed "#define" somewhere.

About setting widescreen fov parameter [question]

This thread is more about question than issue. The following code is extracted from RE_RenderScene in tr_scene.c

parms.fovX = tr.refdef.fov_x;
parms.fovY = tr.refdef.fov_y;

if (!( fd->rdflags & RDF_NOWORLDMODEL ) ) // don't affect interface refdefs
{
	float zoomfov = tr.refdef.fov_x / 90;	
	int thisisit;
	float erspact = tr.refdef.width / tr.refdef.height;
	float aspact = glConfig.vidWidth / glConfig.vidHeight;
	if (erspact == aspact) thisisit = 1;
	if (((tr.refdef.fov_x /  tr.refdef.fov_y) > 1.3) && (thisisit))
        {
                // undo vert-
                parms.fovY = parms.fovY * (73.739792 / tr.refdef.fov_y) * zoomfov;
                // recalculate the fov
                parms.fovX = (atan (glConfig.vidWidth / (glConfig.vidHeight / tan ((parms.fovY * M_PI) / 360.0f))) * 360.0f) / M_PI;
                parms.fovY = (atan (glConfig.vidHeight / (glConfig.vidWidth / tan ((parms.fovX * M_PI) / 360.0f))) * 360.0f) / M_PI;
        }
}

It boil down to

parms.fovX = tr.refdef.fov_x;
parms.fovY = tr.refdef.fov_y;
if (!( fd->rdflags & RDF_NOWORLDMODEL ) ) // don't affect interface refdefs
{
    if ((parms.fovX > parms.fovY * 1.3f) && (tr.refdef.width * glConfig.vidHeight == glConfig.vidWidth * tr.refdef.height ))
    {
        // undo vert-
        parms.fovY = parms.fovX * (73.739792 / 90.0);
        // recalculate the fov_x
        parms.fovX = atan( tan(parms.fovY*(M_PI/360.0)) * glConfig.windowAspect ) * (360.0 / M_PI);
    }
}

because:

  1. glConfig.windowAspect = glConfig.vidWidth / glConfig.vidHeight is already computed previously, don't compute it every time in the main loop.

  2. parms.fovX = (atan (glConfig.vidWidth / (glConfig.vidHeight / tan ((parms.fovY * M_PI) / 360.0f))) * 360.0f) / M_PI are equivalent to parms.fovY = (atan (glConfig.vidHeight / (glConfig.vidWidth / tan ((parms.fovX * M_PI) / 360.0f))) * 360.0f) / M_PI; because:

glConfig.vidWidth / glConfig.vidHeight = tan( parms.fovX * M_PI / 360) / tan( parms.fovY * M_PI / 360)
there no need to compute parms.fovY again, right?

  1. what i am doing is trying to avoid float divided, it seems that adding this code code snippet to my rendergl2 module make sarge run faster. it may somewhere which OA different from ioq3.

I don't know how 1.3f and 73.739792 this two parameters comes from. Can someone tell something about that?

Vertex shader leaks and corrupts stuff until it segfaults

In the leidev branch i've realized how bad the vertex shader code has become after cleaning up some of my deprecated shader stuff. Problem is, debugging gdb with it leads to a segfault in other parts in the code (like bots), when there's obvious visual symptoms of a memory issue:

  • Dynamic light texture sometimes gets corrupted

  • Whiteimage sometimes gets corrupted

  • in a debug build, tcMod atlas effects pick the wrong subimage (smoke images becoming shockwave images)

Typo in compiling code?

I got this error when compiling. was this just a typo?

sys_unix.c:(.text+0x1e63): undefined reference to `fesetround'

Sound effects can't be interrupted

Q3 used to do this, and this was removed in 1.27b (around the same time they removed A3D support)

Why this is necessary? The quad damage sound distortion is terrible

Remove 3dfx splash

On 3dfx hardware with 3dfx drivers, the game will set off 3dfx's splash animation two or three times when initializing a video mode. This takes up a lot of time and is bad.

Q3 did not do this.

When compiling the game on macOS, app bundle generation fails

Setup:
macOS Big Sur 11.6.1 (20G224)
Apple clang version 13.0.0 (clang-1300.0.29.30)

When compiling the game through the make-macosx.sh script, generating app bundle (through make-macosx-app.sh) fails. The openarena.x86_64 binary compiles successfully and can be launched from the Terminal (although you can't really play: #61).

The error message:

./make-macosx-app.sh: no ioquake3 binary architectures were found for target 'release'

After a quick investigation of the make-macosx-app.sh it seemed to me that the PRODUCT_NAME="ioquake3" should be changed to PRODUCT_NAME="openarena" (I don't know how this script ever worked before as-is), so I changed that.

But then, I got many errors similar to...

error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: no input files specified
usage: lipo <input_file> <command> [<options> ...]

As I'm not familiar with these Xcode command line tools and I'm not sure how/if that worked before, I don't know what's the solution here.

Flares stutter with vsync

Any flare can induce a stuttering ro players that use r_swapInterval 1 (or higher). The framerate will fluctutate rapidly when one is on the screen. These happen with r_flarequality set to 1 or higher, and/or r_flaresun and r_flaresdlight set.

Console window missing

The console window that would appear on startup on Windows is missing.

Why this is a problem:

  • Immediately informative startup errors/crashes, who's going to know to read a stderr.txt or paste an error from the clipboard?
  • Windows doesn't get consoles.
  • Carmack added this for a reason in the first place. Quake2, Wolf3D and the Keen series are the only id Software games without a startup console.

Homepath on *nix should fllow the XDG standard?

I admit that it is a little late to move the home folder to a more standard location but I think it should be done.
This is why there is a "?" in the title.

Currently "$HOME/.openarena" is used.
This should be "$XDG_DATA_HOME/openarena"
Where XDG_DATA_HOME should default to "$HOME/.local/share" if not defined.

A possible solution could be to check for presence of "$XDG_DATA_HOME/openarena" if it exists and then try "$HOME/.openarena" if it does not exist: Create "$XDG_DATA_HOME/openarena" and create a symbolic link in "$HOME/.openarena" to it. After a couple of years then all the documentation has been updated we stop creating the symbolic link.

A way to make the transfer easier is to move the .openarena folder to "$XDG_DATA_HOME/openarena" and create the symbolic link in case .openarena exists and the other does not. It can be a bit risky. We need to test the case where .local/share is mounted on a different disk than .openarena.

Furthermore the engine currently assumes that $HOME is defined. This is normally the case but it should continue to look for passwd in case it is not. I don't think it is worth looking into. People would have complained.

Support for 64 bit Mac OS Catalina

Unfortunately current build doesn't work with newest Mac OS Catalina, since they dropped support for 32 bit applications. I tried to compile using included make-macosx.sh script after installing libogg libvorbis sdl12 from brew. Using resources from original build 0.8.8 the app starts fine. Menu works fine. Unfortunately as soon as there are 3d graphics involved (for example Player settings in menu, or starting or connecting to any game) the app crashes with the following log

stitched 20 LoD cracks
...loaded 4106 faces, 90 meshes, 0 trisurfs, 0 flares
----- Client Shutdown (Received signal 6) -----
----- FS_Startup -----
Current search path:
/Users/user/Library/Application Support/OpenArena/baseoa
./baseoa
./baseoa/tr1ckhouse-beta3.pk3 (27 files)
./baseoa/pak6-patch088.pk3 (711 files)
./baseoa/pak6-patch085.pk3 (559 files)
./baseoa/pak6-misc.pk3 (229 files)
./baseoa/pak5-TA.pk3 (139 files)
./baseoa/pak4-textures.pk3 (1753 files)
./baseoa/pak2-players.pk3 (669 files)
./baseoa/pak2-players-mature.pk3 (231 files)
./baseoa/pak1-maps.pk3 (100 files)
./baseoa/pak0.pk3 (1042 files)
    
----------------------
5460 files in pk3 files
forcefully unloading cgame vm
RE_Shutdown( 1 )
OpenAL capture device closed.
-----------------------
----- Server Shutdown (Received signal 6) -----
==== ShutdownGame ====
AAS shutdown.
---------------------

Is there any direction i should follow to find the problem or maybe there will be an official build with Mac OS Catalina support?

Get Windows 95 support working again

"but why? No one uses these operating systems!!!"

  • It's still used on some later P4 builds and the like
  • some old video hardware only shipped W9X drivers
  • the engine still has very old limitations that would still keep it in the 9x gaming territory anyway (like no Unicode/UTF-8)

???Possible Solutions???

  • Hack up Mingw64's wspiapi.h to be compatible enough
  • Put PSAPI-dependent stuff in a define

Split-screen play

One computer, via gamepads

  • would need special cgame tricks as well, like configurable model and handicap. Name probably won't matter
  • maybe bind2 commands and joy2_ cvars to handle controls for the second player
  • up to 4 I am not sure.
  • 4 keyboards and 4 mice are not plain feasible for this so don't even think about it
  • could lead to something special, like a libretro core to bring OA3 to the very barren PC couch shooter world

Spearmint allegedly does it (haven't tried) but that's GPLv3 which is venturing into license toxicity. I'd like to keep GPLv2+ as much as I can

.pk3 file download rate slow(no more than 13kb/s) in my ubuntu16.04

issue1

I have downloaded many maps files, but none of the download rate can exceed 13kb/s, I uploaded a video to show the case:
lowDowloadRate.mp4.zip

My OS is Ubuntu16.04, win7 don't have this issue. Onetime when I play OA on WIN7, I find that the map download speed is much faster than my ubuntu, so i try to figure out where the problem is.

It may cause by libcurl 7.35.0 lib.
As I remove the libcurl-7.35.0 folder from the engine SDL2 codebase, then make it link the system default libcurl (7.47.0). After that, the download rate up to 100+kb/s, sometime i can get 1Mb/s.

My system default libcurl is installed by sudo apt-get install curl, the following is the returned information.

Reading package lists... Done
Building dependency tree
Reading state information... Done
curl is already the newest version (7.47.0-1ubuntu2.6).

Integrating latest libcurl can be done in later time.

You can try my code repository( https://github.com/suijingfeng/engine )๏ผŒ to see if the download speed can be improve in ubuntu16.04.

Software renderer module

My plan was to take TinyGL from the ResidualVM tree and integrate it into renderer_soft or replace the sdl_glimp.c for it

Pros:

  • might be faster than Mesa on some platforms
  • expand portability to non-accelerated platforms (i.e. PS3, PS4, DOS)

Cons:

  • doesn't support every extension (and that's by design)
  • probably a lack of blending modes (that's ok though, r_parseStageSimple is intended to work with that)

Glitchy mirror if sky with farbox is visible - Nightly builds

Hi, I noticed a glitch which happens with current Windows nightly builds (and, although it looks a bit different, also in the Android port, at least on my old S4), while it works correctly with old 0.8.8 binaries.

It looks like that if a sky with a "farbox" (http://toolz.nexuizninjaz.com/shader/shader/section3.htm#3.1) is visible in a mirror, it is drawn very glitchy inside the mirror.

You can test in q3tourney6ish map (http://www.mapraider.com/maps/openarena/free-for-all/5586/q3tourney6ish), which uses skies2/nebula2 shader, but I did some try with some other shader including a farbox such as skies2/nebula and another one, and the result was the same, while "standard" skies were correctly drawn instead. To me it looks like the glitch is somehow related with the presence of a farbox.

Screenshots show comparison of 0.8.8 binaries with 2019-09-29 nightly builds. Windows 10 64 bit with an ATI card.

shot0174

shot0175

Flash reduction (...for your health!)

By default, the game has very bright dynamic lights and bold chiaroscuro effects on models around dynamic lights combined with a bright muzzleflash that happens in almost a single frame which may be a seizure risk when repeated. This is a bad idea nowadays with high framerates.

Plans:

A new cvar, r_dynamicStrength (0-1), 1 being default, 0 being none as if it were off. Affects dynamic lights on models

A new cvar, r_flashOpacity, (0-1). 1 being default, 0 being off.

A new rgbGen identity clone, which is controlled by r_flashOpacity, and is to be assigned to 'flashing' shaders like weapon's muzzleflashes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.