Resource icon

QuakeDS 271007 r3

This is the home of the homebrew port of Quake - the hit first-person shooter from 1996 - to the Nintendo DS handheld system.

Due to the limitations of the system, this port has taken a whole lot longer than it should have! Here's why:
the original game required somewhere between ten and twelve megabytes of RAM, including the loading of the program into memory. The DS has just four megabytes of general-purpose memory - not cool. the original game was software-rendered, something which requires a decent amount of computational power, something the DS doesn't have. the original game required a math co-processor (also known as an FPU). Neither processor in the DS has an FPU so all floating-point operations must be emulated, which is very slow.

But here's why there should be a QuakeDS:
the game runs on, like, every other platform in the entire world, right? the DS has hardware which can accelerate 3D graphics. the DS has a wireless interface built in - anyone for DS-DS deathmatches?

Current Status, as of 27/10/07

The game:
-the program, working state and game data have been squeezed into the four megabytes of main memory
-it requires either shareware or commercial pak files, Amiga and PC paks have been successfully used
-many total conversions and mods should work with a stock DS, assuming they respect the tiny memory size
-total conversion and mods which refuse to play on a stock DS will play on a DS with a compatible flash card when combined with the EXRAM build
-infrastructure-based wifi network gaming is supported
ad-hoc DS/DS gaming is currently de-activated in this version
-there is full control configuration
-game saves work, although there may be some corruption using certain DLDI drivers - game saving is not guaranteed to work correctly in the EXRAM build (when used with a slot-2 DLDI)
-there's a crosshair
-there's view snapping and pen sensitivity settings
-there is a proper timebase, so the speed won't be inconsistent any more like it was in pre1
-there's an on-screen keyboard, for use in-game and with the console, and it is much more functional than before
-there are eight user-bindable 'touch buttons'
-access to the command line is now easier
-dodgy QuakeC compatibility has been improved

