Giter VIP home page Giter VIP logo

qurp's Introduction

welford

github notes and stuff

qurp's People

Contributors

johannesl avatar kramble avatar ndo360 avatar welford 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

qurp's Issues

Compilation errors for PI3B on Raspbian Buster (lite)

In file included from /src/qurp/WinQuake/quakedef.h:263, from /src/qurp/WinQuake/cl_input.c:25: /src/qurp/WinQuake/glquake.h:32:10: fatal error: GLES2/gl2.h: No such file or directory #include <GLES2/gl2.h> ^~~~~~~~~~~~~

Resolved by: sudo apt-get install libgles2-mesa-dev.

/src/qurp/WinQuake/platform.pi.c:6:10: fatal error: bcm_host.h: No such file or directory #include <bcm_host.h> ^~~~~~~~~~~~
Not yet resolved properly. Many more follow afterwards. The include path(s) seem to be set correctly, bcm_host.h is indeed found in one of those paths, but somehow the compiler does not find it.

I will continue to investigate how to properly fix these.

Try half floats for vertex data.

It looks like the raspberry pi supports this opengl es extension. it would mean we get away sending half the amount of vertex data we currently do and could potentially improve performance. Providing we aren't cpu bound or converting the float data on the fly makes us so.

mouse input

Current version has no support for the mouse.

Weird Bug on Raspberry Pi 1

Hello welford,
I built the qurp project on my raspberry pi 1 (Model B) and was running into some issues. The entire building process worked fine without any errors, but when I try and launch the game, it freaks out and doesn't render the world properly. It's really hard to explain stuff like this through text, so I uploaded this unlisted video to YouTube to show what I mean:

https://youtu.be/zcCcejf1Ib8

I hope you can do something with this information, because I'd love to use your sourceport on the pi :)

OGG/MP3 music support, please?

Hi, welford! And thanks for this Rpi-optimized port of the best Quake game in history! (IMHO) 👍

Could you please add OGG/MP3 music support, please? As you may know, one of Quake's strenght was the music by Trent Reznor, it gave SO much atmosphere to the game!
Efen WAV/FLAC would be right. Whatever music format is better for you.

Thanks!

Console commands not recognized, config.txt not created or edited

Hi,
on my RPi 3 Qurp does not save any option 'cause of missing config.txt.
Even if I create new config.txt file in ID1 folder, still Qurp does not save settings.
Also a lot of console commands are not recognized and it seems there is no way to save the display mode selected with "-width" and "-height" options in CLI.
Thanks

Compiling on Raspbian Stretch

Pre-requisites to add to the readme:
libgegl-dev
libgles2-mesa-dev

Though I notice we're compiling for armv6, perhaps the code could detect when we're using a Pi 3 and compile for armv7 ?

Error when attempting to build...

I get an error stating that recipe for target 'debugarm/bin/glquake' failed
***[debugarm/bin/glquake] Error 1
Any help? I tried using both options to build.

Doesn't compile - Raspbian Jessie

pi@raspberrypi:~/halflife/qurp/WinQuake $ ./build.sh release_gl


Start Make



Release GL Build :
targets : /bin/glquake
build dir : releasearm
mount dir : /home/pi/halflife/qurp/WinQuake


