Download Latest Version ag8jul24.7z (102.5 MB)
Email in envelope

Get an email when there's a new version of AdaGate

Home / 26feb2016_fix
Name Modified Size InfoDownloads / Week
Parent folder
ag_26feb16.tar.gz 2016-02-27 193.2 MB
README.md 2016-02-27 19.4 kB
Totals: 2 Items   193.2 MB 0

AdaGate -- v 5.21

Whats new:

ver 5.21 -- 26feb16

  • fixed an error that caused portal gun problems;
  • improved serpent texture.

ver 5.2 -- 19feb16

  • enhanced fish-shader to allow contrary rotations.
  • created contrary green mamba with articulated round body.
  • A new Mac-Binary-Bundle that acts like a normal Mac App is now delivered. Note that my suggestion is to open the App properties before running and choose to open in low resolution when on a Retina display, if any jerkiness of movements occurs. This app is delivered in the installation directory, but could be moved elsewhere, such as your personal Applications directory [and initiated with a click]. Note that there are some soft [symbolic] links in the bundle that are resolved automatically when copied with the command "cp -r adagate.app destination-directory".

ver 5.1 -- 04jan16

  • got prolog splash sound to work using sfml:sound, rather than sfml:music.
  • added an optional, user-edittable text file (settings.txt) to adjust gamepad/joystick settings. This means you can now adjust sensitivity and remap the buttons using a text editor. Note that there is a strict format, if present.

ver 5.0 -- 31dec15

  • removed splashing sound in prolog because it was problematic. It prevented game controllers from working on OS-X.
  • disabled HDPI mode on the delivered OS-X binary. Now AdaGate runs noticably smoother (with no jitter) and looks better. Of course, you may enable it before you rebuild, if desired.
  • joysticks and gamecontrollers can now be used (without needing any special drivers in linux or OS-X) for AdaGate:
    • joystick contols attitude; thumb button moves forward; trigger button moves backward; topleft or topright buttons select on DHD and shoot portal guns; nearest base button initiates a jump.
    • gamecontroller: left paddle controls attitude; right paddle controls movement; left or right trigger buttons select on DHD and shoot portal guns; nearest base button initiates a jump.

ver 4.9 -- 25dec15

  • fixed problems with pngloader code; cleaned up other codes.
  • improved look of lagoon with minor shader adjustments of waves and foam.
  • added splash sound when swimming; but SFML might not allow 2 sound-loops.
  • upgraded the room-object so that smaller texture images still look good.
  • reduced some oversized texture image files.
  • added an angle uniform to the vertex shader for some objects.
  • more bamboo, taller trees.
  • added a spectacular new island flyover approach.

ver 4.7 -- 20dec15

  • created an awesome new vertex shSerhiy and Peter Grabarchukader for realistic fish motion and zfishobj to support it.
  • added piranha to water-dungeons and atoll lagoon.
  • addes sea serpent around atoll.
  • increased numbers of other sea creatures.
  • corrected a texture map error to improve look of certain objects.
  • simplified program design and reduced number of graphical objects by defering the specification of object size and location until draw time.

ver 4.6 -- 15dec15

  • created atoll island and channel connecting lagoon with ocean.
  • added trees; improved code to do it; adjusted shaders accordingly.
  • improved, simplified grass, palm sway-management code.
  • decreased opacity of ocean so shark is easier to see.
  • added primitive lean-to shelter with bones, burnt wood.
  • airplane cockpit, lean-to, SG pillars, and tall palms are now keepout zones...meaning that you cannot walk through them any more.
  • Note that the graphical complexity of this app requires a moderately capable graphics card.

Serhiy and Peter Grabarchuk ver 4.5 -- 10dec15

  • exposed two more pumpevents calls to prevent annoying gnome messages.
  • updated, simplified the MacOSX build script <ocmp.sh> by assuming presence of GNAT2015.
  • updated the linux build script <lcmp.sh> to reference the delivered local libraries <libsndfile.so> and <libopenal.so> in case they are not found elsewhere on the build computer.
  • corrected error with drawing of ZPMs (introduced in previous release).
  • refined maintenance of proper eye-level on island.

