Home
Amiga
AmigaDE
AmigaOne
Pegasos

The Crystal Library




(c) Arend-Paul Spijkerman 1992-2024


The crystal library is a framework or library that can be used to develop a program on one machine and compile it on several others.

At the moment it compiles on these systems:
Windows (MS VS), macintosh (XCode, Codewarrior), Linux (GCC), Android (native), Amiga 68k/ppc (SAS/C,GCC)

It came in existance long ago when i started to program PCs and Amiga's. When i started to program my BBS software making things like a GUI
was very cumbersome .. as you needed a lot of calls for each GUI element where you needed to put it on a position and give it a size.
And when you wanted to add something or change sizes you needed to change all the parameters of all elements.
As there where no ready solutions i made a dynamic GUI library that took over the work.
So now you only needed to provide the layout in a small text files, and the code took care of everything.
Even if you resize the window, it shifts parts and makes parts bigger depending on parameters in the layout files.
And over the years more and more was added to it.
Basically it's written in C, so its very portable but a lot of the parts like GUI and graphics handlers use OOP.


It features things like a Dynamic GUI Library, with video/audio, news articles and ads.
The GUi has almost 40 classes of elements and features things like tabs, pull down menu's and triangles to close parts.
A render engine that can turn scripts into buttons or pictures as if it was just another picture.
internet client/server code. 2D and 3D graphics. picture files.
Memory tracking/debug code that keeps track of all allocations and wall hits.
module for file accesses, and dynamic memory use like linked lists
modules for strings, dynamic arguments, virtual engine, load and play sound.


Here follow some sample pictures of what is possible with the library:



A simple jukebox system for PC and Android.
The library Makes it possible to write and debug Android software on Mac or Windows, and it gives you for instance a windows version of your app.
As it is a lot easier to debug a program on a PC than on an android tablet, as on a PC you can step through the code.



A program that turns an android tablet into an earthquake sensor.




A simple program to learn to get the right notes playing the violing.



A simple music scratch program for android/mac.


A couple of the userinterfaces in the BBS program.



Server monitor.



A progam to play video streams.



A program to play olympic streams.



This is my stampdock system, a program that a microcontroller can use as a comfigurable input/output system.



More stampdock.



Solar system monitor.



Development of a GUI for a video generating program.





A simple webbrowser.


Test program for the Crystal library Build 70

This program was made to do development of the Crystal library.
This Engineering release was made for development of parts of
Inga, MediaPoint, AmigaDE games and MerlinNG.


It contains the QConv tool, which is a tiny tool which converts sound and picture
files to IFF's .. it's needed by some programs like merlin.
It uses dataTypes and replaces all the custom convert code.
It runs on a classic Amiga.

It contains the Updated soundhandler, which is a background task which handles
sound msg requests from other programs like the Choplift3D game.
It runs on Classic systems it handles Paula and AHI.
AHI might give some trouble as it is fairly untested.


Also it contains the test program ... which is the crystal library with a Merlin,
Excaliber and game frontend.
It runs on Classic machines with AGA, Picasso96 and Cybergraphics.
It also runs on the AmigaDE virtual computer.
(Please set the stack on P96 machine to 8192 or higher !!)

It selects the best graphics mode automatically.
Or use the next flags to select a mode:
-A = AGA, -P = Picasso, -C = Cybergraphics

With the games -B is a borderless window.
With games you can scale the window with -Snn where nn is a number.
The default value is 16 ... so use something like -S32 for a big window.
Also the screen of a game can be saved with the S key.
To ram: on a classic machine, and default dir on AmigaDE.
Games can be quit with the Q key or the escape key.


The Crystal Library

AmigaDE version of the program.

Download the the last beta of crystal.
Includes executable for classic amiga and AmigaDE V1.30.
cryst2.lha 350kB DOWNLOAD


Usage: (on AmigaDE replace "test" with "./test.00")

Interprete merlin GUI scripts

test <- interprete main.mcp
test 1 <- interprete main.mcp
test 1 test <- interprete test.mcp

Note that some merlin concepts as arexx are
not support at this moment.





Interprete excaliber graphics scripts

test 2 <- interprete zircon.scr
test 2 test <- interprete test.scr

This is the full excaliber interpreter




Execute some graphics calls

test 3





Choplift3D Game
This is a 3D game with textures and shaded graphics.
Some of the textures are actually excaliber scripts, lists
of vector graphics calls which are rendered at load time.
On a classic machine this game can be controlled with a joystick.
Note that turns and up and down are made by handling the stick while
the firebutton is pressed !!
Also the game on all targets can be controlled by the numerical keyboard.
Where the + and the - keys are for regulating height.
(note that + and - are interpreted the wrong way around !)


test 4 <- Choplift3D mode.





Very old mode from Elite like game .. need to put in a newer version
The game on all targets can be controlled by the numerical keyboard.

test 5 <- Elite like game




cnt