elmadev / elmajs

Elasto Mania NPM package
https://elmadev.github.io/elmajs/
MIT License
8 stars 5 forks source link

Read and write Across levels #233

Open hexjelly opened 4 years ago

hexjelly commented 4 years ago

There are multiple different Across level formats, so they need to have their own parsers (probably). More or less copypaste the Elma level read/write structure, but for Across. How hard can it be? 🤷

Opening and then writing a level should return the same bytes (if possible?)

hexjelly commented 4 years ago

Reference: jon "information"

acros lev file structure
------------------------

Type       Size  Data
----------------------------
char[5]       5  "POT06"
double        8  integrity1?
double        8  integrity2?
double        8  integrity3?
double        8  integrity4?
              4  duno
char[14?]    14  Name of the lev
             45  000000000..........
double        8  Number of polygons + 0.4643643
POLYGON[]     -  
double        8  Number of objects + 0.4643643
OBJECT[]      -  

POLYGON:

Type     Size  Data
------------------------------------
dword       4  Number of vertice
VERTEX[]    -  A vertex is just two doubles : x and y. 16 bytes of course.

OBJECT:

Type     Size  Data
------------------------------------
double      8  Position : x
double      8  Position : y
dword       4  Type (1 = flower, 2 = food, 3 = killer, 4 = start)

Also see domi's python lib