Jump to content

Search the Community

Showing results for tags 'atlasjsonarray'.

  • 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 2 results

  1. Happy new year everyone!!!!!! I'm starting this new Phaser year with a big question. Is there a way to do at least one of those three things: Have multiple keys for just one atlasJSONarray.json { "frames1": [ { "filename": "frame_x", "frame": {"x":0,"y":0,"w":246,"h":642}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":246,"h":642}, "sourceSize": {"w":246,"h":642} }, ... ], "frames2": [ { "filename": "frame_y", "frame": {"x":0,"y":0,"w":642,"h":246}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":642,"h":246}, "sourceSize": {"w":642,"h":246} }, ... ], "meta": { "app": "http://www.codeandweb.com/texturepacker", "version": "1.0", "image": "frames.png", "format": "RGBA8888", "size": {"w":1904,"h":1926}, "scale": "1", "smartupdate": "$TexturePacker:SmartUpdate:7501c1db9128f0a301bfd7fdbb041683:f12b9111dd99102df2878485c54440cc:8dfa5172c304a3afa731250a934e2d8d$" } } //Load things in "frames1" with key 'spriteframe1' game.load.atlasJSONArray('spriteframe1' , 'images/frames.png' , 'images/frames.json'); //Load things in "frames2" with key 'spriteframe2' game.load.atlasJSONArray('spriteframe2' , 'images/frames.png' , 'images/frames.json'); Loading multiple atlases in just one atlasJSONarray.json { "frames": [ { "filename": "frame_x", "frame": {"x":0,"y":0,"w":246,"h":642}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":246,"h":642}, "sourceSize": {"w":246,"h":642} }, { "filename": "frame_y", "frame": {"x":0,"y":0,"w":642,"h":246}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":642,"h":246}, "sourceSize": {"w":642,"h":246} }, ... ], "meta": { "app": "http://www.codeandweb.com/texturepacker", "version": "1.0", "images": ["frames1.png", "frames2.png"], "format": "RGBA8888", "size": {"w":1904,"h":1926}, "scale": "1", "smartupdate": "$TexturePacker:SmartUpdate:7501c1db9128f0a301bfd7fdbb041683:f12b9111dd99102df2878485c54440cc:8dfa5172c304a3afa731250a934e2d8d$" } } Have the same key for two different atlases who have data for the same sprite/sequence/animation/any //Load all the frames in both files for my animation game.load.atlasJSONArray('spriteframes' , 'images/frames1.png' , 'images/frames1.json'); game.load.atlasJSONArray('spriteframes' , 'images/frames2.png' , 'images/frames2.json'); Is it possibile at least one of this three things? If yes, how? Thanks for the answers guys!
  2. Well i'm updating old Phaser code to 1.0 Well some renaming and function moved to new objects and so on I'm a bit stuck here: function preload() { myGame.world.setSize(320, 416); myGame.load.image('logo', 'assets/images/logo.png'); myGame.load.image('bg', 'assets/images/bg_prerendered.png'); myGame.load.atlasJSONArray('tiles', 'assets/textureAtlas/breakout.png', 'assets/textureAtlas/breakout.json');}function create() { myGame.add.sprite(0, 0, 'bg'); paddle = myGame.add.sprite(myGame.world.width / 2, myGame.world.height - 48, 'tiles'); paddle.animations.add('paddle_big', ['paddle_big.png'], 10, false, false); paddle.animations.add('paddle_small', ['paddle_small.png'], 10, false, false);}And the error that hit's me is : Uncaught TypeError: Cannot read property 'uuid' of null phaser.js:20495 Phaser.AnimationManager.addphaser.js:20495 creategame.js:277 Phaser.StateManager.loadCompletephaser.js:7851 Phaser.Game.loadCompletephaser.js:10273 Phaser.SignalBinding.executephaser.js:8426 Phaser.Signal.dispatchphaser.js:8312 dispatchphaser.js:8115 Phaser.Loader.nextFilephaser.js:23026 Phaser.Loader.jsonLoadCompletephaser.js:22920 _xhr.onload What i checked is that: paddle.animations.add('paddle_big'); - works, but there isn't a frame name specified paddle.animations.add('paddle_big', [1], 10, false, false); - agian works but is hard to tell what frame is 1,2,3, etc. So I suppose that there is new way of doing this but I'm stuck on this from one hour and decided to share my frustration. I checked old examples TS, and all news examples which are so little compared with TS examples so I'm offering to convert some of the old ones to 1.0 because I'll gain some more knowledge too but first I must pass the atlas texture problem.
×
×
  • Create New...