MAPPY
MAPPY
hello,
is there somebody who have done a procedure to load and read a file created with mappy (.FMP) (this is a famous map editor which can be found here : http://www.tilemap.co.uk/index.html ) ??
is there somebody who have done a procedure to load and read a file created with mappy (.FMP) (this is a famous map editor which can be found here : http://www.tilemap.co.uk/index.html ) ??
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
for those who need a multidir scroller :
i quickly coded (so, not very well coded but works) an example of how to import Mappy .MAP files and then display it on screen.
direct download here : http://serveurperso.com/~flype/purebasic/PbMario.zip
hope it could help !
i quickly coded (so, not very well coded but works) an example of how to import Mappy .MAP files and then display it on screen.
direct download here : http://serveurperso.com/~flype/purebasic/PbMario.zip
hope it could help !

No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Reading .MAP files is quite easy, but reading .FMP files should be a bit more tricky as FMP includes graphics in the file. Perhaps one day, if i have enough time, and the file structure is public, so...
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Reading from 'MAPWIN.HTM' included with Mappy v1.3.21
The FMP file format
The FMP format (how the maps are stored) is a 'chunk' based format which allows all the information for the map (graphics, array, anims, block data etc) to be stored in a single file, you can also add your own chunks to this file if you want, more details in FMP file format.The playback libraries then provide functions to load and play the map within your game.
This is technical information about the FMP file structure:
I would love to get started on this. I'm just going through it all trying to understand the format and trying to understand the syntax and code of the other playback libs. (Don't hold your breath! :roll: )
The FMP file format
The FMP format (how the maps are stored) is a 'chunk' based format which allows all the information for the map (graphics, array, anims, block data etc) to be stored in a single file, you can also add your own chunks to this file if you want, more details in FMP file format.The playback libraries then provide functions to load and play the map within your game.
This is technical information about the FMP file structure:
Code: Select all
Chunk header:
4bytes ASCII = ChunkID (example: 'MPHD')
long int = size of chunk data less header
These are the chunks as of V1.2:
ATHR - Up to 4 ASCII strings of author information, separated by 0 values, always an even size.
MPHD - Map header, see struct in mappy.c
EDHD - Editor information, see struct in mappy.c
CMAP - Colour palette for 8bit maps, red byte, green byte, blue byte for however many colours are needed (so usually 256*3 bytes).
BKDT - Block data. Contains BLKSTR structures for however many block structures were made.
ANDT - Animation data. Contains ANISTR structures for however many animation structures were made, and also animation data.
BGFX - The raw graphics in whatever format the map is in. Examples: 8bit: mapwidth*mapheight bytes per block, in forward format *numblocks 16bit: mapwidth*mapheight*2 bytes per block, each word contains 5 bits red, 6 bits green, 5 bits blue.
BODY - An array of short ints containing positive offsets into BKDT, and negative offsets into ANDT.
LYR? - Where ? is an ASCII number form 1 to 7. These are the same size and format as BODY, and allow object layers to be used.
You can add your own chunks to a map file, if you load it into mappy, when you save it, those additional chunks will be saved in the file, but not necessarily in the same place as before.
FMP1.0 notes:
This is very similar, but the values in all the chunks refer to units rather than bytes, ie. in BODY 0,32,64,96 would be 0,1,2,3 in FMP1.0.
-
- Enthusiast
- Posts: 202
- Joined: Sun Apr 27, 2003 4:44 am
- Location: Michigan, USA
- Contact:
i'm agree, it could be sooo cool for begginners and the others !
but i'm not a good enough coder to make such a library ! It's a big work to make it... and i've no time at this moment...
but i'm not a good enough coder to make such a library ! It's a big work to make it... and i've no time at this moment...
But, perhaps, Kale can do itI would love to get started on this

No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
-
- Enthusiast
- Posts: 537
- Joined: Wed Oct 29, 2003 10:35 am
I'm trying to get this working as my first PB project..... 
I can load a 2d map, with anims etc and scroll all aound it.....
It's not pretty and it's probably very slow..... as I'm still not familiar with all the grafix functions yet !
More work to do though.... as I want it to do Isometric
I'll keep you posted....

I can load a 2d map, with anims etc and scroll all aound it.....
It's not pretty and it's probably very slow..... as I'm still not familiar with all the grafix functions yet !
More work to do though.... as I want it to do Isometric

I'll keep you posted....
yeah. using mappy as a standard for tilebased games is a perfect idea. when the pb codes are ready i think they should also be posted on the mappy site to give purebasic more attention (blitz and dark are also linked there).
-- spot | www.nothing.ch
Thanks for the heads up. I will keep an eye on this in anticipationValgar wrote:I have read on the forum of another mapeditor that it's autor is about to convert the loader code of it's editor to PB (i have this editor to work with blitz so i visit the forum many times).
The program is called Universal MapEditor and is really greath!

-----
If a man is standing in the middle of the forest speaking, and there is no woman around to hear him, is he still wrong?
If a man is standing in the middle of the forest speaking, and there is no woman around to hear him, is he still wrong?