Olle

Members
  • Content Count

    12
  • Joined

  • Last visited

  1. Olle

    Phaser 2.1.3 and State Transition Plugin

    I still have the problem of some (not all) graphic elements flipping vertically (upside down) during transition. It seem to be limited to phaser graphic objects. Im using aaccurso's updated version.
  2. Olle

    Continuously scrolling background

    Thanks for clarifying, that sounds like an elegant solution.
  3. Olle

    Continuously scrolling background

    Allright, no tweens and no physics. But I'm not sure what you are suggesting I use instead. Would it be better to manually adjust the sprite positions in the update function?
  4. Olle

    Continuously scrolling background

    I'll go ahead and bump this thread. Is tileSprite a viable solution for larger backgrounds? I hear some devices don't like sprites bigger than 4096 px? My current implementation make use of several 1024 wide sprites that are randomly chosen on the fly, every part fits beside any other. I am however having some troubles getting them to spawn in the exact correct position. There seem to be a small deviation that sometimes result in a small gap, about 1-10 pixels. perhaps depending on the performance? I've tried two solutions. The first one was to use velocity to move the sprites and listening to the position of the sprites in the prototype.update for the moment to spawn the next image. ...prototype.update = function (){if(!this.spawnedNext && this.body.x <= -(this.width-this.game.width)){makeProp(this.game, 'seaBed', this.width+this.body.x);this.spawnedNext = true;}...My current implementation make use of tweens and onComplete listeners. Both solutions suffer from the same deviation. var pan = this.game.add.tween(this).to({x: -this.width}, this.speed); pan.onComplete.add(function(){makeProp(this.game, 'seaBed', this.width);this.destroy();}, this);pan.start();I've tried both a fixed spawning location, and a dynamic location based on the position of the previous image, same result. Any tips?
  5. Olle

    How to scale entire game up

    What are my options if i want to scale my game to fullscreen without borders or stretching? Im porting a game from my own engine where i solved this by letting the canvas overflow, while keeping track of the croped pixels to position game elements. So basicly i only used the parts of the canvas visible on the screen. This solution worked great both in browsers and Cocoon, but how would you solve this with Phaser? The game is landscape oriented and will use vertical viewport scrolling. I'm not interested in using the device native resolution. Would apreciate your input.
  6. Greetings! I'm new to phaser. I am trying to figure out how to port a game made in my own engine. I made frequent use of static backgrounds/foregrounds made up of loads of graphic elements such as linear and radial gradient rectangles and circles. These where pre-rendered once onto two off-screen canvases that later was drawn onto the main canvas in the render loop. I'm sure this is not an optimal setup, but it's a lightweight game. Runs great on the homebrewn engine cross platforms, so I can't imagine it would do worse with phaser. What would be the best way to mimic this setup for webGL compatability, without having to recreate the graphics with images? I've browsed some zombie-threads about RenderTexture and BitmapData, but i'm still somewhat lost. Would appreciate your input.
  7. Olle

    Beginner with no experience

    Im not sure i would recommend going directly for a framework, it may be benefitial to learn js basics before delegating the clutter to a framework. I think the best way to progress is just experimenting while getting visual feedback to keep you stimulated Set up a basic canvas render loop and make the rectangles dance, fly and make babies. Once you get going there's no end in sight of the possibilities in front of you.
  8. Olle

    Cheap hosting

    If you dont need any server-side stuff and dont expect massive amounts of trafic, you can host your games for free at Google drive. Stable and care free, 15gb free space.
  9. Checked the errorlogs of the mobile device? I neved experienced that problem on my game. I use window.onBlur / onFocus to pause and reinitiate the gameloop, maby that could help.
  10. Olle

    cocoonJS question

    You're not confusing the ludei launcher with your own apk?
  11. Olle

    Road Safety. My variation of Frogger.

    Fun and polished. Well done! It seems like there is a sub-second delay of the audio effects on chrome @ android (galaxy s4)
  12. Olle

    Want to move a fly (sprite) like a 8.

    Ought to be done quickly by simply pulsating the x and y coordinates with Math.sin with different increments