Instructions for running cube
Install, and run the cube.bat. Needs a decent & compliant OpenGL implementation. before you do, you may want to look at the config which is in "autoexec.cfg" and which should be fairly familiar if you ever played a quake style game. If you want to rebind your keys, see the "bind" command below. press ESC to go into the menu with many useful commands. Cube derives its simplicity from some rather brute force rendering methods, and as such it needs a beefy machine to get good visual quality. It runs best with "vertical sync" OFF and at high refresh rates (you may get excessive LOD/FPS variance otherwise).
Command line options
-d runs a dedicated server -l runs a non-dedicated server that listens for other clients Default is a non-dedicated server with only a single client. Dedicated servers run in the shell only (no graphics), with increased priority yet use very little cpu time & memory, so you can run one in the background, or at the same time with a client if you want to host a game (which is usually better than using a listen server). Cube servers need to be restarted every 3 weeks, otherwise atleast one game will not have correct timing. Server port is fixed at 28765, currently. Use Ctrl-C to quit a dedicated server. -wX sets desired screen width to X, default is -w640 -hY sets desired screen height to Y, default is -h480 -t (test) runs windowed and without SDL parachute
General console commands and configuration
        bind K A
binds key K to commands A. You may put A in "" and use ; to put multiple commands in one. To find out what key names and their default bindings are, look at data/keymap.cfg, then add bind commands to your autoexec.cfg.
        alias N A
binds name N to commands A, after which you can use N as a shortcut for A. You may re-bind N as often as you like, and bind N again within the execution of A etc. Aliases are only executed on key-press, not release.
        quit
quits without asking.
        forward / backward / left / right
move you in said direction (defaults to cursor keys).
        attack
fires the current weapon. default = left mouse
        jump
triggers a jump. default key space & right mouse.
        invmouse B
sets mouse to "flight sim" mode if B is not 0
        sensitivity S
sets mouse sensitivity (default = 10). should be a similar number to quake.
        fov N
sets your FOV to 10..120.
        fpsrange L H
sets the desired fps you want between L and H, defaults to 30-40 which is most sensible. Do not set to silly high values as this has a very bad effect on your visuals: the engine tries to reach your desired fps at all costs, by reducing the LOD factor (the higher the LOD, the better visual quality, currently bounded between 25 & 250). because fps doesn't fluctuate as much like in other engines, 30-40 is already very smooth. check the HUD, if the LOD is locked at the minimum specified by minlod, you will need lower fps if you want less popup.
        minlod N
Sets the minimum LOD factor can take. The higher you set this, the more guaranteed visual quality you will get, but the bigger dips in fps you must endure on slow hardware or slow maps. Setting N to a low value will effectively let fpsrange determine what LOD you will get. Tradeof of LOD vs fps is not linear, you'll have to experiment to find the sweet spot. On most hardware it pays of to have N relatively high, as the fps gain by setting it very low is neglible. Too high only has an effect on big or very detailed maps. Note that while tuning minlod/fpsrange, also take into account the resolution you are running at. If the resolution you set for cube makes your machine "fillrate limited", this may cause the engine to push LOD down in an effort to comply with a framerate your machine can't do at that res.
        dynlight B R
determines wether dynamic shadows & lights are rendered (default B=1). provided just incase they slow your fps down too much. With radius you can optionally specify the radius of a dynamic light (default 16), smaller to maybe gain some speed, or bigger to see the effect of dynamic shadows more dramatically (try shooting it past some pillars that have a dark area on the other side... or use the "gamespeed" variable).
        watersubdiv N
determines the subdivision of the water surface in maps, which can greatly affect fps on slow machines. Must be a power of 2: 4 is the default, 8 is recommended for people on slow machines, 2 is nice for fast machines, and 1 is quite OTT. See "waterlevel" (edit reference) on how to add water to your own levels.
        screenshot
writes out "screenshotN.bmp", where N is the number of milliseconds since cube was launched (default key = F12).
        musicvol n
        soundvol n
sets the music/sound volume from 0 to 255
        gamma n
sets the hardware gamma value to n percent (default 100). May not work if your card/driver doesn't support it.
        hidestats b
turns on/off display of fps/rendering stats on the HUD (default = 1).
        maxroll n
sets the maximum value your display will roll on strafing (0..20, default = 3)
        crosshairsize n
sets the size of your crosshair, 0 being off (default = 3)
        crosshairfx b
turns on or of crosshair effects (default 1). when on, the crosshair will go grey when the weapon is reloading, orange when health <= 50, or red when <=25.
        exec C
executes all commands in config file C.
        newmenu N
creates a new menu with name N. All following menuitem commands will apply to this menu
        menuitem N A
        menuitem A
creates a new menuitem with description N and action A. if you only specify 1, then it will be used for both the description and the action. See data/menus.cfg for examples.
        showmenu N
displays the menu with name N previously defined, and allows the user to pick an item with the cursor keys. Upon pressing return, the associated action will be executed. pressing ESC will cancel the menu.
        keymap K N A
sets up the keymap for key code K with name N and default action A. You should never have to use this command manually, use "bind" instead. any command may be prefixed by "+" or "-", which means you override wether it performs key press or release behaviour. This works slightly different from quake, i.e. you can't specify "+" or "-" in the bind command.
How cube works
The cube engine is simplicity itself. The whole map consists of a large 2D array of "cubes", each with a floor and ceiling height, textures (for floor/ceiling/wall) and other properties. These cubes are grouped 2x2 at a time recursively into a "quad tree", which is used hold bigger cubes which can be rendered faster. For those who have edited doom, this is very similar to having a lot of square sectors but at overlapping sizes. This is results in a map that can have no room over room (yet), and is pretty cubic, except for the odd slope/slant here and there. The floor size of a single unit (single cube) is similar to about 16x16 units in games such as doom & quake, so a staircase step is usually 1 unit, a wall 8 units high etc. Cube renders this world by first determining which cubes are visible using a "dynamic occlusion culling" algorithm and frustrum culling. You can see the effect of this when you switch to edit mode (E), and then fly out above a map: you'll see parts of the map dropping away as you move. The remaining cubes are then rendered in their most efficient size (i.e. cube will render a mixture of 1x1 2x2 4x4 etc. size cubes, depending on wether they have the same properties: height, texturing etc.). if you are on a fast machine, or you are playing a simple/small map, cube will simply render all of these visible cubes (this is indicated by LOD at its maximum of 250 on the hud). Cube can however make complex maps run fast even on slower computers by a technique called LOD: this will render cubes that are further away using bigger approximations (2x2 and up), even the properties of the constituent cubes don't match exactly. This reduces the amount of polys to be rendered tremendously, and thus allows even slow machines to have a consistent frame rate (cube will adapt the LOD figure every frame to aim for the fps you specify). The downside is of course that if the approximations are visible closeup, this can lead to ugly graphical glitches (this is called "popup" because it changes as you move). So in the end the choice is up to you: good fps or constant visual quality (most engines only cater for the latter).