enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] Mas Microban Lua code with visual maps


From: Raoul
Subject: Re: [Enigma-devel] Mas Microban Lua code with visual maps
Date: Wed, 24 Mar 2010 16:24:39 +0100
User-agent: unknown

Hi Simon,

> Enigma is under GPL 2.0 license which means that all the lua code is
> free.

You can download the whole source code from our download page:
http://www.nongnu.org/enigma/download.html

This is the code that's behind Enigma 1.01.


You can even browse through all the code online:
http://svn.berlios.de/wsvn/enigma-game/trunk/#_trunk_

This code is newer (the current development is going on here)
and will used for the next release, Enigma 1.10.

> Under Windows the xml files you are looking for are all placed
> in a folder called "levels" itself in the "data" folder (itself in
> "enigma" somewhere in "program files"). Under Linux I have
> "/usr/share/games/enigma/levels" as a path. I guess it is very
> similar under Mac because it is said to be an Unix OS. I you don't
> understand what I mean just use the finder to get an "enigma" folder
> and you will have them.

The levelfiles are plain text xml files, you can open them with
any texteditor. (MS Word is not a text editor...) It is important
use utf-8 encoding otherwise Enigma can get into troubles when loading
the files.

The files are located at enigma/data/levels/ in one directory enigma_* per
levelpack "Enigma *".

> If you want to know how the Enigma levels are made just hit "wiki" at
> the left of the Enigma webpage and you will have beautifully colored
> levels. You will see that there is not so much lua in them,

Be aware that the way a level is written has changed since Enigma 1.01.
We now use a level API called "new API" which works quite different
from what was used in Enigma 1.01.

You should learn the new API as everything else is depreceated.
A new API level can be recognized by the xml line:
      <el:compatibility el:enigma="1.10"/>
(And of course by different lua code)

The english version of the level wiki has some articles about the new API.
http://enigma.mal2.ch/index.php?title=Main_Page

The wiki has some demos presented together with the whole lua code, look
for the sections "Full Examples" and "Neat Examples" (difficult but nice code).

A very simple template for a level file can be found here:
http://enigma.mal2.ch/index.php?title=New_API_Level_Template

Many topics are missing in the wiki and can be found in the reference manual.
A recent version is available here:
http://anonym.to/?ftp://ftp.berlios.de/pub/enigma-game/docs/enigma-ref_svn_r2046.pdf

> but if
> you are used to Sokoban levels seen as texts you should find the API
> 2 rather easy, for example the walls are almost always represented by
> "#" characters.

> Think also that Enigma comes with a library which automatically
> translates from sokoban to lua...

Yes, in some way. Enigma 1.10 will bring a new and much better library
for reading and manipulating sokoban level files. The important libraries
are "libimport" and "libsoko". You should definitely have a look at these.

BTW: There are plans to include more levels from David Skinner in the
standard Enigma distribution.


All I mentioned here will NOT work with Enigma 1.01. You need at least
a Milestone version. Look here for downloads:
http://download.berlios.de/enigma-game/

Or compile the code by yourself. Or wait until Enigma 1.10 is available.
(It should not take too long anymore)


-- Raoul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]