Author Topic: Updated FlxTilemap for isometric tiles[INCOMPLETE]  (Read 4116 times)

mol

  • Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
I've worked in the last month in developing isometric tiles on FlxtTlemap.

This is done by adding a new variable called       
Code: [Select]
protected var _tileOffset:FlxPoint;

wich is created in
Code: [Select]
public function loadMap(MapData:String, TileGraphic:Class, TileWidth:uint=0, TileHeight:uint=0, AutoTile:uint=OFF, StartingIndex:uint=0, DrawIndex:uint=1, CollideIndex:uint=1,tileoffset:FlxPoint = null):FlxTilemap

it basically skew's the tile in varius ways

Altough i've managed to skew any tile almost any lenght It lacks "isometric" tiles ,and it has some x,y position bugs, however it does has some functionality

(movement esdf keys)
<a href="http://dl.dropbox.com/u/20459287/tlmp/Proto.swf" target="_blank" rel="noopener noreferrer" class="bbc_link bbc_flash_disabled new_win">http://dl.dropbox.com/u/20459287/tlmp/Proto.swf</a>

Since the collisions are handled by the AABB flixel system that's why it feels kind of blocky in the edges

This was done keeping in mind the DAME editor tool


For the momment this is enough for me to continue, but i was hoping if someone saw it and decided to use it, or even improve it .

In any case here is the moddified FlxTilemap (and  FlxTilemapBuffer) and the DAME lua exporter

http://dl.dropbox.com/u/20459287/tlmp/modFiles.zip

if anyone has any questions i ll be checking this thread : D

Aaron

  • Member
  • **
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Updated FlxTilemap for isometric tiles[INCOMPLETE]
« Reply #1 on: Mon, Mar 26, 2012 »
An easy way to do isometric tiles is to create a diamond say 50 by 50 and half its height to 25 by 50. Dame has the ability to create diamond tiles. Then for walls do a skewed tiles at the right dimensions. You may need to update the FlxTilemap but I got it to work.

mol

  • Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Updated FlxTilemap for isometric tiles[INCOMPLETE]
« Reply #2 on: Thu, Apr 5, 2012 »
that is a very good idea now that you mention it!

but the thing is as you said, flixel does NOT support isometric( skewed etc ) tiles by de-facto, i started this in the hope that someone might pick this code up and tidy it up for anyone to use : D

test84

  • Key Contributor
  • *****
  • Posts: 1328
  • Karma: +0/-0
  • ت
    • View Profile
    • My personal site.
Re: Updated FlxTilemap for isometric tiles[INCOMPLETE]
« Reply #3 on: Thu, Apr 5, 2012 »
look at DAME, it has support for isometric tiles, maybe it's exporter's code for isometric tiles give you a head start.
blog, twitter, Check out my award winning game, Rot Gut:

Aaron

  • Member
  • **
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Updated FlxTilemap for isometric tiles[INCOMPLETE]
« Reply #4 on: Sat, Apr 7, 2012 »
Isometric doesn't work from dame to flixel there seems to be a bug that makes it think it is square. I modified mine to correct it but it doesn't show in the centre.

mol

  • Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Updated FlxTilemap for isometric tiles[INCOMPLETE]
« Reply #5 on: Mon, Apr 9, 2012 »
look at DAME, it has support for isometric tiles, maybe it's exporter's code for isometric tiles give you a head start.

that is exactly what it is!

as i said, this was done keeping in mind the DAME editor tool, since flixel does NOT
support ( as of right now) "isometric" tiles, this feature wont work on the get go

it would be an honor if i could help add something (even if its something so trivial) to flixel, but it first has to work properly!

i've been using it to continue my development and its coming along somewhat good

(movement esdf keys + space )
<a href="http://dl.dropbox.com/u/20459287/actual%20version/Proto.swf" target="_blank" rel="noopener noreferrer" class="bbc_link bbc_flash_disabled new_win">http://dl.dropbox.com/u/20459287/actual%20version/Proto.swf</a>

but it's far from finished, i mean it can work but there are still some bugs that im having trouble fixing

in any case please let me know if someone finds something new!
« Last Edit: Tue, Apr 10, 2012 by mol »

mol

  • Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Updated FlxTilemap for isometric tiles[INCOMPLETE]
« Reply #6 on: Mon, Apr 9, 2012 »
Isometric doesn't work from dame to flixel there seems to be a bug that makes it think it is square. I modified mine to correct it but it doesn't show in the centre.

Could you show me what code did you correced?

paala

  • Contributor
  • ****
  • Posts: 250
  • Karma: +0/-1
    • View Profile
Re: Updated FlxTilemap for isometric tiles[INCOMPLETE]
« Reply #7 on: Tue, Apr 10, 2012 »
I wonder if you can post the whole project(dame and flixel files) here.

mol

  • Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Updated FlxTilemap for isometric tiles[INCOMPLETE]
« Reply #8 on: Tue, Apr 10, 2012 »
I wonder if you can post the whole project(dame and flixel files) here.

well, since this is a finall proyect i cant quite do that yet, however i can post something that illustrates how it's used tonight!

mol

  • Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Updated FlxTilemap for isometric tiles[INCOMPLETE]
« Reply #9 on: Mon, Apr 16, 2012 »
sorry for not posting something yet, my laptop broke down and im kind of stranded at the moment, i ll work on it when i get it back though :D
« Last Edit: Sun, May 20, 2012 by mol »

mol

  • Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Updated FlxTilemap for isometric tiles[INCOMPLETE]
« Reply #10 on: Sun, May 20, 2012 »
Xander just realesed a new awesome version of dame!

http://forums.flixel.org/index.php/topic,6358.0.html

go check his tilemaps edit!