grumpygamer

Members
  • Content Count

    92
  • Joined

  • Last visited

1 Follower

About grumpygamer

  • Rank
    Advanced Member
  1. So I am at a point where I need to make my mind up about how to go about this. Every example of shooters does the scrolling via tilesprite, but I'm unsure about this as it prevents adding customization to the map. So my idea would be quite straightforward: create multiple gigantic pngs with different layers, position them one on top of the other, then move them downwards. How would that affect performance? Thanks
  2. Maybe I'm having this issue because the tile is quite big? Anyhow I need to understand how to throw scenery at the player as well as objects.
  3. Hmm, still I have the "jerky issue". Again, maybe it's better (well smoother) to have a giant image on top of which the camera pans upwards.
  4. I've been googling a little bit but can't find what is the exact difference between the two?
  5. To be honest I'm a bit flabbergasted that in 2015 I can't scroll a full screen background without being jerky. Really. I'm on a Radeon HD 8690M and an i7-4610M@3.ghz which MIGHT be crap, but come on! It's only a background scrolling! There MUST be something wrong.
  6. Hey Tom, thanks for answering. At the moment I'm using tilemaps but it's quite jerky in chrome. I'd prefer to create the levels from an editor but I realise that I need the "length" of them to be dynamic based on some user choices (location basically). Also I cannot put in a nice variety of elements with tilemaps unless I create huge tiles. Another thing that puzzles me is how do I throw random parallax background elements (for example clouds) when using tilemaps? Seems much easier with fixed tiles. I'll try and upload an example soon enough.
  7. Hello again, I'm starting to build the core of the vertical shooter. For testing purposes I only just added a tilesprite to the world for it's entire width and height. Then, in update, I make it scroll. I then hit the first problem as it is jerky as hell and inconsistent too. The only browser where it performs well - it's really smooth - is IE (oddly). So I was left wondering what is the best approach, should I: have a giant area and pan the camerahave a giant area and scroll everything down.have a repeatable background scrolling and throw background sprites at ithave bothother ideas?Thanks for any input
  8. Ok, I've just understood by myself. There is no particular need to set negative boundaries UNLESS you want to then calculate a 0-based area. You only need to create the new bounds starting at 0,0, make them as big as you like, THEN center the camera. Job done.
  9. I still can't understand centering. If I add let's say 100px on the left and right of the screen like this: var game = this.game; bound_margin = 100; newLeft = this.game.world.bounds.left-bound_margin; newRight = this.game.world.bounds.right+bound_margin; game.world.setBounds(newLeft, 0, newRight, window.innerHeight); // THIS MUGHT BE WRONG bg = game.add.tileSprite(newLeft, 0, newRight, window.innerHeight, 'background');and then add some camera panning like so: update: function() { if (cursors.left.isDown) { this.game.camera.x -= bound_margin; } if (cursors.right.isDown) { this.game.camera.x += bound_margin; }}the camera only moves to one side! Edit:----------------------------------------------- Also what I don't understand is why even with the new bounds in place the ship drawing point still remains at the top left of the window. It should be out of the window?
  10. hmm yes, I did so and result is number 1. So how would I go about centering? I tried negative values but it does not seem to work It seems I have to use negative values (now working) and then reposition the camera...
  11. I've read the documentation that says: So for example if I have a 320 x 200 canvas and want to extend that to 480 x 380 (random numbers here) I would do: game.world.setBounds(0,0,480,380);BUT would that yield this result or this result Would I have to give negative margins if it presently outputs result 1? Thanks
  12. Nope, never used it, but I'm porting other code over from other "plugins" to integrate their functionality into my project. Usually you only need to fix scoping and how parameters are passed. That plugin is not for phaser so I suppose you'll need to port it over too. On the bright side all the logic of it is already done.
  13. Woo, nifty techniques here! Yep, just some ajax will do. Not sure how you can tell phaser when the request has been successful though. Still I haven't got there yet.