Jump to content

jmp909

Members
  • Content Count

    432
  • Joined

  • Last visited

  • Days Won

    4

jmp909 last won the day on February 6 2019

jmp909 had the most liked content!

About jmp909

  • Rank
    Advanced Member

Contact Methods

  • Twitter
    jmp909

Recent Profile Visitors

2996 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 http://codepen.io/jmp909/pen/xZGVKy 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 http://codepen.io/jmp909/pen/adONdQ 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 http://www.html5gamedevs.com/topic/18106-replace-image-atlas-in-cache-with-bitmapdata/ 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 http://phaser.io/docs/2.4.4/Phaser.BitmapData.html#generateTexture 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 retu
  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 http://phaser.io/docs/2.4.4/Phaser.TilemapLayer.html#resize there's an example here http://phaser.io/examples/v2/tilemaps/resize-map 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 http://www.html5gamedevs.com/topic/5683-add-bitmapdata-to-cache-as-image/?p=99067
  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 https://www.mvcodeclub.com/lessons/creating-enemies-and-collisions-in-phaser-and-tiled 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 https://www.google.com/fonts also you need to refer to which browsers support which font types http://caniuse.com/#feat=woff2 https://css-tricks.com/snippets/css/using-font-face/ for Android you'll likely need .ttf then
  10. set user scale to devicePixelRatio? I've not tried it but something like.. scale = window.devicePixelRatiothis.game.scale.scaleMode=Phaser.ScaleManager.USER_SCALEthis.game.scale.setUserScale(scale, scale)//this.game.scale.setGameSize(375*scale, 667*scale)there's some discussion here too i think http://www.html5gamedevs.com/topic/1380-how-to-scale-entire-game-up/
  11. I think mask may need to be of Phaser.Graphics type http://phaser.io/docs/2.4.4/Phaser.Group.html#mask try using alphaMask? Although I don't think that works on groups There's also this but it's old http://www.html5gamedevs.com/topic/1444-how-to-use-pixi-masking-in-phaser/
  12. did you remove your FPS meter from the Android version? if not, try removing it and using bitmap text to display your fps http://phaser.io/sandbox/BGpUHRyb/play
  13. Seems to be solved here... http://www.html5gamedevs.com/topic/11260-animations-wont-work-in-sprite-object/
  14. here's one way to do it using Sin/Cos http://phaser.io/sandbox/gXbgAMnK/play and another using phaser's point rotation function (with a distance constraint... http://phaser.io/docs/2.4.4/Phaser.Point.html#rotate) http://phaser.io/sandbox/wDpGcNHm/play 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....
×
×
  • Create New...