gbSand
gbSand is a standalone version of the popular web-based Falling Sand games. The web versions have generally been written in Java and are run in a browser. gbSand is written in PowerBASIC and is
run as a standalone EXE (no browser required).
The basic Falling Sand game typically consists of one or more streams of falling particles, such as sand, oil, and water. The various particles are assigned properties which describe
how the particles may fall or interact with each other. Barriers may be generated by the user,
directing the paths by which particles may fall and/or merge with of particles streams. Particles
which reach the bottom of the screen are typically discarded from the game.
While gbSand can be played by simply running the game and playing with the various controls and settings, there are a number of features available which enable the user to design (and save) game backgrounds for use in subsequent games. By default, gbSand opens with 4 particle streams and a barrier for each particles. Users can modify the numbers of streams/barriers, import barriers from external files, and edit the screen content directly - more editing features than any other falling sand game!
gbSand uses a single main window, consisting of three toolbars and a client area where the
game is displayed. Default particle streams enter from the top of the screen. Particle
paths are directed by the user by placing barriers (manually drawn or imported from external files) in the path of the falling particles.
Feature List
gbSand provides a complete selection of features for manipulating particle flow.
- Standalone EXE
- Play/Pause/Restart
- Draw game content while game is paused
- Save/Open games
- Save/restore game session
- Default game includes 4 default particle streams and 4 default barriers
- Four user actions - Draw, Erase, Spout, and Import
- Custom cursors to indicate which action is in effect
- Draw barriers with mouse
- User-defined pen width
- Unlimited barrier count
- Import images as barriers
- User-defined resizing of import images
- Erase barriers (manual or imported) and particles using the mouse
- Select screen areas and selectively act on content in the selection
- Selectively remove streams
- Create particle streams (spouts) anywhere, placed by double-clicking
- Unlimited particle streams at user-defined locations
- User-defined particle count limit (default of 1,000,000)
- Import barriers from files, placed by double-clicking
- Nine particle types supported (sand, oil, water, seed, fire, salt, laster, cloud, virus)
- Speed control
- Sound effects
- User-defined game background color
- Zoom viewing (static image) anywhere on the screen
- Particle compaction (eliminate off-screen pixels)
- Print game image
- Capture game image to clipboard
- Real-time particle count, computation speed, and refresh cycle timing
- Popup setting information dialog
- Online Help (this page)
Future versions will enhance particle interaction, provide additional realism of
falling particles and allow insertion of animated objects.
Playing gbSand
Aside from basic start/stop and faster/slower commands, there are 5 basic
actions a user takes in playing gbSand. These are provided in the middle and bottom
gbSand toolbars:
- Select - select an area from the game
- Draw - draw barriers with the mouse
- Erase - erase barriers and/or particles with the mouse
- Spouts - create particles sources anywhere (double-click at desired location)
- Import - import images, which act as barriers, onto the game screen (double-click at desired location)
By default, gbSand provide four streams of falling particles, one for each supported
particle type of sand, oil, water, and seed. Also by default, a barrier is placed in each
stream to deflect the particle flow. The defaults are just to demonstrate how the game
works to the user. The user may remove the default barriers and particle flows.
Users may create new barriers by dragging on the screen with the mouse. Likewise, particle
streams (spouts) may be removed or added. Added particle streams may be placed anywhere on
the game screen.
Approximately 100 images, suitable for import (PNG files with black as transparent color), are distributed with gbSand. A separate toolbar is provided which displays all images found in the
images subfolder where gbSand has been installed. You can import any image, but those with
perimeter transparency tend to give better results. The supplied images
are generally just colorful, humorous images - but the user can make custom images, such as
a barrier which resembles a maze, which may be used in multiple games. The use of imported barriers is limited only by the users imagination!
The game may be paused and play resumed. A new game may also be started at any time.
Games may be saved and opened later. The game speed (rate at which particles fall)
can be controlled. The game status in a sessions is automatically saved and restored
the next time gbSand is started.
Sound effects are available for each of the user actions (Drawing, Erase, Spouts, Import).
A screen context menu is available, providing various options for controlling the
content of the game. A zoom context menu item allows the user to take a closer view
of any part of the screen (displayed in a separate dialog). Game images may be saved
to the clipboard or printed to a user-defined printer.
The user can select any portion of the screen, after which a separate context menu is presented, allowing the user to copy or selective erase content within the selection.
Toolbars
The gbSand interface includes the following 3 toolbars.
Settings Toolbar (Top)
- Open
Opens a file selection dialog. gbSand games file use a ".gam" extension. The dropdown arrow
next to the Open toolbar button conveniently lists all games found in the "games" subfolder.
- SaveAs
Open a file Save As dialog, for saving games.
- Play
Toggles between playing and pausing the game
- Restart
Starts a new game
- Faster
Increases the speed of the game
- Slower
Slows the speed of the game
- Zoom
Toggles scale factor of imported image from 25% to 200%
- Sounds
Toggles play of sound effects corresponding to user actions
- Print
Prints an images of the gbSand dialog to the user-selected printer. The dropdown arrow
next to the Printer toolbar button gives additional actions which may be taken on the
game image. At this time, the only additional option available is to copy the game image
to the clipboard.
- Settings
When pressed, the Settings button toggles display of game information in the
dialog caption. The Settings dropdown menu provides the following menu options:
Show Status in Caption
Toggles display of information (particle count and average time per refresh cycle)
in the dialog caption
Select Background Color
Opens the color dialog, from which the user can select the screen background color
Edit Pen Width
Opens a simple input box for the user to enter the pen width, which is the width of
lines drawn with the mouse.
Edit Maximum Particle Count
Opens a simple input box for the user to enter the maximum number of particles allowed
in the game. The default is 1M particles.
Edit Import Scale Factor
Opens a simple input box for the user to enter the scale factor of imported images.
A value of 25 means 25%. A value of 100% means 100%.
Custom Cursors
Toggles display of custom cursors for each of the user action mode. The default
cursor is the standard arrow pointer.
Auto Save Sessions
Enables saving of a game when the game closes. The saved game is restored in the
next session.
Ask For Confirmation
Requires user to confirm actions which would otherwise delete game content (such as
opening a new game or restarting the current game).
Landscape
Determines whether printing the dialog image is done in landscape or portrait mode.
Spout Cloud
Determines whether a "cloud" shaped image is placed at the top of new spouts.
Start Game Empty
When selected, a new game (created using Restart toolbar button) will not display
default streams nor default barriers.
- Help
Opens the online Help page (this page). The Help dropdown menu provides the
following menu options:
Local Help
Opens a popup dialog with a compact description of how to play gbSand
Online Update
Checks to see if a new version of gbSand is available online. If so, the user
may download and install the new version.
Action Toolbar (Middle)
The middle toolbar provides all of the mouse actions a user may take.
- Select - The select toolbar button lets the user select any area of the game. After a selection is made and the mouse is released, a context menu is presented which allows the user to coyp, or selectively erase content within the selection.
- Draw - The draw toolbar button lets the user draw freestyle barriers. The barriers may be drawn horizontally or vertically by pressing the Ctrl or Shift buttin while drawing.
- Erase - The 4 erase options let the user selective remove game elements (manually drawn barriers, particles, or imported barriers).
- Spouts - The 9 spout toolbar buttons to the right allow the user to select which particle type will be used in creating a spout.
Import Barrier Toolbar (bottom)
Thumbnails of all barrier files, located in the images subfolder where gbSand was installed, are shown on this toolbar. To import a barrier file, just select the image on the toolbar and then double-click on the game screen where you want the imported barrier to be centered.
gbSand Selection Context Menu
After making a selection on the game screen, the following context menu is displayed:
- Cancel - cancels the context menu
- Erase All - erase all content within the selection
- Erase Barriers - removes all manually drawn barriers within the selection
- Erase Particles - removes all particles within the selection
- EraseImports - removes all imported barriers within the selection
- Copy - copies the selection to the clipboard (as an image)
gbSand Screen Context Menu
A context menu is available from the main screen, and provides these menu items:
- Zoom At Cursor
Displays a 4X static view, in a separate window, of the area underneath the cursor.
This allows the user to more easily see/inspect the status of particles and barriers.
- Remove All Particles
Removes all particles from the current game. Barriers are unaffected.
- Compact Particle List
gbSand allows up to 1M particles to be created. This includes particles which have
fallen off the screen and are no longer displayed. Compaction removes the off-screen
particles from the application data arrays, allowing more of the 1M maximum particles to be
displayed on the screen.
- Add Default Barriers
Adds the default barriers back into the game
- Remove All Barriers
Removes all barriers, including the default barriers
- Add Default Streams
Adds the default streams back into the game
- Remove All Streams
Removes all streams, including the default streams
- Remove Most Recent Stream
Removes the most recently added stream
Keyboard Shortcuts
The following key combinations are available to the user to access gbSand features:
- F1 - Help
- Ctrl-C - Copy image of dialog to the clipboard
- Ctrl-E - Toggles pen width between 10 and 50 pixels
- Ctrl-I - Settings Information Dialog
- Ctrl-N - Set Import scale factor to 100%
- Ctrl-P - Toggles Play/Pause
- Ctrl-R - Start a new game
- Ctrl-S - Remove Most Recent Stream
Sounds
gbSand has the option to play a sound effect for each user action - draw, erase, spout and import.
In future versions, additional sound effects will be available, corresponding to particle interactions.
Other Comments
Miscellaneous information is provided in this section.
INI File
gbSand application settings are saved in an INI file, kept in the same folder as the gbSand application.
Comments and suggestions are welcome!