Etna stands for Easy daTabase Network Access. This library helps to connect to a web database of type
PHP/MySql (other database type should work as well). This library may be used with all versions of Blitz (BlitzBasic, BlitzPlus,
Blitz3D AND BlitzMax), as well as PureBasic, DELPHI and C++.
The two main advantages of this library are
it uses threads, which means that the flow of the program
is never slowed down while there is a request on a server. You can send more than one thread at a time thanks to the queueing system.
This makes this library perfect to be
implemented in games, where you don't want that an access to a database slows down the game.
This library is thus particularly useful for all games playable on the network.
it has the option to encrypt/decrypt the data you are sending over the internet. This is virtually impossible for
a hacker to read what you are sending or receiving. This makes games (high score, statistics) more secure.
A large number of applications is possible with this library. Some examples for an online game:
continuoulsy publish the game data on a web page (score, number of people connected, chat, etc.),
create "persistent players", which keep/improve their properties/personalities games after games,
use of a master server to avoid players typing IP numbers (see Gnet on the library page),
use of a chat before the connection to a server,
and much much more!
But this library is also useful for non online games:
online high score table,
comparison of performance (time for example) between the local player and other players in the world,
and much much more!
Etna, although simple to use, is aimed at people knowing a few notions of SQL request and PHP language
(or similar database type).
Notice that Etna does not access the database directly, but instead needs a server (distant or local) running a script able to
access the database (like in the case php/mySql). Etna is working with php script: other script languages are not garanteed to work,
but the authors are willing to integrate them if you make the request.
Please note that Etna is not multiplatform (Windows only).
Use of threads: no more slow down of the program while you access the database.
Unlimited number of threads can run, thanks to the queueing system. You don't have to wait for the completion of a request.
Ultra-secure encryption to protect your data during the communication with the server (using keys to encrypt/decrypt).
Automatic detection of encryption when receiving a message so that encryption is as easy as no encryption.
Very easy to use! Less than 10 lines of code to use ETNA, including threads and encryption!
100% free!! (see license)
License and download
This library is an "email-ware". This means that this library is free. However, if you use this library
in one of your project, you MUST contact the authors saying that you are using Etna. An email, or a
post in a forum (Etna, Blitz or PureBasic forum), is required
whatever is the status of the project: commercial or non-commercial, completed or in development. Even if
the project is just starting, is just private or will never be released, you are still required to send an
email. Needless to say, your email won't be use except for the authors to do a count of their users.
Contacting the authors gives you automatically and immediately the rights to use the library without restrictions.
If you wish, you could describe your project in your email, and we can even include a link to your project
on this web page if you authorize us (see below).
To contact the authors: Progi1984, RepeatUntil or the
If you agree on this license, you can download the latest version of this library from
Common to all languages: php installation for encryption
If you are using encryption with ETNA:
Upload ETNA_encryption.php to your server (you can find this file in the php/ directory of the ETNA package)
Add "include 'ETNA_encryption.php';" at the top of your php file
Install Etna.decls in the userlibs/ folder of BlitzBasic (don't forget to do that again when there is a new version of ETNA!!)
Install Etna.dll and Etna_inc.bb in the application folder (Etna.dll may be also installed in the userlibs/
Include Etna_inc.bb in your program
Install Etna.dll and Etna_inc.bmx in the application folder
Include Etna_inc.bmx in your program
Install Etna/PureBasic/PureLibraries/UserLibraries/ in Purebasic/PureLibraries/UserLibraries/
of your PureBasic distribution
Install Etna/PureBasic/Residents/ in Purebasic/Residents/ of your PureBasic distribution
Install Etna.dll and Etna_inc.pas in the application folder
Include Etna_inc.pas in your program (adding "ETNA_inc in 'Etna_inc.pas';" in the "uses" list)
Install Etna.dll and Etna.h in the application folder
Include Etna.h in your program
In your program, create an object InterfaceETNA, for example "InterfaceETNA ETNALib;"
You can access all methods using this object, for example
"ETNALib.SetServeur("http://www.mysite.com");" (so please note that the name of C++ function
is sligthly different from other languages, since there is no ETNA_ prefix)
Be cautious when reading the doc about some difference between Blitz and C++ (for example the difference between boolean and integer)
Examples and tutorials
You can see some examples of the use of this library in the Examples/ directory. You will find:
a very simple example, with or without thread, with or without encryption;
a high score example (no encryption / encryption);
a chat program (by Loki);
an example for DELPHI using GUI (by Izguit).
The majority of the examples are in all languages (Blitz, Delphi, PureBasic and C++). Some examples are
only in one or two languages, but you could always look at them since the Etna commands are
the same in all languages.
Etna is a dll: if you wish to see other languages supported (C#, DarkBasic, etc) and you own one of these languages,
then you are welcome to wrap Etna for this specific language (and let us know!). Wrapping Etna for a specific language is easy
and shouldn't be more than 30 lines of code (that you are just copying from another wrapper!).
Games/Applications using Etna
Invasion (see the "Games" menu on the left, entirely updated in real time by Etna)
(if you wish to see your game/application listed here, please let us know)
Special thanks to Loki for the logo and beta-testing.
Many thanks to Izguit to have implemented Etna in the DELPHI language.
Special thanks to Fra who developped the wrapper for the C++ language.
This library was written within the BlitzKlan .