• Content Count

  • Joined

  • Last visited

  • Days Won


jmp909 last won the day on February 6 2019

jmp909 had the most liked content!

About jmp909

  • Rank
    Advanced Member

Contact Methods

  • Twitter

Recent Profile Visitors

2827 profile views
  1. try mySprite.baseTexture.skipRender=trueotherwise it uses the default texture for the sprite, which is generally the last texture used i think [update] actually that doesn't work ... skipRender here, just means both texture's dont show, presumably because they're actually sharing the same texture and just to confuse matters, this works now, but only because I've put 2 texture in the cache.. with 1 texture it breaks as you mention i guess it's a bug then
  2. Cache should retain between states, that's what a preloader state is for!
  3. i think i was having a similar issue here can you not have a prior game state that puts everything in the cache, and then load it in the next game state? also I don't know if this is any use to you generateTexture(key) → {PIXI.Texture}Creates a new Image element by converting this BitmapDatas canvas into a dataURL.The image is then stored in the image Cache using the key given. Finally a PIXI.Texture is created based on the image and returned.You can apply the texture to a sprite or any other supporting object by using either the key or the texture. First call generateTexture:var texture = bitmapdata.generateTexture('ball');Then you can either apply the texture to a sprite:game.add.sprite(0, 0, texture);or by using the string based key:game.add.sprite(0, 0, 'ball');
  4. are you trying to reveal more of the map but keep it at the same scale? you said "it does not show more map" so i assume so. you can use resize() i think but it says not to bind it to window resize event as it is expensive there's an example here resizeWorld makes the world the same size as the map, otherwise you'd only end up seeing eg one screen size of the map and it wouldn't scroll.
  5. i just meant a snippet of code you are using to make and store an image. eg I've done this before
  6. you are given the option when you create a layer. also they have different icons
  7. nope, you can't use createLayer on an Object layer, it's only for Tile layers if you're using p2 you can use convertCollisionObjects var walls = game.physics.p2.convertCollisionObjects(map, "Collisions", true); for(var wall in walls) { walls[wall].setCollisionGroup(wallsCG); walls[wall].collides(playerCG); }
  8. can you share your code or make a version on sandbox? i'm not sure if it'll all work just using preload state
  9. Google don't provide that web font, I don't know why you're trying to use it via that.. they only give the fonts available here also you need to refer to which browsers support which font types for Android you'll likely need .ttf then
  10. set user scale to devicePixelRatio? I've not tried it but something like.. scale =, scale)//*scale, 667*scale)there's some discussion here too i think
  11. jmp909

    mask doesn't work

    I think mask may need to be of Phaser.Graphics type try using alphaMask? Although I don't think that works on groups There's also this but it's old
  12. did you remove your FPS meter from the Android version? if not, try removing it and using bitmap text to display your fps
  13. Seems to be solved here...
  14. here's one way to do it using Sin/Cos and another using phaser's point rotation function (with a distance constraint... I've taken 0 angle as the top of the circle, but that's not the normal way angles are measured so i've shifted the value accordingly I'll leave you a challenge... add acceleration/deceleration to the movement....