Jump to content

instantia
 Share

Recommended Posts

How to create it?  :huh:

 

ground2.jpg

 

- red line - polygon.

- colorful squares - tile map - random or atlas file.
 

How to set the polygon object I know. Here, too, and plan. 
How do I randomly impose sprites? What to do to create? To trim down the red line
Link to comment
Share on other sites

Made using csv

game.load.tilemap('ground0', 'data/levels/ground0.csv', null, Phaser.Tilemap.CSV);game.load.image('tiles', 'data/textures/ground.jpg');
this.tile = game.add.tilemap('ground' + this.id, 256, 256);this.tile.addTilesetImage('tiles');this.layer = this.tile.createLayer(0);

I do not know now how to cut and set polygon :(

Link to comment
Share on other sites

this is just a proposal.. . you could make use of a different approach.

 

create a normal tilelayer in tiled where you "paint" all your ground tiles / slanted tiles / sloped tiles...   you would of course need a tileset image that provides those 45° or 30° tiles to paint the ground as in your example image..

then - in your code - create this layer and do nothing more with it..  just display it (as background without collision)

 

in tiled create an "object layer" and paint along the ground with the "polyline tool"  (no other tool will work)  - -you can then create physics bodies out of your poly line objects in your code (be careful to close your polyline objects as precise as possible)

 

 

http://www.html5gamedevs.com/topic/6556-how-to-export-from-tiled-and-integrate-into-phaser/?p=39495

Link to comment
Share on other sites

this is just a proposal.. . you could make use of a different approach.

 

create a normal tilelayer in tiled where you "paint" all your ground tiles / slanted tiles / sloped tiles...   you would of course need a tileset image that provides those 45° or 30° tiles to paint the ground as in your example image..

then - in your code - create this layer and do nothing more with it..  just display it (as background without collision)

 

in tiled create an "object layer" and paint along the ground with the "polyline tool"  (no other tool will work)  - -you can then create physics bodies out of your poly line objects in your code (be careful to close your polyline objects as precise as possible)

 

 

http://www.html5gamedevs.com/topic/6556-how-to-export-from-tiled-and-integrate-into-phaser/?p=39495

 

:( And no other way? This is not particularly suited. I need to ask a different curve landscape

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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