ver 4.4 -- 30nov15

  • No functional differences; just code improvements.
  • Improved PNG loader now better handles all raw image files for textures.
  • Upgraded cyl2obj package per latest fixes in World Cup Sokerban.
  • Removed older parts of this change list.

ver 4.3 -- 11nov15

  • Eye level on beach now varies to match ground contours.
  • ZPM on beach now also follows ground.

ver 4.2 -- 10nov15

  • Beach prolog now has receptacle and kickable zpm (beachball); beach rocks are now obstacles.

ver 4.1 -- 15oct15

  • Elliminated one remaining call to SDL-Init with parameter SDL-INIT-EVERYTHING, that had inadvertently escaped my notice. This should enhance the portability of the delivered binary according to linux-app-checker.
  • Bumped epilog water dimension to 200 since the graphical burden is acceptable.

ver 4.0 -- 02sep15

  • revised models for island sand and ocean water for improved appearance and support on all hardware, including Retina displays @highDPI. This elliminates triangular artifacts in ocean as well as problems with jerky movement.
  • seaweed now surrounds nose of Electra cockpit and better matches the sand contours;
  • moved crab, starfish to surfline;
  • improved shark and fish textures.
  • improved water in epilog.

what is special about this project?

Uses the Ada programming language and fully modern OpenGL methods, with textures, shaders and uniforms. Achieves version 3.3 core profile contexts. 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.

Focusing on portability and freedom, no coding effort or compromise has been made to accomodate proprietary operating systems. It relies on a thin SDL2 binding from Dan Vazquez, a thin OpenGL binding from "Lumen", a PNG reader by Stephen Sanguine, and SFML-Audio (because of its elegant audio interface).

If one defines "modern" OpenGL to mean version 3.3 or higher, then this may be the most functionally advanced demonstration of "modern" OpenGL using Ada to be found. Written in C++ style, the code neglects many safety features available to Ada, but it does serve as a working example that focuses on learning OpenGL. The Ada bindings used are thin, so the relationship to C++ methodology is transparent. Developers should note that these Ada bindings are usable as a standalone library for most any OpenGL project that uses Ada.

Thus, for the C++ programmer the code should be easy to comprehend; and for the experienced Ada programmer there are many potential improvements to be made. Suggestions are welcomed, as are coding or design improvements. Just send to fastrgv@gmail.com.

explanatory note on SFML versus SDL2

Using SFML rather than SDL2 for windows and event loop management was tried, but SFML does NOT currently allow the core and forward compatible settings that are required to use OpenGL v3.3 on OS-X. This article: link explains that [fttb] OSX only supports forward-compatible, core profiles. Moreover, SFML [fttb] still uses some OGL-deprecated functions (which preclude forward-compatibility). On the other hand SDL2 audio was not used because SFML audio seemed simpler and more powerful. In fact, it is planned to replace SDL2 with SFML if and when an SFML update becomes available that allows the forward-compatible setting needed to support OSX. It seems the ellimination of OGL-deprecated functions from SFML is planned but is low on the priority list.

AdaGate Game Description

AdaGate is a first-person 3D sokoban puzzle game within a Stargate / Portal fantasy setting. It is a great example of modern OpenGL programming using the Ada language.

While exploring a remote south-seas island an operational stargate lures you into 4 strange dungeons. Escape will require the logical rearrangement of weird power cells [ZPMs] that roll in only two directions. Shoot your portal guns at the dungeon walls to configure 2 escape portals, but in order to activate them, all of the ZPMs must be bumped onto their sockets. But beware: you can only PUSH the ZPMs, so you will fail if you roll one into a corner or against a wall. But dont worry, cheating is pretty easy ; )

With 5 degrees of difficulty [DoD], there are 20 user-replaceable puzzles to solve. Escape all 4 dungeons to experience the neptune choir and increment the DoD for your next challenge.

