Giter Site home page Giter Site logo

cdev-tux / q3lite Goto Github PK

View Code? Open in Web Editor NEW
93.0 10.0 17.0 63.97 MB

Q3lite, an OpenGL ES port of Quake III Arena for embedded Linux systems.

License: GNU General Public License v3.0

Makefile 0.44% C 97.77% CMake 0.10% Objective-C 0.10% Assembly 0.37% Shell 0.27% GLSL 0.32% HTML 0.37% Roff 0.11% Yacc 0.02% NSIS 0.06% Perl 0.06% Rich Text Format 0.01% VBScript 0.01% AMPL 0.01%
quake3 quake-3 fps raspberry raspberrypi game game-development game-engine raspberry-pi ioquake3

q3lite's Issues

Compile Error

Getting error at the compile step, it might be an error on my end, but Iโ€™m getting this:
image

Can't connect to server

Just getting "Awaiting Challenge..." when trying to the server.

root@raspberrypi:/usr/local/games/quake3# ./q3ded.armv7l
Q3lite 1.0.0 linux-armv7l Nov 28 2017
----- FS_Startup -----
We are looking in the current search path:
/root/.q3a/baseq3
./baseq3
./baseq3/pak8.pk3 (9 files)
./baseq3/pak7.pk3 (4 files)
./baseq3/pak6.pk3 (64 files)
./baseq3/pak5.pk3 (7 files)
./baseq3/pak4.pk3 (272 files)
./baseq3/pak3.pk3 (4 files)
./baseq3/pak2.pk3 (148 files)
./baseq3/pak1.pk3 (26 files)
./baseq3/pak0.pk3 (3539 files)

----------------------
4073 files in pk3 files
execing default.cfg
execing q3config_server.cfg
execing autoexec.cfg
Hunk_Clear: reset the hunk ok
--- Common Initialization Complete ---
logfile opened on Wed Nov 29 03:59:45 2017

IP: 127.0.0.1
IP: 192.168.15.251
IP6: ::1
IP6: 2600:1700:xxxx
IP6: 2600:1700:xxxx
IP6: fe80::xxxx%eth0
Opening IP socket: 0.0.0.0:27960
]

netstat shows the port, but not in listening mode.

root@raspberrypi:/home/pi# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      506/sshd
tcp6       0      0 :::22                   :::*                    LISTEN      506/sshd
udp        0      0 0.0.0.0:42722           0.0.0.0:*                           338/avahi-daemon: r
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           338/avahi-daemon: r
udp        0      0 0.0.0.0:27960           0.0.0.0:*                           9062/.
udp        0      0 0.0.0.0:68              0.0.0.0:*                           502/dhcpcd
udp6       0      0 :::51429                :::*                                338/avahi-daemon: r
udp6       0      0 :::5353                 :::*                                338/avahi-daemon: r
udp6       0      0 :::546                  :::*                                502/dhcpcd

autoexec.cfg

set vm_game 1           //
set vm_cgame 1          //
set vm_ui 1             //
set dedicated 1         // Dedicated server but not announced
set com_hunkmegs 512    // How much RAM for your server
set net_port 27960      // The network port

// general server info
seta sv_hostname "House of Ellis" // name that appears in server list
seta g_motd "Quake on Pi"         // message that appears when connecting
seta sv_maxclients 32             // max number of clients than can connect
seta sv_pure 1                    // pure server, no altered pak files
seta g_quadfactor 4               // quad damage strength (3 is normal)
seta g_friendlyFire 1             // friendly fire motherfucker

// capture the flag
//seta g_gametype 4               // 0:FFA, 1:Tourney, 2:FFA, 3:TD, 4:CTF
//seta g_teamAutoJoin 0           // 0:goes into spectator mode, 1:auto joins a team
//seta g_teamForceBalance 0       // 0:free selection, 1:forces player on weak team
//seta timelimit 30               // Time limit in minutes
//seta capturelimit 8             // Capture limit for CTF
//seta fraglimit 0                // Frag limit

// team deathmatch
//seta g_gametype 3             // 0:FFA, 1:Tourney, 2:FFA, 3:TD, 4:CTF
//seta g_teamAutoJoin 0         // 0:goes into spectator mode, 1:auto joins a team
//seta g_teamForceBalance 1     // 0:free selection, 1:forces player on weak team
//seta timelimit 15             // Time limit in minutes
//seta fraglimit 25             // Frag limit

// free for all
seta g_gametype 0             // 0:FFA, 1:Tourney, 2:FFA, 3:TD, 4:CTF
seta timelimit 10             // Time limit in minutes
seta fraglimit 30             // Frag limit

seta g_weaponrespawn 2          // weapon respawn in seconds
seta g_inactivity 120           // kick players after being inactive for x seconds
seta g_forcerespawn 0           // player has to press primary button to respawn
seta g_log server.log           // log name
seta logfile 3                  // probably some kind of log verbosity?
seta rconpassword "password"      // sets RCON password for remote console

