Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Map I made from Tiled is not shown in Phaser.


notalentgeek
 Share

Recommended Posts

I want to display my map that I have just created from Tiled in Phaser. This is code.

var statePreload = {     preload:    function(){         game.load.tilemap   ('TileMap1',        'assets/tilemaps/32TilesPlatformScifi.json', null, Phaser.Tilemap.TILED_JSON);        game.load.image     ('ImageTileMap1',   'assets/tilesets/32TilesPlatformScifi.png');     },    create:     function(){ game.state.start('StateGame'); } };var stateGame = {     create: function(){         this.map = game.add.tilemap('TileMap1');        this.map.addTilesetImage('32TilesPlatformScifi', 'ImageTileMap1');     },    update: function(){} };var game = new Phaser.Game(672, 672, Phaser.AUTO, 'gameDiv');    game.state.add  ('StateBoot',       stateBoot);    game.state.add  ('StatePreload',    statePreload);    game.state.add  ('StateGame',       stateGame);    game.state.start('StateBoot'); 

http://pastebin.com/K9CY8jfU

 

When I run, there is no error (no error in the console), it is just the map I created with Tiled is not showing off (black screen). What could be the problem?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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