AdaGate Game Features

  • Works on PCs or laptops running OS-X or GNU/Linux. And if GNAT is installed you can build it yourself! But first try the delivered binaries.

  • Both GNU/Linux and OS-X binaries provided, as well as full source. Improved compatibility of pre-built binaries run on many recent distros of linux and OS-X.

  • Laptop friendly controls; supports Mac Retina displays.

  • A first-person (you are the pusher) 3D Sokoban puzzle game that uses the intersection of two cylinders as a puzzle piece that rolls in two perpendicular directions.

  • New stargate dial-home-device [DHD] allows non-linear play; watch island setting evolve.

  • Roll the cylindrical ZPMs to empower the portals and escape thru a wormhole

  • Four rooms and five degrees of difficulty for a total of 20 challenging puzzles. And now solutions are available in the file ./data/solns.sok.

  • Serves as a blueprint for modern OpenGL programming in Ada or C++ using GLSL 330 and shaders.

  • Note that the Ada bindings to OpenGL & SDL2 in this app are usable as a standalone library for most any modern Ada project.

  • See also: WorldCupSokerban, a 3rd-person 3D sokoban game within a soccer field. Comes with an autosolver!

mouse/touchpad/keyboard controls

You might need to disconnect unused gamecontrollers to prevent spinning!

Look direction is controlled by touch pad or mouse;

Movement is controlled by the arrow keys:

        (Up)
(Lt)    (Dn)    (Rt)

Shoot the two portal guns using: (L)-key (R)-key, or (if you have two) the two mouse buttons.

(space)-key => jump up/over short walls

(esc)-key => exit;

joystick

  • joystick : attitude
  • thumb btn: forward
  • trigger btn: backward
  • Ltop/Rtop btns: select/shoot
  • base btn: jump

gamecontroller

  • Lpaddle : attitude
  • Rpaddle : movement
  • Ltrigger, Rtrigger : selece/shoot
  • base btn: jump

To begin the game, open a terminal window, and at the command line type "adagate_gnu" or "adagate_osx". If you ever get stuck, try to jump up & forward.

------------------------------------------------------------

required for running:

  • graphics card & driver that supports OpenGL version 3.3 or later;
  • GNU/Linux or a Mac running OS-X (even Yosemite & ElCapitan);
  • adagate_gnu is the executable name on GNU/Linux.
  • adagate_osx is the executable for Mac OS-X.

Open Source libraries included for rebuilding:

  • systems: OS-X or GNU/Linux
  • a recent gnat compiler
  • the included "libs" directory contains Ada interfaces:
    • AdaPngLib
    • gl
    • sdlada

Note that the module that defines 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. Thus, if you redefine the interface snd4ada.hpp, you will need to recreate snd4ada_hpp.ads by this method.

Running adagate:

Unzip the archive and you will see a new directory appear with a name like "bundle_date", that you should rename to something like "adagate_install_directory".

Linux users should then cd to adagate_install_directory, then type "adagate_gnu" to start the game. You may also double click its icon in file manager.

Mac users note that this game may be initiated in two ways also. First, by opening a terminal window, navigating to the adagate_install_directory, and typing "adagate_osx" on the command line. Second by navigating to the installation directory in Finder and clicking the "adagate.app" icon named "AdaGate".

The adagate_install_directory should contain a subdirectory named "data". It contains shaders, skyboxes, sound and texture data, as well as the puzzle definitions.

An optional command line parameter of 1..5 will choose the Degree-of-Difficulty [DOD], but it is normally unnecessary since the DoD increments itself after each game. If you succeed at DoD= 3 or 4 then you are ready to try WorldCupSokerban or RufaSok!

Caution, the ZPM is heavy! If you kick it out of reach under water then you will be stranded on the island.

By the way, you are ideally supposed to solve the sokoban puzzles without jumping back onto the walls. If you do, it might be said that you cheated! Conversely, if you jump into the puzzle at the wrong place, it might be impossible to solve.


Open source Ada developers are welcome to help improve or extend this game.

Developer or not, send comments, suggestions or questions to:

fastrgv@gmail.com

Build instructions for AdaGate:

Two [pre-compiled] binary executables are delivered, one for gnu/linux and one for OS-X. The linux binary, adagate_gnu, is intended to run in the presence of the directory "libs", which contains some dynamically loaded libraries that can be, but need not be present on a target system: SFML, SDL2