-all software renderering has been moved over to using the DS' 3D hardware
-world textures are display 99% correctly, there may the occasional non-power-of-two texture wrapping glitch; --- Alias models are fully textured
-sprites (eg explosions) are now correctly rendered, and they now have their correct animated textures (ie they're not pink any more!)
-particles (eg blood effects) are also correctly rendered, and also come in a shade other than pink
-animated model skins are now (barely) supported
-the game uses faux vertex lighting, derived from the original lightmaps; light animations also work correctly
-there's no dynamic lighting and Alias models are not lit
-there are sky, water, sludge, lava and teleporter animations (the sky is now rendered correctly)
-the console now uses the Quake font from the chosen pak files
-the game uses hardware fogging for a light depth cue above ground, thick fog for below water
-there's a HUD
-GUI elements are transparent (with no more corruption)

-there's a full-blown custom ARM7 sound effects system, and it totally r0x0rs
-the sound system uses proper spatial positioning (it is stereo though...) - plug it into your speakers and subwoofer to hear all the effort I put into this!
-CD music has been dropped from this may return

Tech info:
-uses the libfat DLDI interface, so should hopefully work on all supported flash cards
-built using the devkitARM r20 toolchain
-textures and sounds are loaded from disk on demand - you will notice slow loading if you have certain types of cards, or low quality flash cards
-sound and texture memory is defragged in the background
-in-game performance has been improved but is still not hot, and I think this is as good as it's going to get
rendering performance is very good (pause the game and move the camera if you don't believe me)
-performance is timed using a custom function-instrumenting profiler (a bit like gprof) and another system is used for recording the exact pad and screen input for later replaying
-the DS is put to sleep when the lid closes (disabled in this build)
-there is no texturing on brush or Alias models or images loaded from individual files - you must use pak files


How to play

How to start the game has not changed - if you've played before, just replace the executable with a new one.

This mini-guide assumes that you are familar with the process of running homebrew on your Nintendo DS. If you don't know how to run NDS homebrew, look online for the answer...

You need Quake's data files. If you own a copy, that's cool - you'll have full access to the game. If not, then you can download the shareware version of Quake (for DOS) from id's site. This will only allow you to play the levels from the first episode. If you want to play the full game, buy a copy - don't ask me (or others) where you can get these files.

You cannot use total conversions or mods with the shareware data files.

In the root of your flash card, make a directory named id1
If you're using the shareware version, copy pak0.pak from that archive into the id1 directory that you just created. If you're using a commerical version, copy pak0.pak AND pak1.pak into that directory

You need a config file to tell the game how buttons are set up, etc. I know that my config file works, so download that from filetrip and save it into the id1 directory.

Visit Chishm's DLDI page (above) and download the DLDI driver file which corresponds to your NDS booting method. Download the QuakeDS binary package above, and extract the NDS file into the root of your flash card. You now need to patch that program so that it will be able to access the files on your card. For example, on my GBA Movie Player (CF) I download the file named 'mpcf.dldi' from Chishm's page. I then run 'dlditool mpcf.dldi k:\QuakeDS.nds' - note K: is the volume where my Compact Flash card is mounted, yours will likely differ

Now do what you've gotta do to make an NDS start on your card. For example, on my GBA Movie Player, I need to rename K:\QuakeDS.nds to K:\_boot_mp.nds
Put the card in your booting hardware and turn on your DS!



The game includes full control customisation, accessible from the usual place in the menu. However, the default settings provided from the Quake pak files aren't too enjoyable when using them on the DS, so feel free to use my config file.
Don't forget that after making changes to the settings, you must use the 'SAVE SETTINGS' option to actually save your settings to disk. Quake would normally do this when you quit, but you don't really use the quit option on the DS! I may put in an auto-save option...

Current controls:
touching the screen changes the camera view - sensitivity and mouse invert can be chosen from the config menu too
using the D-pad emulates the WSAD control method, so use up and down to move forward and backward, left and right to strafe left and right
START is bound to escape, so this will bring up/hide the menu
SELECT is bound to enter, so can be used to select entries in the menu...and also jump
X/Y are weapon cycle up/down
L is fire
R is jump
A is bound to the on-screen keyboard, press again for touch buttons
The config menu also contains DS specific options:
switch screens - for if you'd like to have the 3D view on the bottom screen
antialias - turns line antialiasing on and off - not too noticable...
wireframe overlay - for if you'd like to see brush models drawn with a wireframe overlay
fog - this turns fogging on and off; there is a light fog when above ground, a thick fog when below water
lookspring - turning it off will replicate the behaviour present in GLQuake, causing the view to not snap back to 'flat' when you take a few steps without touching the screen. Leaving it on will replicate the proper Quake behaviour.
There are more options available in the config file:
ds_screen_clears (0/1) - if you're trying to get some mod/total conversion to work and you'd like to see the warning/error messages, but they're cleared too quickly, set this cvar to zero
ds_fog_red/green/blue (0..255) - this will change the fogging colour
ds_alias_imposter (0/1) - if zero, then the model will only be rendered once its texture has been loaded (models may disappear for a second when gibbed); if one, a white texture will be shown on the model whilst the correct texture is loading
ds_brush_imposter (0/1) - if zero, brush models (eg the world, health packs) will only be drawn once the texture has loaded, else it will be drawn a shade of grey
ds_draw_imposter (0/1) - if zero, gui elements (eg ammo counts, the menus) will only be drawn once the texture has loaded, else it will be drawn white
ds_turb_transparency (0..31) - this is used to make 'turb' brush models transparent - you should only use this with VIS'ed maps, or with the r_novis hack (not recommended). Disable the effect by setting this to 31.

Transparent water

Quake does not natively support transparent stuff due to the way the maps are built. However there have been patches to Quake to allow you to get transparent water (and sludge, teleporters, lava etc) over the years, and I've added support for this to QuakeDS.
Read here if you want details of the regular Quake way, as most of the details apply.
To summarise, there seem to be two ways to do it:
You can use the r_novis variable: set it to one, rather than the default zero. This will disable all visibility checking in the renderer, and everything will be rendered - this will probably cripple the perofmrnace of your DS and you'll most likely get graphical errors as it greatly exceeds the DS' per-frame polygon limit. This is the easiest way, but is not recommended.
The second way is to reVIS or get VIS'ed maps (or their patches). You can either do this yourself or get patches to adjust your pak files. This is definately the recommended way to do it.
Once you've done this, to get Quake to render stuff with transparency, adjust the ds_turb_transparency variable in the range of 0-30. Zero means invisible water, 30 means pretty much opaque. If you set it to 31 you'll disable transparency all together - this is the default.

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @realtimesave, Hey :)