seta rate "12400"               // not sure
seta snaps "40"                 // what this
seta cl_maxpackets "40"         // stuff is
seta cl_packetdup "1"           // all about

set d1 "map q3dm1 ; set nextmap vstr d2"
set d2 "map q3dm2 ; set nextmap vstr d3"
set d3 "map q3dm3 ; set nextmap vstr d1"
vstr d1

Logging out after quitting game

Hello

I'm really impressed of the performance of q3lite. But I have one issue, why is the game always logging out after quitting the game. I'm starting the game in the console. How can I fix this issue?

Thanks

Portals and mirrors

Any idea why the portals and mirrors have HOM effect on GLES1? Testing on Android devices. Looking to fix myself but just checking if you a hint as to the reason? Thanks!

Building on Mali platform

Hi,
I have an armv8 board (same CPU as the RPi3) with a Mali GPU.
SDL2 (2.0.8) is built and working with GLES2 in framebuffer, for various emulators.
As this isn't Broadcom I've got libEGL.so, libGLESv1_CM.so and libGLESv2.so to build against.

I still have my old PC copy of Q3A I'm very curious to see if I can get this port running.

Questions:

  1. I seem to have 2 client builds, both of which I've tried. At runtime I'm getting:

./quake3_opengl2.aarch64

Compiled with SDL v2.0.8
Linking against SDL v2.0.8
----- Client Initialization Complete -----
----- R_Init -----
SDL using driver "mali"
Initializing OpenGL display
Display aspect: 1.778
...setting mode -2: 1920 1080
Trying to get an OpenGL 3.2 core context
SDL_GL_CreateContext failed: Could not create EGL context (call to eglCreateContext failed, reporting an error of EGL_BAD_ATTRIBUTE)
Reverting to default context
----- Client Shutdown (Client fatal crashed: Unsupported OpenGL Version: OpenGL ES 2.0

or with

./quake3.aarch64

Compiled with SDL v2.0.8
Linking against SDL v2.0.8
----- Client Initialization Complete -----
----- R_Init -----
SDL using driver "mali"
Initializing OpenGL display
Display aspect: 1.778
...setting mode 3: 640 480
----- Client Shutdown (Client fatal crashed: Unsupported OpenGL Version: OpenGL ES 2.0

Which is the intended binary?

  1. The wiki states "Q3lite is currently compatible with SDL2-2.0.4 only. Newer versions of SDL2 will have subtle issues due to incompatibilities with the Q3lite OpenGL ES 1.1 renderer."
    That's fine, I can build an older version of SDL2 (I've been building it since 2.0.2!), but does this mean it's only supporting GLES1.1 and not GLES2? I thought I'd give it a try as there seemed to be a build option for it in make-raspberrypi.sh which I borrowed as BUILD_RENDERER_OPENGL2=1

  2. Should I be using the includes I built SDL2 with, or the ones you've supplied under core/SDL2/inlcudes?

Many thanks for any advice.

smoking guns game

Hello great engine

im trying to run smokinguns game that uses the same engine in a Raspberry pi 3
while im succeded into trying the quake3 rally game
in smoking guns it stucks in the Loading now screen although it loads ok plays videos etc
but when i go to the single player and select any level and press load it stucks in the loading now screen if a press any buttons it goes back to main menu

i have the game running with ./quake3.armv7l +set fs_game smokinguns

the gpu shared mem is 192mb

any suggenstion?

Q3lite compatible with Pi Zero 2 W running Raspberry Pi OS Buster

Hi @cdev-tux.
I just want to confirm, that Q3lite is still compatible with Pi Zero 2 W running Raspberry Pi OS based on Debian Buster.

Since Zero 2 W is really just a under-clocked Pi 3 in Zero size and Buster based OS still works on it, I gave it a go, and with small addition to install script, it compiled and run without any issue.

"^Revision\s*:\s*[ 123][0-9a-f][0-9a-f][0-9a-f]12[0-9a-f]$"

I'm getting 89 fps in FullHD with included timedemo four.

ut

Hello there im trying to use your engine on a raspberry pi3 to play the urban terror

Are there specific instructions/commands to run a mod/standalone game with q3lite?

i tried to launch the game from latest raspbian lite with this command ./quake3.armv7l +set com_hunkMegs 320 +set fs_game q3ut4 (where the q3ut4 folder is the urban terror v4 game)
it worked i loaded the first map but i had artifacts on screen and the mouse was not working correct the whole game was not responding.
are there any extra commands to add to the /quake3.armv7l to make it work correct>?
i compiled the game engine following the normal instructions here
Thanks

Can't not type words at 'Talk' funsion

Hello.
Thanks for your project. I am using raspberry pi 3 for this game and so nice!

But however, I could not type something at the funsion --> talk, when I tick 'T' at my keyboard, and I see a 'say: ' on the screen. But I cannot talk everything,
Please fix.
Thanks again.

q3a-server guide

Hi,

Great work guys. I love seeing these types of projects for the RasPi.

I previously published a quick guide for setting up a Q3A server. It is well suited for the RasPi and other low-power systems. Perhaps you would be interested in adding a link to the repo or using the config files for your own project?

Cheers!

Servers

I was wondering is q3lite clients and servers compatible with regular q3 clients?

Compiling fails under Raspberry Pi OS Bullseye

I used this tutorial https://pimylifeup.com/raspberry-pi-quake-3/

  • Under Buster Lite it succeeds.
  • Under Bullseye Lite it fails:

REF_CC code/renderergles1/tr_animation.c
In file included from code/renderergles1/../renderercommon/qgl.h:38,
from code/renderergles1/../renderercommon/tr_common.h:34,
from code/renderergles1/tr_local.h:38,
from code/renderergles1/tr_animation.c:30:
code/SDL2/include/SDL_opengles.h:33:10: fatal error: GLES/gl.h: No such file or directory
33 | #include <GLES/gl.h>
| ^~~~~~~~~~~
compilation terminated.

can't compile on linux

install: no se puede efectuar `stat' sobre 'build/release-linux-x86_64/quake3.x86_64': No existe el archivo o el directorio

2D objects invisible when VC4 driver used on Raspberry Pi

The VC4 driver for Raspberry Pi allows use of Mesa instead of Broadcom-specific GL APIs.

Firstly, Q3lite runs normally and as expected with the default Broadcom GL libraries. But I wanted to run Q3lite with the VC4 driver, so I did this by first configuring my system to use VC4, then modifying the Makefile like so:

diff --git a/Makefile.q3lite b/Makefile.q3lite
index bd7929a..4101d0c 100644
--- a/Makefile.q3lite
+++ b/Makefile.q3lite
@@ -140,15 +140,16 @@ endif
     PI_CFLAGS=-march=armv8-a+crc -mfpu=vfpv4 -mtune=cortex-a53
   endif
   CFLAGS += -DHAVE_GLES $(PI_CFLAGS) -mfloat-abi=hard -Ofast -I/opt/vc/include
-  ifneq ($(wildcard /opt/vc/lib/libbrcmEGL.so),)
-    ifneq ($(wildcard /opt/vc/lib/libbrcmGLESv2.so),)
-      LDFLAGS += -L/opt/vc/lib -lbrcmEGL -lbrcmGLESv2
-    else
-      LDFLAGS += -L/opt/vc/lib -lEGL -lGLESv2
-    endif
-  else
-    LDFLAGS += -L/opt/vc/lib -lEGL -lGLESv2
-  endif
+  LDFLAGS += -lEGL -lGLESv2 -lGL
 
 endif #ifneq ($(PLATFORM_TYPE),)

Exactly how correct this approach was I'm unsure (having no GL experience whatsoever) but it at least compiled.

I ran it within an X11 session with the following parameters:

./quake3.armv7l \
  +set com_hunkMegs 192 \
  +set com_zoneMegs 24 \
  +set com_soundMegs 16 \
  +set vm_ui 2 \
  +set vm_cgame 2 \
  +set com_introplayed 1 \
  +set com_protocol 68 \
  +map q3dm1 \
  +set r_mode -1 \
  +set r_customwidth 1024 \
  +set r_customheight 768 \
  +set r_fullscreen 0

The game started, and I could see the map and walk around, but all 2D things were missing from the display, like my crosshair, health status, and the pull-down console.

I ran the game through apitrace and noticed the following errors:

99138: message: major api error 1: GL_INVALID_OPERATION in unsupported function called (unsupported extension or deprecated function?)
99138 @0 glOrthof(left = 0, right = 1920, bottom = 1080, top = 0, zNear = 0, zFar = 1)
99138: warning: glGetError(glOrthof) = GL_INVALID_OPERATION

According to the documentation, it appears the glOrthof() function doesn't exist in OpenGL ES 2.0, and hence not Mesa, but for some reason is included in the Broadcom ES 2.0 library anyway:

grep --files-with-matches glOrthof /opt/vc/lib/libbrcmGLESv2.so /lib/libGLESv2.so
/opt/vc/lib/libbrcmGLESv2.so

grep --files-without-match glOrthof /opt/vc/lib/libbrcmGLESv2.so /lib/libGLESv2.so
/lib/libGLESv2.so

I've attached the apitrace file. I'm not sure how portable this file is, but it reproduces the graphical issue nicely on my laptop with Intel graphics:

quake3.invisible.trace.gz

As VC4 is the long-term future of graphics on the Raspberry Pi, using more standard components of the Linux graphics stack (Mesa, DRM, KMS), it will be good to get Q3lite working in this situation.

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.