Thursday 31 July 2014

Apoplexy Level Editor

Apoplexy Level Editor

Wake up after a long sleep...

I'm developing the porting of the Apoplexy XML file, it contains the definition of a Prince Of Persia 1 level structure.

This is the first load of the level1.xml



Original file

<?xml version="1.0" encoding="UTF-8" ?>
<level number="1">
<rooms>
<room number="1">
<tile element="0" modifier="0" />
<tile element="0" modifier="2" />
<tile element="0" modifier="2" />
<tile element="0" modifier="2" />
<tile element="0" modifier="2" />
<tile element="0" modifier="0" />
<tile element="0" modifier="1" />
<tile element="0" modifier="0" />
<tile element="0" modifier="2" />
<tile element="0" modifier="2" />
<tile element="0" modifier="0" />
<tile element="0" modifier="2" />
<tile element="0" modifier="1" />
<tile element="0" modifier="0" />
<tile element="0" modifier="0" />
<tile element="0" modifier="0" />
<tile element="0" modifier="1" />
<tile element="0" modifier="1" />
<tile element="0" modifier="2" />
<tile element="0" modifier="1" />
<tile element="0" modifier="1" />
<tile element="0" modifier="0" />
<tile element="1" modifier="0" />
<tile element="0" modifier="1" />
<tile element="0" modifier="0" />
<tile element="0" modifier="0" />
<tile element="0" modifier="1" />
<tile element="0" modifier="2" />
<tile element="0" modifier="0" />
<tile element="0" modifier="1" />
<guard location="0" direction="1" skill="255" colors="255" />
<links left="5" right="0" up="0" down="2" />
</room>

Tuesday 29 July 2014

A little help

A little help

I transcript a initial private conversation about PoP.net futures

SALVADOR CABANAS
Andrea, i want to ask about prince net, what elements need to be added, i cannot see prince interactions with items, also there is no fighting animation??? anything else that need to be added???

ME
Dear,
the first step (I think) is make the compatibily with Apoplexy level editor.
Apoplexy is a prince of persia editor maded from Norbert, it permit to load standard prince dat files and export into xml, my last attempt is to read the output xml for 
generate the levels.
There are a lot of custom and original level maded by prince fans, it will be cool load the original and custom levels into the PoP.net.
link -> http://forum.princed.org/   see level editor

Prince interaction with item are done : sword, potions

Prince fighiting animation are all done : sword combat
Miss: some interaction with plate 

Good look and if you make some changes into the PoP.net source please commit on original codeplex repository.

bye




SALVADOR CABANAS
You need to change the level structure to make it compatible, by now it allow some different stuff, like each room is an xml file, the problem is that apoplexy will not allow some references to elements becuase is not a net application, is c++ based..

ME
Yeah right,
the apoplexy xml output is bad, BUT i don't like to program another PoP level editor.
The solution is to make a wrapper for read the Apoplexy xml and build the maze or a conversion tool for write PoP.net xml.

The best solution i think it's the first.
We can check on startup the presence of some files into the dir ".\Apoplexy\xml" and if found
read and build the maze

The Apoplexy tags are

<level>
<rooms>
<tile element="x" modifier="x">
<guard location="x" direction="x" skill="x" colors="x">
<links left="x" right="x" up="x" down="X">
</rooms>
</levels>
<prince room="x" location="x" direction="x">
</prince> //MISSED CLOSING TAG Norbert can you fix it!!!
<userdata fields="?">
<field key="Level Description" value="Level 1">
<field key="Original Level Number" value="1">
</userdata>

<events>
<event number="x" room="x" location="x" next="x">
</events>



APOPLEXY LEVEL DEMO example

<?xml version="1.0" encoding="UTF-8" ?>
<level number="1">
<rooms>
<room number="1">
<tile element="0" modifier="255">
<tile element="0" modifier="255">
<tile element="0" modifier="255">
<tile element="33" modifier="0">
<tile element="1" modifier="1">
<tile element="33" modifier="0">
<tile element="33" modifier="1">
<tile element="33" modifier="0">
<tile element="52" modifier="0">
<tile element="52" modifier="0">
<tile element="51" modifier="0">
<tile element="51" modifier="0">
<tile element="33" modifier="1">
<tile element="35" modifier="0">
<tile element="0" modifier="0">
<tile element="52" modifier="0">
<tile element="20" modifier="0">
<tile element="20" modifier="0">
<tile element="20" modifier="0">
<tile element="52" modifier="0">
<tile element="20" modifier="0">
<tile element="20" modifier="0">
<tile element="52" modifier="0">
<tile element="52" modifier="0">
<tile element="46" modifier="0">
<tile element="35" modifier="0">
<tile element="11" modifier="0">
<tile element="1" modifier="1">
<tile element="33" modifier="0">
<tile element="52" modifier="0">
<guard location="0" direction="1" skill="255" colors="255">
<links left="5" right="0" up="0" down="2">

</room>
</level>.......

LINK TO THE APOPLEXY XML DOCUMENT
http://www.popot.org/documentation/documents/2014-07-29_PoP1_XML_Format.pdf