Jump to content

Manually draw tiles from a tileset


casarock
 Share

Recommended Posts

Hi,

 

I am currently experimenting with some kind of endless scroller/runner game. Therefore I want to implement a custom Map Rendering based on segments which are being concatenated and - when out of sight - deleting from a dynamic tiles array.

 

I would like to know if it is (easily) possible to render a specific tile which I get from tileset.tiles array.

 

A deeper look into "TilemapLayer.js" shows, that phaser simply uses "drawImage" on the canvas context. Trying to draw the tile using canvas at my update-method wasn't successful. When I put it into my render-method it flickers.

 

My concrete question:

 

- Is it possible (means: powered by phaser!) to render a tile without having a tilemap for some kind of cutom tilemapping?

 

Thanks in advance!

Link to comment
Share on other sites

Hi,

 

I didn't saw renderTexture. Looks nice. But I would like to have the power of a structured tileset (colision etc.) with my own rendering. 

 

Maybe I got you wrong. Your idea is rendering the segment into a texture and concatenating? Unfortunately renderTexture is not covered with documentation at the moment.

 

I'll play with renderTexture. Maybe I get the idea or an other way. 

 

Cheers

Carsten

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...