Build scripts for GNAT2015 or newer are provided. Suggestions for improving the build process are always welcome.


MacOSX:

ocmp.sh:
build script for generating a portable executable that will run on most OS-X platforms whether or not they have non-standard libraries SDL2 or SFML installed. I used this to build the executable that I deliver, named adagate_osx. Macs with a recent but standard configuration of OS-X should be able to rebuild using this script.


GNU/Linux:

lcmp.sh:
utilizes the uncommon relocatable libraries (mainly SDL2, SFML) that are delivered in this bundle under ./libs/. This is used to build the dynamic [gnu/linux] executable, which should run in the presence of ./libs, whether or not your system has those libraries installed. This was used to create the executable named adagate_gnu.

If it doesnt run on your linux distro, you will have to try to build the executable yourself. In that case, it is hoped that this script (lcmplld_ag.sh) will work for you. The intent was to provide all the needed interface/include files under ./libs/.


AdaGate itself is covered by the GNU GPL v3 as indicated in the sources:

Copyright (C) 2016 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 [x.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 using GLSL. 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.

Defining Your Own Puzzles:

Read puzzle_replacement.txt

SoundFiles [x.wav]

Most are from freesound.org and are covered by the Creative Commons Attribution noncommercial license documented in the accompanying file ccnc3_license.txt. see also: (http://creativecommons.org/licenses/by-nc/3.0/legalcode/)

"Among the Falls" [music for level 1], and others, are from (http://www.freesfx.co.uk). See the file freeSFX_license.txt.

My first choice for epilog music was Tim Larkin's Kadish-Gallery music from Uru, but as AdaGate is F.O.S.S. I could not redistribute that. But I can still suggest using it, if you know how and can find it on you-tube.

ImageFiles

Most images for textures were freely [no copyright indications] available on google images. Some wall textures used are from the GPL2.0/GPL3.0-only section of OpenGameArt.Org. One other thatched roof texture was used from http://www.mayang.com/textures. See mayang_license.txt. Others from pixabay.com have a CC0 license. More recently, some are from http://all-free-download.com/free-photos/.

ShaderFiles

Some fragment shader files used were downloaded from (http://glslsandbox.com/) and put under ./data/ that are not labelled as GNU-GPLd, namely:

clouds.fs, darkwater3.fs, starfield3.fs, volcano.fs ...as well as some sections of a couple of other fragment shaders...

...these appear to contain comments from their authors so were left unchanged. However, most fragshaders from glslsandbox are under the MIT license (see mit_license.txt).

Also from glslsandbox...added: "Red Planet" from Mahmud Yuldashev mahmud9935@gmail.com as well as the following uncredited: . blueSpiral.fs . redPlanet.fs . cloudyPlanet.fs . mountainScape.fs as well as the CreativeCommons licensed: . waterWorldCCNCSA3.fs which seems to be credited to Alexander Alekseev with mods by Mahmud Yuldashev.

As with most, I had to modify to glsl version 330 and adapt them to use some programatic uniforms for input.

SkyBoxes

For some of these, I had to lower the horizon slightly for technical reasons; and for others I converted to png files with RGBA mode.

One used is from (www.custommapmakers.org/skyboxes.php), which gathers together many free-to-use skyboxes.

Another skybox [from (http://www.redsorceress.com/skybox.html)] is credited to "The Mighty Pete" at http://www.petesoasis.com (which seems defunct).

Another one used [from OpenGameArt.org] is the work of Heiko Irrgang hi@93-interactive.com and is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit (http://creativecommons.org/licenses/by-sa/3.0/) or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. See also the accompanying file ccsa3_license.txt.

level beta puzzle: http://youtu.be/WQU5kdO_93k

level beta lava pit: http://youtu.be/0LH9H0hNF1Q

prolog flyover (dec15): http://youtu.be/IOybN0lgBh8

agnew, atoll sea life (dec15): http://youtu.be/SZsdmISNia4

A 3rd party 11 minute video of AdaGate is here: https://www.youtube.com/watch?v=qNPc6yXfIV4&feature=youtu.be


Source: README.md, updated 2016-02-27