Jump to content

Search the Community

Showing results for tags 'atlasxml'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 4 results

  1. Hi all, since yesterday i am trying to animate my player. Below is the code: preload{ ...... this.load.atlasXML("player", "assets/sprites.png", "assets/sprites.xml"); this.anims.create({ key: "moving", frames: this.anims.generateFrameNames("monkey", { start: 0, end: 9, prefix: "idle", suffix: '.png' }), frameRate: 15, repeat: -1 }); } At create: var player = this.add.sprite(400, 285, "player", "idle0.png").setDisplaySize(55, 55); which works great! But on update where i want to animate my player i am getting this error: Uncaught TypeError: Cannot read property 'frame' of undefined It is like the frames array is not populated when i am creating anims on preload. frames:Array(0) i get at: console.log(this.anims.get("moving")); Any help would be appreciated! Thank you
  2. So I am preloading an atlasXML spritesheet game.load.atlasXML('sheet', 'images/sheet.png', 'images/sheet.xml'); and I can create a sprite using: game.add.sprite(game.world.centerX, game.world.centerY, 'sheet', 'playerShip1_orange.png'); I am trying not to use a for loop to create many sprites for a a sprite group I'm creating by using Group.createMultiple Now if I'm just loading a sprite or image, I can do this.meteorGrey = game.add.group(); this.meteorGrey.createMultiple(25, 'meteorGreyBig1.png'); Now when it's in a atlas sprite, this is where I'm running into trouble. this.meteorGrey = game.add.group(); this.meteorGrey.createMultiple(25, 'sheet', 'meteorGreyBig1.png'); It ends up displaying nothing
  3. Hi, This is my first project using Phaser i need help to solve atlasXML loading Sprite sheet. I am getting these errors.. "Phaser.Loader - Fishes: invalid XML (text)" phaser.js:56694:12"Phaser.Loader - textureatlas[Fishes]: invalid XML" phaser.js:55975:12"Texture with key 'Fishes' not found." phaser.js:35781:16not well-formed Phaser:1:1 game.load.atlasXML('Fishes', 'assets/Fishing.png', 'assets/Fishing.xml');used this line in preload(). blor = game.add.sprite(1000,200,'Fishes','blu-orng0000');used this line in create(). Images are being loaded in Chrome and IE11 but not in Mozilla.
  4. Hi there, I am new to phaser i started just yesterday. so i wanted to make a simple platformer game. But phaser crashes right at the beginning. i tracked it down and the problem is with atlasXML load of a spritesheet. its throwing the error - Uncaught Error: Texture Error: frame does not fit inside the base Texture dimensions [object Object]the import is like this - game.load.image('background', 'assets/bg.png');game.load.atlasXML('hud', 'assets/hud_spritesheet.png', 'assets/hud_spritesheet.xml');game.load.atlasXML('items', 'assets/items_spritesheet.png', 'assets/items_spritesheet.xml');game.load.atlasXML('tiles', 'assets/tiles_spritesheet.png', 'assets/tiles_spritesheet.xml');game.load.atlas('player', 'assets/p1_walk.png', 'assets/p1_walk.json');game.load.atlasXML('enemies', 'assets/enemies_spritesheet.png', 'assets/enemies_spritesheet.xml');only the last line is creating error the enemies line.... i check the format of its xml file its exactly the same as the other xml files...here's an example.... enemies_spritesheet.xml <TextureAtlas imagePath="sheet.png"> <SubTexture name="blockerBody.png" x="76" y="0" width="51" height="51" /> <SubTexture name="blockerMad.png" x="118" y="148" width="51" height="51" /> <SubTexture name="blockerSad.png" x="67" y="69" width="51" height="51" /> <SubTexture name="fishDead.png" x="0" y="69" width="66" height="42" /> <SubTexture name="fishSwim1.png" x="0" y="112" width="66" height="42" /> <SubTexture name="fishSwim2.png" x="0" y="155" width="62" height="43" /> <SubTexture name="flyDead.png" x="0" y="212" width="59" height="33" /> <SubTexture name="flyFly1.png" x="0" y="32" width="72" height="36" /> <SubTexture name="flyFly2.png" x="0" y="0" width="75" height="31" /> <SubTexture name="pokerMad.png" x="128" y="0" width="48" height="146" /> <SubTexture name="pokerSad.png" x="177" y="0" width="48" height="146" /> <SubTexture name="slimeDead.png" x="0" y="199" width="59" height="12" /> <SubTexture name="slimeWalk1.png" x="118" y="200" width="50" height="28" /> <SubTexture name="slimeWalk2.png" x="67" y="121" width="51" height="26" /> <SubTexture name="snailShell.png" x="170" y="147" width="44" height="30" /> <SubTexture name="snailShell_upsidedown.png" x="169" y="200" width="44" /> <SubTexture name="snailWalk1.png" x="63" y="155" width="54" height="31" /> <SubTexture name="snailWalk2.png" x="60" y="199" width="57" height="31" /></TextureAtlas>hud_spritesheet.xml <TextureAtlas imagePath="sheet.png"> <SubTexture name="hud_0.png" x="230" y="0" width="30" height="38"/> <SubTexture name="hud_1.png" x="196" y="41" width="26" height="37"/> <SubTexture name="hud_2.png" x="55" y="98" width="32" height="38"/> <SubTexture name="hud_3.png" x="239" y="80" width="28" height="38"/> <SubTexture name="hud_4.png" x="238" y="122" width="29" height="38"/> <SubTexture name="hud_5.png" x="238" y="162" width="28" height="38"/> <SubTexture name="hud_6.png" x="230" y="40" width="30" height="38"/> <SubTexture name="hud_7.png" x="226" y="206" width="32" height="39"/> <SubTexture name="hud_8.png" x="192" y="206" width="32" height="40"/> <SubTexture name="hud_9.png" x="196" y="0" width="32" height="39"/> <SubTexture name="hud_coins.png" x="55" y="0" width="47" height="47"/> <SubTexture name="hud_gem_blue.png" x="104" y="0" width="46" height="36"/> <SubTexture name="hud_gem_green.png" x="98" y="185" width="46" height="36"/> <SubTexture name="hud_gem_red.png" x="98" y="147" width="46" height="36"/> <SubTexture name="hud_gem_yellow.png" x="98" y="223" width="46" height="36"/> <SubTexture name="hud_heartEmpty.png" x="0" y="47" width="53" height="45"/> <SubTexture name="hud_heartFull.png" x="0" y="94" width="53" height="45"/> <SubTexture name="hud_heartHalf.png" x="0" y="0" width="53" height="45"/> <SubTexture name="hud_keyBlue.png" x="146" y="147" width="44" height="40"/> <SubTexture name="hud_keyBlue_disabled.png" x="150" y="38" width="44" height="40"/> <SubTexture name="hud_keyGreem_disabled.png" x="104" y="38" width="44" height="40"/> <SubTexture name="hud_keyGreen.png" x="192" y="122" width="44" height="40"/> <SubTexture name="hud_keyRed.png" x="193" y="80" width="44" height="40"/> <SubTexture name="hud_keyRed_disabled.png" x="192" y="164" width="44" height="40"/> <SubTexture name="hud_keyYellow.png" x="146" y="189" width="44" height="40"/> <SubTexture name="hud_keyYellow_disabled.png" x="147" y="80" width="44" height="40"/> <SubTexture name="hud_p1.png" x="55" y="49" width="47" height="47"/> <SubTexture name="hud_p1Alt.png" x="0" y="141" width="47" height="47"/> <SubTexture name="hud_p2.png" x="49" y="141" width="47" height="47"/> <SubTexture name="hud_p2Alt.png" x="0" y="190" width="47" height="47"/> <SubTexture name="hud_p3.png" x="49" y="190" width="47" height="47"/> <SubTexture name="hud_p3Alt.png" x="98" y="98" width="47" height="47"/> <SubTexture name="hud_x.png" x="0" y="239" width="30" height="28"/></TextureAtlas>both the format are exactly the same but only enemies one is creating errors... i tried using shoebox to export the sprite sheet in 'Starling, Sparrow' format...but it still didn't work. i hope i have provided all the info needed... Please help me out on how i can fix this problem and what might be causing it....
×
×
  • Create New...