Jump to content

Search the Community

Showing results for tags 'loadTexture'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 5 results

  1. Hello, I am new at this and I need help. I am using v3 to make a small game in which a sprite has to change appearance upon an event. I was trying to use the Phaser 2 example below: var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create }); function preload() { game.load.atlasJSONHash('bot', 'assets/sprites/running_bot.png', 'assets/sprites/running_bot.json'); game.load.spritesheet('mummy', 'assets/sprites/metalslug_mummy37x45.png', 37, 45, 18); } var bot; function create() { bot = game.a
  2. Hello everybody. I am trying to optimize my game, and would like to know, which of this two Phaser techniques would be more optimal in term of resource usage. On one side I got SpriteSheet - 'atlasJSONHash'. // preload game.load.atlasJSONHash('image', 'assets/image.png'); // create var foo = game.add.sprite(0, 0, 'image'); foo.animation.add('main'); foo.animation.play('main', 30, true); On other side I got just a sprite with a texture, and I'm changing it's texture in the Phaser render function, with another preloaded texture. // preload var textureAr
  3. I have a sprite with a sprite sheet and it works find, but when i change the texture of the sprite to a different sprite sheet it pause the whole game for a second... why is that??? this.item = this.game.add.sprite(0,0,"mainCharacter"); this.item.anchor.set(0.5); function foundItem(){ this.item.loadTexture("mainCharacterFound", 0); }
  4. icp

    2.4.2 loadTexture

    I'm using a tween that changes the texture of a Sprite when onComplete method gets called. Sometimes it fails to change the texture via this.sprite.loadTexture('myTexture'); . Everything works fine with Phaser 2.3 .
  5. Hello I'm currently working on a simple memory game. I got it working, but I'm not content with how certain things are done in the code. For example, right now I'm using one sprite for the face up and one sprite for the face down of a card. With visible=false / visible=true. And since these are different sprites which are supposed to be at the same coordinates I have to update 2 things instead of 1. I've also tried using the loadTexture-function. But this removes the old texture and it loads it and reloads it etc, which works for small numbers, but what if I wanted a memory of the size 100
  • Create New...