Skip to main content
Tweeted twitter.com/#!/StackGameDev/status/458751080768495616
added 212 characters in body
Source Link
Daniel Ribeiro
  • 322
  • 1
  • 3
  • 11

I'm using Phaser to build an isometric game. The framework doesn't have support for isometric tilemaps yet, so I'm starting to write a PR for it to support.

What I currently have, loading an isometric tilemap on the current Phaser.Tilemap object, is this:

enter image description here

As you can see, the tiles are wrongly positioned because of the simple 2D tile positioning approach the framework currently uses.

The class that actually makes the parsing of the JSON map and converts it into a tilemap is Phaser.TilemapParser, specifically at line 185.

What I need is some help on where to start adapting this parser – or any other part of the code – in order for it to support isometric tilemaps.

I'm not sure whereI don't know exactly where to start extending this parser – or even writing a new parser just for isometric tilemaps. Also, I know the calculations and positioning are donedifferent for positioning isometric tiles, and I want to know too where that change should go here, as I didn't find that either.

I'm using Phaser to build an isometric game. The framework doesn't have support for isometric tilemaps yet, so I'm starting to write a PR for it to support.

What I currently have, loading an isometric tilemap on the current Phaser.Tilemap object, is this:

enter image description here

As you can see, the tiles are wrongly positioned because of the simple 2D tile positioning approach the framework currently uses.

The class that actually makes the parsing of the JSON map and converts it into a tilemap is Phaser.TilemapParser, specifically at line 185.

What I need is some help on where to start adapting this parser – or any other part of the code – in order for it to support isometric tilemaps.

I'm not sure where exactly the calculations and positioning are done.

I'm using Phaser to build an isometric game. The framework doesn't have support for isometric tilemaps yet, so I'm starting to write a PR for it to support.

What I currently have, loading an isometric tilemap on the current Phaser.Tilemap object, is this:

enter image description here

As you can see, the tiles are wrongly positioned because of the simple 2D tile positioning approach the framework currently uses.

The class that actually makes the parsing of the JSON map and converts it into a tilemap is Phaser.TilemapParser, specifically at line 185.

What I need is some help on where to start adapting this parser – or any other part of the code – in order for it to support isometric tilemaps.

I don't know exactly where to start extending this parser – or even writing a new parser just for isometric tilemaps. Also, I know the calculations are different for positioning isometric tiles, and I want to know too where that change should go here, as I didn't find that either.

Source Link
Daniel Ribeiro
  • 322
  • 1
  • 3
  • 11

Adapting tilemap algorithm to support isometric tilemap

I'm using Phaser to build an isometric game. The framework doesn't have support for isometric tilemaps yet, so I'm starting to write a PR for it to support.

What I currently have, loading an isometric tilemap on the current Phaser.Tilemap object, is this:

enter image description here

As you can see, the tiles are wrongly positioned because of the simple 2D tile positioning approach the framework currently uses.

The class that actually makes the parsing of the JSON map and converts it into a tilemap is Phaser.TilemapParser, specifically at line 185.

What I need is some help on where to start adapting this parser – or any other part of the code – in order for it to support isometric tilemaps.

I'm not sure where exactly the calculations and positioning are done.