Djloop

Members
  • Content Count

    7
  • Joined

  • Last visited

  1. Would that not cause my tween to run slower/faster on slower/faster devices?
  2. Hi, Im having an issue with tweens. Its a bit difficult to explain, so please bare with me.. this.tween = this.game.add.tween(this.itemToTween).to({ y: y+100 }, 100); It is a quick tween over a relatively large distance that is repeated many times. If the itemToTween is moved by say 15 pixels per frame (for example), the last frame is moved only 10 pixels to exactly end at position y+100. This 10 pixel move in the last frame as apposed to the normal 15 pixels per frame is causing hiccups/staggering on the tween repeat and other running tweens on other items are becoming out of sync position wise. The only solution I could think of was maybe doubling the distance and time of the tween and then manually checking on the tween update if the position is greater than y+100. In that case stop the tween and trigger the new tween and subtract the distance the original tween shot over y+100. This seems like such a hack though... Does anyone have a suggestion on a cleaner solution? Thanks.
  3. I am unable to load from more than one asset pack. If I put all my assets to load from one asset pack then everything loads fine, but as soon as I add a second asset pack the assets listed in the second pack does not load to the cache. Does phaser support multiple asset pack loading?
  4. Thank you samme. This is an excellent example and exactly what I was trying to achieve. I think this example should be added to the official Phaser examples as I am sure a lot of people will find this useful. Could you finally please explain the use of cards cursor in the update function? Are you moving the current card in the group (that is pointed to by the cursor) to the front of the cards display row and then pointing the cursor to the next card in the group? Thanks again!
  5. I am having trouble figuring out how to do a scrolling background using multiple background images. These images are not overlayed to create a parallax effect, but rather next to each other to create a changing background scene. My background is created using 20 different images who's order must be dynamically changed as the background scrolls. So I can start with A,B,C showing and as it moves I need to remove A and add D after C...and so forth. I tried using tweens, but it is almost impossible to to place the next image at the correct starting position without gaps forming between the images. I have tried using a tileSprite, but I can only figure out how to add a single texture to the tileSprite. I tried creating a texture dynamically using bitMapData and copying a image sequences to the texture and then scrolling the texture using a tileSprite, but that does not allow me to dynamically change the next image that should appear based on whatever is happening in the game. Also I have read that tileSprites have performance issues on mobile. In another post on this form Rich suggests doing the following: http://www.html5gamedevs.com/topic/3218-continuously-scrolling-background/ I have tried this by adding my stating ABC images next to each other in a group and then moving the group, but all that happens is that the group moves off the screen after a while. Could someone please explain to me how to implement what Rich suggests above? Or any other method to achieve my desired result?
  6. Could you please elaborate on this? If I tween/move a group that contains multiple tiles then the group will move off the screen after the width of the group is moved.