RufasSlider Beta 1.2 29jul14
-----------------------------------------
What's new:
. restart function <r>;
. improved rectangle selection mechanics;
. more predefined puzzles;
-----------------------------------------
This minimalist application, called slider, runs a class of block slider puzzles that involve rectangles of 4 sizes: 1x1, 2x2, 1x2, 2x1. The objective in each instance is stated at the top, but usually involves moving a large block to a specified location within the window. These games often go by the name of "klotski".
Note that the game description files are simple text files with a particular format that allows users to define additional puzzles.
A variant app, called rush, runs a "traffic rush" version of data, with 1x1,2x1,1x2,3x1,1x3 rectangles. Here, the long rectangles represent cars or trucks that can only move [roll] lengthwise...the goal being to move the red car toward the "garage door" on the right. These data files are slight variations of klotski style data.
############################
. Uses SDL2;
. Works on OS-X Retina displays;
. Uses SFML for applause sound;
. all runtime files are in ./data/
. all game data files are in ./data/
----------------------------------------------
Build Requirements:
1) a recent gcc compiler that supports -std=c++11;
2) GLEW;
3) SDL2;
4) GLM;
5) graphics card that supports OpenGL version 3.3 or later;
6) SFML
Then you might need to tinker with the build scripts to get the
directories to correctly match your environment...
-------------------------------------------------------
MacOSX:
bldOsx_static.sh: static build script for generating a portable executable that will run on most OS-X platforms whether or not they have non-standard libraries such as GLEW, SDL2, SFML installed. I used this to build the OSX executable that I deliver.
bldOsx_normal.sh: simplest version for OS-X.
------------------------------------------------------
Linux:
cmp_static: builds a portable executable that minimizes required libraries on a target machine (dl,openal,sndfile). I use this to build the static linux executable.
cmp_dynamic: simplest build script that works for me.
cmpLibLocal: utilizes the relocatable libraries that I deliver in this bundle under ./libLocal/. I use this to build the dynamic [linux] executable that I deliver, which should run in the presence of ./libLocal, whether or not your system has the libraries in it. This was used to create the dynamic linux executable.
################################################
Running:
Ensure the executable is collocated with the data directory. If the "dynamic" version of the linux executable is run, it expects to have the ./libLocal/ directory present.
Then pick one of several predefined game files, EG def1_easy.data or rush1_easy.data.
Then type
slider ./data/def1_easy.data
to initiate the slider game; or type
rush ./data/rush1_easy.data
to initiate the traffic-rush version.
To move a block, use the arrow keys <up>,<dn>,<lf>,<rt>; If there is an ambiguity and the "automatic" selection mechanism chooses the wrong block to be moved, simply click on the desired block with the cursor before hitting a directional arrow. At any time, hit the letter <r> to reset/restart, or <esc> to quit.
Please send questions, comments or corrections to
fastrgv@gmail.com