Skip to content

FromAbyssStudio/roquakeii

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quake II Build System

A modern build system for Quake II with dual renderer support (Software and OpenGL).

🎮 Features

  • Dual Renderer Support: Both software and OpenGL renderers
  • Clean Build System: Organized makefiles with clear targets
  • Easy Renderer Switching: Simple script to switch between renderers
  • Automatic Setup: Handles file structure and configuration automatically

🚀 Quick Start

Build Everything (Recommended)

make both

Build Software Renderer Only

make soft

Build OpenGL Renderer Only

make gl

Run the Game

./build/roquakeii +set game baseq2 +set basedir ../data

🎛️ Renderer Selection

Switch Renderers

# Switch to software renderer
./scripts/switch_renderer.sh soft

# Switch to OpenGL renderer
./scripts/switch_renderer.sh gl

# Check current renderer
./scripts/switch_renderer.sh

Manual Configuration

Edit data/baseq2/config.cfg:

set vid_ref "softx"  # Software renderer (always works)
set vid_ref "gl"     # OpenGL renderer (requires OpenGL libraries)

📁 Project Structure

roquakeii/
├── build/                    # Compiled binaries
│   ├── roquakeii            # Main executable
│   ├── ref_soft.so          # Software renderer
│   ├── ref_softx.so         # Software renderer (symlink)
│   ├── ref_gl.so            # OpenGL renderer
│   ├── gamex86_64.so        # Game logic DLL
│   └── roquakeii.conf       # Renderer path config
├── data/                     # Game data
│   ├── baseq2/              # Base game files
│   │   ├── config.cfg       # User configuration
│   │   ├── default.cfg      # Default configuration
│   │   ├── gamex86_64.so    # Game DLL (copied)
│   │   └── pak*.pak         # Game data files
│   └── roquakeii.conf       # Renderer path config
├── makefiles/               # Build system
│   ├── makefile             # Main executable
│   ├── makefile_renderers   # Renderer libraries
│   └── makefile_game        # Game DLL
├── scripts/                 # Utility scripts
│   └── switch_renderer.sh   # Renderer switcher
└── src/                     # Source code
    ├── client/              # Client code
    ├── game/                # Game logic
    ├── ref_soft/            # Software renderer
    ├── ref_gl/              # OpenGL renderer
    └── linux/               # Linux-specific code

🛠️ Build Targets

Target Description
make all Build everything (default)
make both Build both renderers (recommended)
make soft Build software renderer only
make gl Try to build OpenGL renderer
make clean Clean all build files
make setup Setup file structure
make help Show help information

🔧 Requirements

Software Renderer

  • GCC compiler
  • X11 development libraries
  • Standard C libraries

OpenGL Renderer

  • All software renderer requirements
  • OpenGL development libraries (glu, mesa)
  • GLU headers (/usr/include/GL/glu.h)

Installing OpenGL Dependencies (Arch Linux)

sudo pacman -S glu mesa

🎯 Renderer Comparison

Feature Software OpenGL
Compatibility ✅ Always works ⚠️ System dependent
Performance Good Better
Graphics Basic Enhanced
Dependencies Minimal OpenGL libraries

🐛 Troubleshooting

OpenGL Renderer Won't Build

# Check if OpenGL libraries are installed
ls /usr/include/GL/glu.h

# Install missing dependencies
sudo pacman -S glu mesa

# Try building again
make gl

Game Won't Start

# Check if game data files are present
ls data/baseq2/pak*.pak

# Ensure configuration is correct
./scripts/switch_renderer.sh soft

Clean Build

make clean
make both

📝 Configuration Files

data/baseq2/config.cfg

User configuration file. Key settings:

  • vid_ref: Renderer selection (softx or gl)
  • name: Player name
  • crosshair: Crosshair visibility

data/baseq2/default.cfg

Default configuration loaded before user config.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test with both renderers
  5. Submit a pull request

📄 License

This project is based on the original Quake II source code by id Software, released under the GPL license.

🙏 Acknowledgments

  • id Software for the original Quake II
  • The Quake II community for preservation efforts
  • Open source contributors who made this possible

About

Quake 2 GPL Source Release

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 89.6%
  • Assembly 6.4%
  • Objective-C 3.0%
  • Other 1.0%