Author Topic: Tilemaps: Mappy loader for FMP format v1.0  (Read 5957 times)

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1773
    • View Profile
    • Homepage
Another version for the FMP loader. It only supports version 1.0 of the format so make sure you set that in the editor!
Now scrolling is working as expected. You can turn on or off wrap North/South, East/West. No collision yet because I'm still working on getting the sprite.y sorting to work well.

http://gamecorner.110mb.com - click the code tab
Updated 2008-08-17

Screen updates with animated tiles at around 20 fps on a GP2X with eight layers of tiles. (If you ever would like that many layers)

Each tile will have four flags for collision so you can make tiles that block passage in 1, 2 or three directions (or all four for that matter) Makes for nice placements of chairs or fences that don't have to waste a whole tile for blocking.
« Last Edit: 2008-Aug-17 by Moru »

Offline D2O

  • Prof. Inline
  • *****
  • Posts: 1061
    • View Profile
    • http://www.deuteriumoxid.com
Mappy loader for FMP format v1.0
« Reply #1 on: 2008-Feb-28 »
Nice :)
I7 2600K; 8 GB RAM ; Win10 Pro x64 | NVidia GTX 750 TI 2048MB ; Realtec OnBoard Sound;
Lenovo ThinkPad T400: XP Pro
GLB Premium-immer Aktuell

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10695
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Mappy loader for FMP format v1.0
« Reply #2 on: 2008-Feb-28 »
Aces! That was one we were really missing!

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1773
    • View Profile
    • Homepage
Re: Tilemaps: Mappy loader for FMP format v1.0
« Reply #3 on: 2008-Aug-18 »
Finaly a new version up with actual working scrolling and sprite y sorting :-)

onugl

  • Guest
Re: Tilemaps: Mappy loader for FMP format v1.0
« Reply #4 on: 2008-Aug-18 »
Finaly a new version up with actual working scrolling and sprite y sorting :-)
=D Nice! I will use it for my future projects!

Offline equinox

  • Mc. Print
  • *
  • Posts: 19
    • View Profile
Re: Tilemaps: Mappy loader for FMP format v1.0
« Reply #5 on: 2008-Sep-18 »
You can explain me,please, how to use and to compile the files that I find in the file zip? 

Tnk1000.

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1773
    • View Profile
    • Homepage
Re: Tilemaps: Mappy loader for FMP format v1.0
« Reply #6 on: 2008-Sep-18 »
You start off by putting all the files into their own map in your code-library. Start the "Mappy Loader.gbap" file and look in the example.gbas to see how the map is loaded. There should be comments explaining each stage.

Let me know if there is something specific you want explained!

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1773
    • View Profile
    • Homepage
Re: Tilemaps: Mappy loader for FMP format v1.0
« Reply #7 on: 2009-Jan-12 »
Ok, finaly made it to find some time for the collision code. It's mostly working, only problem is if you set a block that has the override collision-flag on any layer, that will get you stuck on that block. The collision is usable without this function, it's just for making the mapping easier without having to create lots of extra tiles for bridges over rivers and similar things. If you test the example you will get stuck on the bridge, the left landing-stages in the lake and the cave opening.

The special part of the collision in Mappy is that you can set edges as collision instead of the whole block. For example you can make a block that blocks you from going left and right but you can go up and down. this makes it easy to put up fences that only takes the edge of each block. If you test the example, the brown area to the left and right is supposed to be a fence, you can walk around inside them and outside without there being a big block that prevents you from going close to the fence from one side.

You get to the collision flags if you double-click the block and set the flags that are in a small square. Meaning as follows:

X UpX Right
X DownX Left

To get one block to take preference over all other blocks on the same place in all layers you set the flag 3 on that block. This is not totaly working yet as explained above but that is the plan for the future.

If you want the correct names on the flags you can insert this line into the MAPWIN.INI file in Mappys install map:
Code: GLBasic [Select]
blockdialoguelabels=User data:;U1;U2;U3;U4;U5;U6;U7;up;ri;dn;le;bg transp;flag 1;flag 2;flag 3;

As usual, download the code with examples on my homepage:
http://gamecorner.110mb.com