Doom 3 on Raspberry Pi


6 posts
by thinkbrown » Mon Jan 21, 2013 9:08 pm
There have been a few threads about this, but none of them ever got anywhere. From what I can tell running Doom3 at a medium resolution should be possible on the 512MB version of the RPi (memory limitations for maps), but I'm having a lot of trouble getting it to compile.

I checked out the Dante port of Doom3 (already has an OpenGL ES2.0 renderer written), but I haven't gotten it to compile yet. I've tweaked the SConstruct file with a Raspberry Pi compile option, and I've started hunting down what headers need to be included, but I'm a bit stuck right now.

Compile errors follow:
Code: Select all
scons: Reading SConscript files ...
Command line: NOCURL='1'
Command line: TARGET_D3XP='0'
Command line: BUILD='release'
Command line: ARCH='armv6j'
Command line: BASEFLAGS='-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads'
Command line: TARGET_RASPI='1'
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/release/core build/release/game
g++ -o build/release/game/game/AF.os -c -fPIC -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -pipe -Wall -Wno-sign-compare -Wno-unknown-pragmas -Wno-psabi -fmessage-length=0 -fpermissive -fvisibility=hidden -O3 -marm -march=armv6j -mfpu=vfp -mfloat-abi=hard -ffast-math -fno-unsafe-math-optimizations -fomit-frame-pointer -fno-strict-aliasing -DGAME_DLL game/AF.cpp
In file included from /opt/vc/include/interface/vcos/vcos.h:116:0,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from game/../idlib/../renderer/qgl.h:44,
                 from game/../idlib/precompiled.h:144,
                 from game/AF.cpp:29:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ‘void vcos_event_signal(VCOS_EVENT_T*)’:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:524:8: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ‘int vcos_strcasecmp(const char*, const char*)’:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:585:27: error: ‘use_idStr_Icmp’ was not declared in this scope
In file included from /opt/vc/include/interface/vcos/vcos.h:143:0,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from game/../idlib/../renderer/qgl.h:44,
                 from game/../idlib/precompiled.h:144,
                 from game/AF.cpp:29:
/opt/vc/include/interface/vcos/vcos_string.h: In function ‘int vcos_strncmp(const char*, const char*, size_t)’:
/opt/vc/include/interface/vcos/vcos_string.h:109:94: error: ‘use_idStr_Cmpn’ was not declared in this scope
game/AF.cpp: In member function ‘bool idAF::LoadConstraint(const idDeclAF_Constraint*)’:
game/AF.cpp:674:9: warning: enumeration value ‘DECLAF_CONSTRAINT_INVALID’ not handled in switch [-Wswitch]
game/AF.cpp: In member function ‘bool idAF::Load(idEntity*, const char*)’:
game/AF.cpp:964:58: warning: comparison between ‘enum declAFConstraintType_t’ and ‘enum constraintType_t’ [-Wenum-compare]
game/../idlib/../game/Game_local.h: At global scope:
game/../idlib/../game/Game_local.h:116:11: warning: ‘NUM_RENDER_PORTAL_BITS’ defined but not used [-Wunused-variable]
game/../idlib/../game/Game_local.h:720:11: warning: ‘CINEMATIC_SKIP_DELAY’ defined but not used [-Wunused-variable]
game/../idlib/../game/Player.h:69:11: warning: ‘ASYNC_PLAYER_INV_AMMO_BITS’ defined but not used [-Wunused-variable]
scons: *** [build/release/game/game/AF.os] Error 1
scons: building terminated because of errors.


Now the primary issue I'm working on figuring out is the use_idStr_Icmp error.
Code: Select all
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ‘int vcos_strcasecmp(const char*, const char*)’:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:585:27: error: ‘use_idStr_Icmp’ was not declared in this scope


The only place in the source tree that references it is neo/idlib/Str.h (https://github.com/omcfadde/dante/blob/ ... dlib/Str.h). I'm not much of a coder and I've no clue what that series of definitions does, but I'd love to get further into this. If anybody feels like having a crack at this, or just pointing me in the right direction, I'd be immensely grateful.
Posts: 14
Joined: Sun Nov 06, 2011 12:48 pm
by thinkbrown » Tue Jan 22, 2013 2:39 pm
Got an initial build, but it's still trying to call to DRI. I'm going to tweak it further.
Posts: 14
Joined: Sun Nov 06, 2011 12:48 pm
by thommoboy » Sat Jun 22, 2013 9:21 am
can you pe me your Scons compile file?
Posts: 1
Joined: Sat Jun 22, 2013 9:11 am
by Museste » Tue Jun 25, 2013 9:15 am
Doom 3 on a pi, that would be jaw dropping stuff
Posts: 31
Joined: Sun May 19, 2013 5:58 am
Location: Christchurch NZ
by thinkbrown » Tue Jun 25, 2013 12:43 pm
I'm fairly sure that the GPU is strong enough, but some of the assets might need to be modified to work with the limited RAM. I'm still running a 256 model, so If I ever get the chance to work on it, I'll almost certainly need to buy a 512 model.
Posts: 14
Joined: Sun Nov 06, 2011 12:48 pm
by thinkbrown » Tue Jun 25, 2013 8:49 pm
I forgot that I'd created a fork of Dante (Doom 3 with GLES renderer) on github. It contains my modified SConstruct and the added system files (a direct copy of the Linux files right now).

Find it here: https://github.com/thinkbrown/dante

If anybody knows anything about OpenGLES and wants to help, let me know.
Posts: 14
Joined: Sun Nov 06, 2011 12:48 pm