make -f make.rpi targets BUILDDIR=releasearm CFLAGS="-Dstricmp=strcasecmp -march=armv6 -mfpu=vfp -mfloat-abi=hard -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -DUSE_HALF_FLOATS=1 -mfp16-format=alternative -march=armv6 -mfpu=vfp -mfloat-abi=hard -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -DRELEASE_BUILD=1"
make[1]: Entering directory '/home/pi/halflife/qurp/WinQuake'
gcc -Dstricmp=strcasecmp -march=armv6 -mfpu=vfp -mfloat-abi=hard -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -DUSE_HALF_FLOATS=1 -mfp16-format=alternative -march=armv6 -mfpu=vfp -mfloat-abi=hard -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -DRELEASE_BUILD=1 -DGLQUAKE -DUSE_GLES -o releasearm/glquake/platform.pi.o -c /home/pi/halflife/qurp/WinQuake/platform.pi.c
gcc -Dstricmp=strcasecmp -march=armv6 -mfpu=vfp -mfloat-abi=hard -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -DUSE_HALF_FLOATS=1 -mfp16-format=alternative -march=armv6 -mfpu=vfp -mfloat-abi=hard -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -DRELEASE_BUILD=1 -DGLQUAKE -DUSE_GLES -o releasearm/glquake/modern_gles_port.o -c /home/pi/halflife/qurp/WinQuake/modern_gles_port.c
gcc -Dstricmp=strcasecmp -march=armv6 -mfpu=vfp -mfloat-abi=hard -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -DUSE_HALF_FLOATS=1 -mfp16-format=alternative -march=armv6 -mfpu=vfp -mfloat-abi=hard -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -DRELEASE_BUILD=1 -DGLQUAKE -DUSE_GLES -o releasearm/glquake/shader_gles.o -c /home/pi/halflife/qurp/WinQuake/shader_gles.c
gcc -Dstricmp=strcasecmp -march=armv6 -mfpu=vfp -mfloat-abi=hard -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -DUSE_HALF_FLOATS=1 -mfp16-format=alternative -march=armv6 -mfpu=vfp -mfloat-abi=hard -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -DRELEASE_BUILD=1 -DGLQUAKE -DUSE_GLES -o releasearm/glquake/transforms.o -c /home/pi/halflife/qurp/WinQuake/transforms.c
In file included from /usr/include/stdlib.h:42:0,
from /home/pi/halflife/qurp/WinQuake/shader_gles.c:4:
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:79:15: error: duplicate member ‘__w_retcode’
unsigned int __w_retcode:8;
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:80:15: error: duplicate member ‘__w_coredump’
unsigned int __w_coredump:1;
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:81:15: error: duplicate member ‘__w_termsig’
unsigned int __w_termsig:7;
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:93:15: error: duplicate member ‘__w_stopsig’
unsigned int __w_stopsig:8; /* Stopping signal. /
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:94:15: error: duplicate member ‘__w_stopval’
unsigned int __w_stopval:8; /
W_STOPPED if stopped. /
^
In file included from /usr/include/stdlib.h:42:0,
from /home/pi/halflife/qurp/WinQuake/platform.pi.c:5:
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:79:15: error: duplicate member ‘__w_retcode’
unsigned int __w_retcode:8;
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:80:15: error: duplicate member ‘__w_coredump’
unsigned int __w_coredump:1;
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:81:15: error: duplicate member ‘__w_termsig’
unsigned int __w_termsig:7;
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:93:15: error: duplicate member ‘__w_stopsig’
unsigned int __w_stopsig:8; /
Stopping signal. /
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:94:15: error: duplicate member ‘__w_stopval’
unsigned int __w_stopval:8; /
W_STOPPED if stopped. /
^
make.rpi:683: recipe for target 'releasearm/glquake/shader_gles.o' failed
make[1]: *** [releasearm/glquake/shader_gles.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /usr/include/stdlib.h:42:0,
from /home/pi/halflife/qurp/WinQuake/quakedef.h:46,
from /home/pi/halflife/qurp/WinQuake/transforms.c:3:
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:79:15: error: duplicate member ‘__w_retcode’
unsigned int __w_retcode:8;
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:80:15: error: duplicate member ‘__w_coredump’
unsigned int __w_coredump:1;
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:81:15: error: duplicate member ‘__w_termsig’
unsigned int __w_termsig:7;
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:93:15: error: duplicate member ‘__w_stopsig’
unsigned int __w_stopsig:8; /
Stopping signal. /
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:94:15: error: duplicate member ‘__w_stopval’
unsigned int __w_stopval:8; /
W_STOPPED if stopped. /
^
In file included from /opt/vc/include/interface/vcos/vcos.h:118:0,
from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
from /opt/vc/include/bcm_host.h:50,
from /home/pi/halflife/qurp/WinQuake/platform.pi.c:6:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ‘vcos_semaphore_wait’:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:254:42: error: ‘errno’ undeclared (first use in this function)
while ((ret = sem_wait(sem)) == -1 && errno == EINTR)
^
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:254:42: note: each undeclared identifier is reported only once for each function it appears in
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:254:51: error: ‘EINTR’ undeclared (first use in this function)
while ((ret = sem_wait(sem)) == -1 && errno == EINTR)
^
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ‘vcos_semaphore_trywait’:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:263:45: error: ‘errno’ undeclared (first use in this function)
while ((ret = sem_trywait(sem)) == -1 && errno == EINTR)
^
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:263:54: error: ‘EINTR’ undeclared (first use in this function)
while ((ret = sem_trywait(sem)) == -1 && errno == EINTR)
^
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:267:22: error: ‘EAGAIN’ undeclared (first use in this function)
else if (errno == EAGAIN)
^
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ‘vcos_semaphore_wait_timeout’:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:311:14: error: ‘errno’ undeclared (first use in this function)
if (errno == EINTR) {
^
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:311:23: error: ‘EINTR’ undeclared (first use in this function)
if (errno == EINTR) {
^
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:313:30: error: ‘ETIMEDOUT’ undeclared (first use in this function)
} else if (errno == ETIMEDOUT) {
^
In file included from /usr/include/stdlib.h:42:0,
from /home/pi/halflife/qurp/WinQuake/quakedef.h:46,
from /home/pi/halflife/qurp/WinQuake/quake_shaders.h:2,
from /home/pi/halflife/qurp/WinQuake/modern_gles_port.c:17:
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:79:15: error: duplicate member ‘__w_retcode’
unsigned int __w_retcode:8;
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:80:15: error: duplicate member ‘__w_coredump’
unsigned int __w_coredump:1;
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:81:15: error: duplicate member ‘__w_termsig’
unsigned int __w_termsig:7;
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:93:15: error: duplicate member ‘__w_stopsig’
unsigned int __w_stopsig:8; /
Stopping signal. /
^
/usr/include/arm-linux-gnueabihf/bits/waitstatus.h:94:15: error: duplicate member ‘__w_stopval’
unsigned int __w_stopval:8; /
W_STOPPED if stopped. */
^
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ‘vcos_event_wait’:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:593:50: error: ‘errno’ undeclared (first use in this function)
while ((ret = sem_wait(&event->sem)) == -1 && errno == EINTR)
^
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:593:59: error: ‘EINTR’ undeclared (first use in this function)
while ((ret = sem_wait(&event->sem)) == -1 && errno == EINTR)
^
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ‘vcos_event_try’:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:603:53: error: ‘errno’ undeclared (first use in this function)
while ((ret = sem_trywait(&event->sem)) == -1 && errno == EINTR)
^
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:603:62: error: ‘EINTR’ undeclared (first use in this function)
while ((ret = sem_trywait(&event->sem)) == -1 && errno == EINTR)
^
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:606:30: error: ‘EAGAIN’ undeclared (first use in this function)
if (ret == -1 && errno == EAGAIN)
^
make.rpi:685: recipe for target 'releasearm/glquake/transforms.o' failed
make[1]: *** [releasearm/glquake/transforms.o] Error 1
make.rpi:689: recipe for target 'releasearm/glquake/platform.pi.o' failed
make[1]: *** [releasearm/glquake/platform.pi.o] Error 1
make.rpi:681: recipe for target 'releasearm/glquake/modern_gles_port.o' failed
make[1]: *** [releasearm/glquake/modern_gles_port.o] Error 1
make[1]: Leaving directory '/home/pi/halflife/qurp/WinQuake'
make.rpi:75: recipe for target 'release_gl' failed
make: *** [release_gl] Error 2

