Jump to content

noob42

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

noob42's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. Its prolly that the collision box around the sprite box is slighlty big, am gna try to fix that, thanks mate
  2. pretty fun game mate, well done, i hope u continue along this path, even as a hobby
  3. It is playable with the keyboard
  4. My first game using phaser framework, presented it as my final year project, very humble and easy not much going on, just a simple platformer that's supposed to take away the fear of programming. Although i would suggest some ear muffs cuz the music can get pretty annoying
  5. hello everyone i have been trying my best to load a tilemap that i created in tiled but to no avail, chrome keeps giving me this error Phaser.Tileset - actual and expected number of tile rows and columns differ, (function (Phaser){ var game= new Phaser.Game(640,480,Phaser.AUTO,'game',{ preload:preload, create:create, update:update }); function preload(){ //game.load.image('character', "asset/Idle.png"); game.load.tilemap('tilemap','asset/leveltrial.json', null,Phaser.Tilemap.TILED_JSON); game.load.image('tiles',"asset/map.png"); } var player; var facing="left"; var hozMove=300; var vertMove=-240; var jumpTimer=0; var map; var layer; function create(){ game.stage.backgroundColor='#00000'; //game.physics.startSystem(Phaser.Physics.ARCADE); map=game.add.tilemap('tilemap'); map.addTilesetImage('platformer','tiles'); layer=map.createLayer('Tile Layer 1'); //glayer=map.createLayer('Grounlayer'); // map.setCollisionBetween(1,5,true,'Background'); // player=game.add.sprite(64,64,'character'); // game.physics.enable(player); layer.resizeWorld(); //player.body.collideWorldBounds=true; //player.body.gravity.y=300; //game.camera.follow(player); } function update(){ /*game.physics.arcade.collide(player,layer); player.body.velocity.x=0; if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) { player.body.velocity.x=-hozMove; if(facing!=="left"){ facing="left"; } } else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) { player.body.velocity.x=hozMove; if(facing!=="right"){ facing="right"; } } if (game.input.keyboard.isDown(Phaser.Keyboard.UP) && player.body.onFloor() && game.time.now>jumpTimer){ player.body.velocity.y=vertMove; jumpTimer=game.time.now + 650; }*/ } }(Phaser));
×
×
  • Create New...