Jump to content

Search the Community

Showing results for tags 'retina pixel density'.

  • 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 1 result

  1. I have a very simple test page: http://battleofhoth.com/test.html (below) I select a single frame from an atlas (frames are 256px wide and 128px tall) It works fine on all devices I've tried except iphone 4 & 5 (ios7) where I get a 'frame' selected of 512px wide and 256px tall I've looked for differences between my example and some correctly working examples, forum, docs, but I just can't seem to get it Sorry probably a newbie oversight Thanks <html> <head> <script src="assets/phaser.min.js"></script> <script> var spriteAreas = { 'frames': [ { 'filename': 'redbox', 'frame': { 'x': 0, 'y': 0, 'w': 256, 'h': 128 } // I expect to see a redbox ( just the top left frame of my atlas) // on iphone 5 I see 512px wide & 256px high (i.e. top 2 wide and 2 deep 'frames' of my sprite) } ] } var game = new Phaser.Game(400, 400, Phaser.CANVAS, 'test', null, true, false); var BasicGame = function (game) { }; BasicGame.Boot = function (game) { }; BasicGame.Boot.prototype = { preload: function () { game.load.atlas('hothSprites', 'assets/images/hoth.png', null, spriteAreas); game.canvas.getContext("2d").scale(window.devicePixelRatio, window.devicePixelRatio); }, create: function () { game.add.sprite(0, 0, 'hothSprites', 'redbox'); } }; game.state.add('Boot', BasicGame.Boot); game.state.start('Boot'); </script> </head> <body> <div id="test" style="border: 0"></div> </body ></html>
×
×
  • Create New...