Compilation error EGL_DISPMANX_WINDOW_T

pi@raspberrypi:~/quake/qurp/WinQuake $ ./build.sh release_gl
- - - - - - - - - - - - - - - 
Start Make
- - - - - - - - - - - - - - - 
- - - - - - - - - - - - - - - - - - 
Release GL Build : 
	targets : /bin/glquake
	build dir : releasearm
	mount dir : /home/pi/quake/qurp/WinQuake
- - - - - - - - - - - - - - - - - - 
make -f make.rpi targets_gl BUILDDIR=releasearm CFLAGS="-Dstricmp=strcasecmp --sysroot=/ -I=/usr/include -I=/opt/vc/include -I=/opt/vc/include/interface/vcos/pthreads -I=/opt/vc/include/interface/vmcs_host/linux  -DUSE_HALF_FLOATS=1 -mfp16-format=alternative -march=armv6 -mfpu=vfp -mfloat-abi=hard -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -DRELEASE_BUILD=1 -DGLQUAKE -DUSE_GLES"
make[1]: Entering directory '/home/pi/quake/qurp/WinQuake'
gcc -Dstricmp=strcasecmp --sysroot=/ -I=/usr/include -I=/opt/vc/include -I=/opt/vc/include/interface/vcos/pthreads -I=/opt/vc/include/interface/vmcs_host/linux  -DUSE_HALF_FLOATS=1 -mfp16-format=alternative -march=armv6 -mfpu=vfp -mfloat-abi=hard -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -DRELEASE_BUILD=1 -DGLQUAKE -DUSE_GLES  -o /home/pi/quake/qurp/WinQuake/releasearm/platform.pi.o -c /home/pi/quake/qurp/WinQuake/platform.pi.c
gcc -Dstricmp=strcasecmp --sysroot=/ -I=/usr/include -I=/opt/vc/include -I=/opt/vc/include/interface/vcos/pthreads -I=/opt/vc/include/interface/vmcs_host/linux  -DUSE_HALF_FLOATS=1 -mfp16-format=alternative -march=armv6 -mfpu=vfp -mfloat-abi=hard -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -DRELEASE_BUILD=1 -DGLQUAKE -DUSE_GLES  -o /home/pi/quake/qurp/WinQuake/releasearm/vector.o -c /home/pi/quake/qurp/WinQuake/vector.c
gcc -Dstricmp=strcasecmp --sysroot=/ -I=/usr/include -I=/opt/vc/include -I=/opt/vc/include/interface/vcos/pthreads -I=/opt/vc/include/interface/vmcs_host/linux  -DUSE_HALF_FLOATS=1 -mfp16-format=alternative -march=armv6 -mfpu=vfp -mfloat-abi=hard -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -DRELEASE_BUILD=1 -DGLQUAKE -DUSE_GLES  -o /home/pi/quake/qurp/WinQuake/releasearm/matrix.o -c /home/pi/quake/qurp/WinQuake/matrix.c
gcc -Dstricmp=strcasecmp --sysroot=/ -I=/usr/include -I=/opt/vc/include -I=/opt/vc/include/interface/vcos/pthreads -I=/opt/vc/include/interface/vmcs_host/linux  -DUSE_HALF_FLOATS=1 -mfp16-format=alternative -march=armv6 -mfpu=vfp -mfloat-abi=hard -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -DRELEASE_BUILD=1 -DGLQUAKE -DUSE_GLES  -o /home/pi/quake/qurp/WinQuake/releasearm/transforms.o -c /home/pi/quake/qurp/WinQuake/transforms.c
/home/pi/quake/qurp/WinQuake/platform.pi.c:35:2: error: unknown type name ‘EGL_DISPMANX_WINDOW_T’
   35 |  EGL_DISPMANX_WINDOW_T nativewindow;
      |  ^~~~~~~~~~~~~~~~~~~~~
