AdaGate v 1.71 beta 03nov2014
=================================================================
What's new :
. both GNU/Linux and Mac OS-X binary executables included:
adagate_osx, adagate_gnu;
. added level 5 epilog;
. reflective water in levels 2, 5;
. added GNU GPL statement to sources;
. code corrections/improvements;
. now allow key-left/key-right [in addition to mouse] rotations in epilog;
. added level 0 prolog;
. various corrections and improvements;
. now fully matches C++ version;
.................................................
. revised/restored background music that ends when wormhole becomes active;
. cleaned code, improved robustness;
..................... 30oct14 ...................................
. improved ZPM-barrel movement code;
. cleaned up libraries and added gnu-gpl statements where missing;
. equilibrated keyboard slew speed for computationally intensive fragment shaders;
............................. 3nov14 ........................................
. This update no longer requires mplayer, but uses instead a
very limited Ada interface to a few SFML-AUDIO functions.
............................. 4nov14 ............................................
. updated OSX binary with statically-linked SFML
(so target Macs don't need SFML just to run AdaGate)
See "adagate_osx2" and "ocmp.sh".
==========================================
what is special about this project?
==========================================
Uses fully modern OpenGL methods in Ada using textures, shaders and uniforms that achieves version 3.3 core profile contexts in a way that is sufficiently mainstream that it easily compiles and runs on both GNU/Linux and Mac OS-X systems. This project serves as a testbed for learning the complexities of modern OpenGL and GLSL.
Absolutely no coding efforts or compromises have been made to accomodate proprietary operating systems except for learning how to compile on OS-X.
It relies on a GLFW3 binding by Felix Krause, a thin OpenGL binding from "Lumen", a PNG reader by Stephen Sanguine, and SFML-Audio.
If one defines "modern" OpenGL to mean version 3.3 or beyond, then this may be the most functionally advanced demonstration of "modern" OpenGL using Ada to be found. The code itself is far from elegant, but serves as a working example, whose focus is learning OpenGL. The Ada bindings used are thin, so the relationship to C++ methodology is quite transparent. Developers should note that these Ada bindings are usable as a standalone library for most any OpenGL project.
==============================================================
AdaGate Game Introduction
==============================================================
AdaGate is a combination of Portal and Sokoban, written completely in Ada.
While exploring an isolated tropical island with palms swaying in the tradewinds, you find an operational stargate that transports you into a curious sequence of dungeons. Finding your way back up to the surface will require solving some 3D sokoban puzzles.
In each dungeon you will find strange Zero Point Modules [ZPMs]. You can shoot your portal guns at most walls to place two stargates where you want. But, in order to activate them, all of the ZPMs must be bumped onto their base receptacles. Now, you can only PUSH the ZPMs. That means you can fail if you roll one into a corner or against a wall. As you will see, they roll in only two directions.
Transcend each level and make your way back up to the cool night air on the surface.
There are currently 4 levels, not counting the beach prolog (level 0) and lake epilog (level 5), and each game resumes at the level attained in the previous game.
-----------------------------------------------------------
-- controls
-----------------------------------------------------------
Pointing is by touch pad or mouse;
Movement is by arrow keys:
<Up>
<Lt> <Dn> <Rt>
L-key,R-key, or
L-Mouse,R-Mouse : shoot the two portal-guns
<space> = jump
<esc> = exit;
at the command line type "adagate_gnu <enter>" to begin.
------------------------------------------------------------
required for running:
-------------------------------------------
. graphics card & driver that supports OpenGL version 3.3 or later;
. GNU/Linux or a Mac running OS-X;
. libopenal.so, libsndfile.so (see ./libs/) if using GNU/Linux,
. OpenAL framework if using OSX
. note that the delivered executables were statically linked
to glfw/sfml so you should not need them just to run.
. adagate_gnu is executable on GNU/Linux.
. adagate_osx is the executable for Mac OS-X.
Open Source libraries required for building:
-------------------------------------------
. Mac or GNU/Linux
. a recent gnat compiler
. GLFW3 libraries
. openal, sndfile, SFML libraries on GNU/Linux,
. OpenAL, SFML frameworks on OSX;
. libs directory contains Ada interface bindings
. see example scripts linux: lcmp.sh; osx: ocmp.sh
. Note that the Ada interface to SFML-AUDIO (snd4ada_hpp.ads) was created with the command:
"g++ -c -fdump-ada-spec -C snd4ada.hpp"
which references a minimalistic C++ utility snd4ada.
Running adagate:
-------------------------------------------
You'll need the "data" directory local to the executable. It contains shaders, skyboxes, sound and texture data.
"adagate_gnu K", with K=0..5, will start you @ level K, 0=>prologue, 5=>epilogue, regardless of where you left off in previous game; remember, this is more of a demonstration than a real game...this would not be done in a real game ! Of course you can still omit a command line parameter and proceed through the levels in sequence like a normal game.
======================================================================
Open source developers are welcome to help improve or extend this game.
Feel free to send comments or suggestions:
<fastrgv@gmail.com>
October 2014
==============================================================================
============ legal mumbo jumbo: ==============================================
==============================================================================
AdaGate itself is covered by the GNU GPL v3 as indicated in the sources:
--
-- Copyright (C) 2014 <fastrgv@gmail.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You may read the full text of the GNU General Public License
-- at <http://www.gnu.org/licenses/>.
--
========================================================================
Media Files for AdaGate:
General Note
============
The particular choices of sound, image, and shader files (*.fs) delivered are not essential to the function of the game and are easily replaced. This software is primarily intended as a tutorial example of modern OpenGL methods. The only requirements are that sounds be in WAV format, images be in PNG format, and shaders be updated to GLSL 330 specifications. Skybox images have an additional constraint, they must also have a 90x90 degree field of view [for a correct perspective], and all 6 must have the same pixel dimensions.
SoundFiles (*.wav)
===========
...are all from freesound.org and are thus covered by the Creative Commons Attribution noncommercial license documented in the accompanying file creativeCommons.txt.
ImageFiles
==========
...for textures were freely [no copyright indications] available on google images.
ShaderFiles
===========
Some fragment shader files used were downloaded from http://glslsandbox.com/ and put under ./data/ that are not labelled as GNU-GPL'd, namely:
clouds.fs, darkwater3.fs, starfield3.fs, volcano.fs
...these appear to contain comments from their authors so were left unchanged.
SkyBoxes
========
Two were used from www.redsorceress.com/skybox.html