Giter Site home page Giter Site logo

klaussilveira / qengine Goto Github PK

View Code? Open in Web Editor NEW
850.0 21.0 42.0 12.13 MB

Retro game engine for creating games like it's 1997

License: GNU General Public License v2.0

CMake 0.75% C 98.94% Python 0.31%
game-engine game-development gamedev linux fps 3d-engine 3d-game

qengine's Introduction

qengine

Build Status GitHub release License

qengine is a cross-platform retro game engine. It is aimed at nostalgic game developers that miss simple times and enjoy creating games like it's 1997. The software renderer provides the aesthetic that we all love and the engine limitations exist to make your creativity shine.

The engine is a fork of the Quake II codebase that focuses on serving as a base for standalone games. Unlike other ports, it does not aim at being compatible with mods or the base Quake II game. In fact, many features were removed to reduce the complexity of the codebase and make the process of creating new games on top of the engine easier and faster.

Some notable changes include:

  • Removal of overly specific gameplay code, such as enemies and weapons
  • Merge of modules into a single package. No more DLLs, just a single executable for client and another for server
  • Removal of OpenGL
  • Minimal dependencies

qengine screenshot

Free, open source and community-driven

qengine stands on the shoulders of giants from the Quake II community. The code is built upon Yamagi Quake II, which itself contains code from other amazing projects:

  • Hecatomb
  • Icculus Quake 2
  • KMQuake2
  • Q2Pro
  • QuDoS
  • r1q2
  • stereo quake
  • zeq2

Goals

  • Provide a clean and maintainable base game engine
  • Improve stability across different platforms
  • Enhance the software renderer
  • Improve documentation of asset pipeline

License

qengine is released under the terms of the GPL version 2. See the LICENSE file for further information.

Compiling

$ mkdir build
$ cd build
$ cmake ..
$ make

If you don't want to build the docs, or you don't want to install the deps they require, you can pass -DBUILD_DOCS=OFF to cmake.

$ cmake -DBUILD_DOCS=OFF ..
$ make

Running

The engine will look for game data in the assets folder. You can start from scratch, or use the original Quake II game data if you own it.

Tools

Included with the engine there are quite a few useful tools. They are:

Mapping

  • qbsp3
  • qrad3
  • qvis3
  • bspinfo

Textures

  • pcx2wal
  • pcx2pal
  • colormap
  • 16to8

UI

  • uigen
  • fontgen

Compiling maps

$ tools/qbsp3 assets/maps/sample.map
$ tools/qvis3 assets/maps/sample.bsp
$ tools/qrad3 assets/maps/sample.bsp

Base assets

In order to run, the engine needs a few base assets, such as sounds, models and UI textures. Most of them are already included in the assets folder.

Palette

The engine works with a 256 color palette. However, the colormap.pcx file is a 256x320 color re-arrangement of those colors, resulting in 64 shades of each.

A GIMP palette is included to facilitate creation of new graphics for the engine: assets/palette.gpl

If you want more creative freedom, you can easily create a new palette. Create a PCX file with the 256 colors you have chosen and then:

$ tools/pcx2pal palette.pcx palette.pal
$ tools/colormap palette.pal colormap.pcx

qengine's People

Contributors

klaussilveira avatar kolen avatar y4my4my4m 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

qengine's Issues

FreeBSD compatibility

Trying to build qengine on FreeBSD:

$ mkdir build
$ cd build/
$ cmake -DBUILD_SDL=OFF -DBUILD_DOCS=OFF ..

This fails, as the following include has to be added to src/platform/unix/memory.c first:

@@ -36,6 +36,7 @@
 
 #if defined(__FreeBSD__) || defined(__OpenBSD__)
 #include <machine/param.h>
+#include <sys/types.h>
 #define MAP_ANONYMOUS MAP_ANON
 #endif

Then, linking fails:

[ 31%] Building C object CMakeFiles/client.dir/src/game/player/weapon.c.o
[ 32%] Linking C executable client
ld: error: undefined symbol: input_update
>>> referenced by system.c
>>> CMakeFiles/client.dir/src/platform/unix/system.c.o:(Sys_SendKeyEvents)
[โ€ฆ]

Perhaps, input.h is not found for whatever reason?

MacOS segfault

Hello,
I built the project on MacOS 12.5 Monterey and when I try to run it I get the log below. Any ideas on what I could do to make the project run?

./client

qengine v0.1.0
==============

Byte ordering: little endian

Added packfile './assets/pak0.pak' (3307 files).
Added packfile './assets/pak1.pak' (279 files).
Added packfile './assets/pak2.pak' (2 files).
Added packfile '/Users/asdf/dev/qengine/build//assets/pak0.pak' (3307 files).
Added packfile '/Users/asdf/dev/qengine/build//assets/pak1.pak' (279 files).
Added packfile '/Users/asdf/dev/qengine/build//assets/pak2.pak' (2 files).
Using '/Users/asdf/dev/qengine/build//assets' for writing.
execing default.cfg
You can't bind the special key "ESCAPE"!
You can't bind the special key "~"!
You can't bind the special key "`"!
couldn't exec config.cfg
couldn't exec autoexec.cfg
Console initialized.
Sound init
Starting SDL audio callback.
SDL audio driver is "coreaudio".
SDL audio initialized.
Sound sampling rate: 44100
SDL version is: 2.0.22
SDL video driver is "cocoa".
setting mode 0: 320 240
808k surface cache
Byte ordering: little endian

Successfully loaded renderer
Unknown command "start"

... <long delay> ...