/home/pi/quake/qurp/WinQuake/platform.pi.c: In function ‘InitialisePlatformGfx’:
/home/pi/quake/qurp/WinQuake/platform.pi.c:285:22: error: request for member ‘element’ in something not a structure or union
  285 |  pState->nativewindow.element = dispman_element;
      |                      ^
/home/pi/quake/qurp/WinQuake/platform.pi.c:286:22: error: request for member ‘width’ in something not a structure or union
  286 |  pState->nativewindow.width = width;   //should be the same as the src resolution before the shift
      |                      ^
/home/pi/quake/qurp/WinQuake/platform.pi.c:287:22: error: request for member ‘height’ in something not a structure or union
  287 |  pState->nativewindow.height = height;
      |                      ^
/home/pi/quake/qurp/WinQuake/platform.pi.c:311:68: warning: passing argument 3 of ‘eglCreateWindowSurface’ makes integer from pointer without a cast [-Wint-conversion]
  311 |  pState->surface = eglCreateWindowSurface(pState->display, config, &pState->nativewindow, NULL);
      |                                                                    ^~~~~~~~~~~~~~~~~~~~~
      |                                                                    |
      |                                                                    int *
In file included from /home/pi/quake/qurp/WinQuake/platform.pi.c:7:
/usr/include/EGL/egl.h:155:109: note: expected ‘EGLNativeWindowType’ {aka ‘long unsigned int’} but argument is of type ‘int *’
  155 | EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
      |                                                                                         ~~~~~~~~~~~~~~~~~~~~^~~
make[1]: *** [make.rpi:220: /home/pi/quake/qurp/WinQuake/releasearm/platform.pi.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/pi/quake/qurp/WinQuake'
make: *** [make.rpi:76: release_gl] Error 2




I have Raspberry Pi 1 B (first rpi)
For some reason, when compiling at the very end, it gives an error:
platform.pi.c EGL_DISPMANX_WINDOW_T unknown type name

keyboard events

I have a possible fix for the keyboard events propagating to the shell
ioctl (pState->kb_input0, EVIOCGRAB, (void*)1);
see https://github.com/kramble/qurp/blob/master/WinQuake/platform.pi.c#L244

Not quite sure of the calling convention, some examples pass a pointer to an int vis
int grab = 1;
ioctl (pState->kb_input0, EVIOCGRAB, &grab);
Which sort-of makes sense, but the one I've used does work.
... ah, just looked at the linux driver evdev.c - it just uses the arg pointer as a flag, so ignore this, I was right the first time.

Unfortunately this breaks Control-C (SIGINT) handling (it just does nothing). Sigh.

Fast Quake SDL like retropie ?

Hello,

I would like to ask if it would work without having to use the OPENGL library, and actually a bit like retropie does (retroarch lib).

Would you think that dev could go a bit in this direction? Likely all directions, dev, go on superbe graphics, shadows, superbe magic effects,... but won't work on perfs. of a pi.

SIncerely / best regards,

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.