Gravit Home / Documentation Index
Here's a list of commands and variables. The values in the Type column below are Cmd for command and Var for variable. Some variables are actually commands that act like variables like g and autorotate. Words that are in italics refer to a command or variable.
Command | Type | Description |
quit | Cmd | Will quit Gravit. |
exec | Cmd | Execute a Gravit script. The path can be absolute or relative. Scripts are just text files that contain console commands. Lines starting with a # are ignored. |
help | Cmd | Displays some help, like this help! |
list | Cmd | Displays the names of every console command available |
Command | Type | Description |
record | Cmd | Recording is when Gravit simulates gravity. The command will stop recording if it's already recording otherwise it will start recording. |
autorecord | Var | Setting this to 1 will automatically start recording after the spawn command. |
play | Cmd | Replay's a recording that is currently in memory. It will loop the simulation over and over. |
stop | Cmd | Simply stops recording or playing. |
status | Cmd | Will display some statistics |
g | Var | Set the accuracy and speed of a simulation. The default value is 5. Increase it for a slower, more accurate simulation. Decrease it for the opposite. A value too low (like 1 or 2) will create a chaotic simulation. Technically this creates a small value used for the gravity calculations. The forumula for this number is G = -10 ^ -g. This is used in F = Gm1m2/d^2. |
framecompression | Var | When Gravit uses up all memory for storing particles, it can 'compress' the history by removing every second frame. The simulation then will resume half way and only save every second frame. Turning this variable on will allow this, otherwise the simulation will stop. |
frameskip | Var | When playing a simulation, increase this number to skip played back frames for a faster playback. |
frame | Var | Jumps to a frame number in playback mode |
Command | Type | Description |
start | Cmd | An alias to spawn |
spawn | Cmd | Will create a new simulation with particlecount particles and will allocate memoryavailable memory. |
particlecount | Var | Next time spawn gets executed, this is how many particles will spawn |
memoryavailable | Var | This is the amount of memory (in MB) that Gravit will allocate when spawning a new simulation. |
spawngalcountmin | Var | Determines the minimum amount of galaxies to spawn. |
spawngalcountmax | Var | Determines the maximum amount of galaxies to spawn. |
spawngalmassmin | Var | The minimum mass of a particle. Each galaxy will pick a range between spawngalmassmin and spawngalmassmax to determine the mass of each particle within it. |
spawngalmassmax | Var | The maximum mass of a particle. Each galaxy will pick a range between spawngalmassmin and spawngalmassmax to determine the mass of each particle within it. |
spawngalsizemin | Var | The minimum radius of a galaxy. |
spawngalsizemax | Var | The maximum radius of a galaxy. |
spawngalvelmin | Var | The minimum velocity of a galaxy. |
spawngalvelmax | Var | The maximum velocity of a galaxy. |
spawnrangemin | Var | The minimum size of the universe where galaxies may spawn in. |
spawnrangemax | Var | The maximum size of the universe where galaxies may spawn in. |
Command | Type | Description |
load | Cmd | Load a previously saved simulation. Most simulation settings are saved except for g. |
save | Cmd | Saves the current simulation by the name you give it (eg. "save mysimulation"). If you have saved or loaded recently, you will have a "simulation name" which is shown on the top of your screen. If you have this, you don't need to specify a name to save -- it will automatically use the simulation name. |
saveauto | Var | When set to a number bigger then 0, it will automatically save every n frames. |
savelist | Cmd | Displays a list of each saved simulation along with some details. |
savedelete | Cmd | This will delete a saved simulation |
Command | Type | Description |
videorestart | Cmd | Restarts the video display with the new video settings. The settings that are applied by this command are videowidth, videoheight, videobpp, videofullscreen, videoantialiasing, fontfile and fontsize. |
videowidth | Var | Video resolution width Gravit will use when videorestart is executed or when the program starts. This usually needs to be used with videoheight. Good combos are 800x600, 1024x768, 1280x1024 and 1600x1200 -- depending on your video capabilities |
videoheight | Var | Video resolution height. See videowidth. |
videobpp | Var | Video bits per pixel. A good value for this is 16, 24, 32. |
videofullscreen | Var | Set this value to 1 if you want Gravit to take up the whole screen. 0 for windowed mode. |
videoantialiasing | Var | This turns on full screen anti-aliasing. Some hardware is not compatible with this. |
fontfile | Var | Specifies which true type font to use. The default is Vera.ttf which comes with Gravit. |
fontsize | Var | Used with fontfile to specify the font size in pixels. |
recordingvideorefreshtime | Var | This setting allows the screen to update while recording a frame. The value is in milliseconds. The higher you have this value, the less often your video will update (causing video and input lag) but recording will be faster. Set this to 0 to turn off video/input updating while recording completely. |
showcursor | Var | Set this to 0 to hide the mouse cursor, 1 to display it. |
blendmode | Var | There are 5 blend modes (0 to 4). 0 disables OpenGL blending. 1,2,3,4 use different combinations of blend settings. They can be pretty and wierd effects. |
fps | Var | Not implemented |
autocenter | Var | Tracks the center of the simulation when set to 1 |
maxvertices | Var | Sets a limit to how many vertices to render. If it hits this value, tailskip will be doubled. |
zoom | Var | The current zoom. 0 means you're at the center of the simulation. |
autorotate | Var | This accepts 3 arguments for X Y and Z. Set these to 0 for no rotation. |
stereo | Var | When set to 1, Gravit will render the scene twice -- one on the left and one on the right. It is used for creating stereoscopic images to see Gravit in 3D. |
stereoseparation | Var | When stereo is set to 1, modify this value to determine the depth of the 3D image. Negative values are for parallel viewing, positive values are for cross-eyed viewing. |
screenshot | Cmd | Creates a bitmap (BMP) screenshot in the screenshots directory |
screenshotloop | Var | Every frame rendered to the screen will execute the screenshot command. This will easily fill up your hard drive with BMP files. |
Command | Type | Description |
screensaver | Var | This is set to 1 when Gravit is running as a screensaver. It will quit on any mouse movement or keystroke. |
installscreensaver | Cmd | In windows, this will install Gravit as a screensaver. |
Command | Type | Description |
particlerendermode | Var | There are 3 rendering modes for particles. 0 for dots, 1 for fast and less compatible textured particles and 2 which looks like 1 except that it is more compatible and slower. |
particlerendertexture | Var | Rendering of the particle texture -- this was used for debugging. |
particlecolourmode | Var | There are 3 particle colour modes. 0 for colour based on mass, 1 is based on current velocity and 2 is based on acceleration (which needs at least 2 frames recorded to work). |
particlesizemin | Var | Minimum size of a particle. This has no effect in particlerendermode 0. These sizes differ between particlerendermode 1 and 2. |
particlesizemax | Var | Maximum size of a particle. This has no effect in particlerendermode 0. These sizes differ between particlerendermode 1 and 2. |
tailskip | Var | Changes the resolution of the particle tail, the higher the number the less accurate the tail is. Setting it to 1 will created the smoothest tails. |
tailfaded | Var | Setting this to 1 will make the tail increasingly transparent along the length of the tail. Set it to 0 to maintain a constant colour/opacity. |
tailopacity | Var | Sets the opacity of every tail. It ranges from 0 being invisible to 1 being opaque. |
taillength | Var | The length of the tail in frames. Set it to -1 to display every step in the tail. |
tailwidth | Var | Thinkness of each tail. |
drawaxis | Var | Not implemented |
drawtree | Var | Will display the octtree. 1 will show the tree using lines, 2 will show semi-transparent boxes. The tree will animate if recordingvideorefreshtime is bigger then 0. |
drawosd | Var | Setting this to 0 will hide all text on the screen. |
drawcolourscheme | Var | Will display or hide the colour key on the top right of the screen |
Command | Type | Description |
colourschemenew | Cmd | Clears out the current colour scheme. |
colourschemeadd | Cmd | Add a new colour to the colour scheme. |
Command | Type | Description |
timeradd | Cmd | Adds a timer |
timerdel | Cmd | Removes a timer |
timerlist | Cmd | Lists all timers |
Command | Type | Description |
popuptext | Cmd | Displays some text on the screen. |
cd | Cmd | Change directory. Not apparently useful! |