Loading plaque timed out.
Version:      0.1.0
Compiler:     Apple LLVM 13.1.6 (clang-1316.0.21.2.5)
Signal:       11
zsh: segmentation fault  ./client

Base assets

This engine should not rely on the original assets of Quake 2 in order to run. The following commit already provides the minimum to get the engine running: 25c6b2e

Unfortunately, that's really bad programmer art. It's a start though, because it provides basic asset documentation through the uigen tool. fontgen is also pretty useful. There's a long way to go and contributions are welcome:

`make install` fails, missing vendor/SDL2-2.0.8/libSDL2.so

make succeeds, but make install fails as it is looking for libSDL2.so in the wrong place:-

build$ make install
CMake Error at vendor/SDL2-2.0.8/cmake_install.cmake:196 (file):
  file INSTALL cannot find
  "[path to current build dir]/vendor/SDL2-2.0.8/libSDL2.so".
Call Stack (most recent call first):
  cmake_install.cmake:42 (include)


make: *** [install] Error 1
build$ find -name 'libSDL2.so'
./libSDL2.so

Trouble compiling for Windows

So, after running CMAKE and creating the VS 2017 projects, the solution isn't compiling. It gives a invalid numeric argument /Wextra for a lot of projects.
How to fix that?

Segmentation Fault: 11 - running on macOS 10.14.2

First and foremost, thank you :) an awesome idea, and something I'd really like to take some time to play with.

Everything compiles fine on macOS (10.14.2), however, when I run the client, I get a Segmentation Fault (11), and the server prints this:
`Using '/Users/charlesdowns/Desktop/qengine//assets' for writing.
couldn't exec default.cfg
couldn't exec config.cfg
couldn't exec autoexec.cfg

`

And then no other messages - does this mean it's initialised properly?

Thank you :)

building and running with q2 demo and retail (on mac 10.13.6)

just passing on some info ๐Ÿ™‚

I was able to build by replacing cmake .. in the build instructions with this:

cmake -DBUILD_DOCS=off -DCMAKE_C_FLAGS=-I/usr/include/malloc ..

Running with q2demo

  1. copied assets to build/assets
  2. downloaded the quake 2 demo and copied the baseq2/* files into assets
  3. inside assets/autoexec.cfg, I replaced references to base1 with demo1

It ran, but some weirdness:

  • menu tiles missing:
    screen shot 2019-01-11 at 5 12 37 pm
  • this strogg was running at me, but was playing the dying anim:
    screen shot 2019-01-11 at 5 12 59 pm

Running with q2retail โŒ

As before I dumped baseq2/* files in assets (but from retail copy I have from steam), restored the original autoexec.cfg to reference base1, and I ran ./client, and it crashed:

$ ./client

qengine v0.1.0
==============

Byte ordering: little endian

Added packfile './assets/pak0.pak' (3307 files).
Added packfile './assets/pak1.pak' (279 files).
Added packfile './assets/pak2.pak' (2 files).
Added packfile '/Users/swilliam/code/qengine/build/.//assets/pak0.pak' (3307 files).
Added packfile '/Users/swilliam/code/qengine/build/.//assets/pak1.pak' (279 files).
Added packfile '/Users/swilliam/code/qengine/build/.//assets/pak2.pak' (2 files).
Using '/Users/swilliam/code/qengine/build/.//assets' for writing.
execing default.cfg
You can't bind the special key "ESCAPE"!
You can't bind the special key "~"!
You can't bind the special key "`"!
execing config.cfg
You can't bind the special key "ESCAPE"!
You can't bind the special key "`"!
You can't bind the special key "~"!
execing autoexec.cfg
Console initialized.
Sound init
Starting SDL audio callback.
SDL audio driver is "coreaudio".
SDL audio initialized.
Sound sampling rate: 22050
SDL version is: 2.0.8
SDL video driver is "cocoa".
setting mode 0: 320 240
808k surface cache
Byte ordering: little endian

Successfully loaded renderer
Game init
Game is starting up.
Game is base built on Jan 11 2019.
Server init
misc_deadsoldier doesn't have a spawn function
misc_deadsoldier doesn't have a spawn function
misc_deadsoldier doesn't have a spawn function
misc_deadsoldier doesn't have a spawn function
misc_deadsoldier doesn't have a spawn function
misc_deadsoldier doesn't have a spawn function
misc_strogg_ship doesn't have a spawn function
misc_strogg_ship doesn't have a spawn function
misc_strogg_ship doesn't have a spawn function
misc_deadsoldier doesn't have a spawn function
misc_deadsoldier doesn't have a spawn function
item_adrenaline doesn't have a spawn function
target_help doesn't have a spawn function
misc_deadsoldier doesn't have a spawn function
misc_deadsoldier doesn't have a spawn function
target_help doesn't have a spawn function
misc_deadsoldier doesn't have a spawn function
item_silencer doesn't have a spawn function
misc_gib_head doesn't have a spawn function
misc_deadsoldier doesn't have a spawn function
misc_banner doesn't have a spawn function
misc_banner doesn't have a spawn function
28 entities inhibited.
1 teams with 2 entities.
[0.0.0.0]:0: client_connect


-===================================-

 Outer Base
modeSegmentation fault: 11

Doxygen dot not found errors

I would receive this error upon cmake ..

CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Doxygen (missing: dot) (found version "1.8.14")
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.13/Modules/FindDoxygen.cmake:615 (find_package_handle_standard_args)
  CMakeLists.txt:289 (find_package)

I've resolved it by installing graphviz and was able to compile.
Thought this info might help others.


Running Manjaro Linux

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.