rolandino

Members
  • Content Count

    23
  • Joined

  • Last visited

  1. I've created a rather simple game where you can shoot those who are privatising the NHS in the UK: http://www.cloudshapes.co.uk/labs/games/save-the-nhs/ It liberally takes from a couple of tutorials, but does add its own bits of code e.g. using composite sprites. Wish I had more time! Thanks for help from folks who have responded on this forum.
  2. Doh. Simples. Thanks v much for the reply.
  3. I have a sneaky feeling that there's an example for this somewhere and I've just missed it. Apologies if that's the case. This is what I'd like to do: Create some bitmap text: this.levelText = this.game.add.bitmapText(0, t_sb_y+70, 'myfont', '', 18); this.add(this.levelText); this.levelText.setText(Globals['level'].toString()); And turn it into a Phaser Button. Or, just detect when it's been clicked on .... Any suggestions anyone? Thanks, R
  4. Many thanks (again). The grid approach worked fine, many thanks. R
  5. Hi, Wonder if I could ask a question .... I wish to generate a set of sprites at random positions on and off screen. I have this working, the creation is not a problem. However what I would like to do is to ensure that on initialisation the sprites don't overlap with each other. And to do this efficiently. Once the game starts, handling collision etc is not the issue here, it's just ensuring that on initialisation there is no overlap. I'm using Arcade Physics, so could use the http://docs.phaser.io/Phaser.Physics.Arcade.html#collide functionality, but can only see repetitive use of this being inefficient. Any thoughts or suggestions anyone? Many thanks, R
  6. Hi, Many thanks for all the answers. All v interesting. Will take a look when I get a mo'. R
  7. Hi Both, Many thanks for replies. RE: text on a curve - it would be handy. I've done some work with D3js and SVG, and there is some capacity in that to do this kind of thing (i.e. text along a path - see http://bl.ocks.org/mbostock/2565344) - hence my question. RE: "old demoscene sine scroller thing with pixel displacement on a bitmapdata" - sounds great - unfortunately, I don't really know what you're talking about .... sadly. Any chance of a link to an example? Many thanks again, It all sounds a bit tricky to do, and resorting to Gimp/PotatoShop isn't a disaster. R
  8. Hi, Just wondered if anyone knew of a way to render some bitmap text on a path - or even just render any kind of text on a path - in Phaser? Ideally, I'd like to: this.mybitmap = game.make.bitmapData this.mybitmap.somehowrendertextonapath(textToRender, somePathData) // Then use the bitmap as so: this.myimage = new Phaser.Image(game, 10, 10); this.myimage.loadTexture(this.mybitmap); Just wondered. Many thanks, R
  9. OK, terrific. Many thanks. And thanks for tip re: image and rotation, that's probably enough. One follow-up (sorry) - I currently have something like the following: " newBitmap = this.game.make.bitmapData(22,22, "bgnd_bitmap); newBitmap.circle(6,6,6,"#ffffff"); newSprite = game.add.sprite(x,y, newBitmap); " Instead of creating a sprite from the bitmap, can I not just create a Phaser.Image from a bitmap? Doh. Read-the-f-documentation ... just found ... Phaser.Image.loadTexture(key, frame) .... OK. Looks like I'm set ... for now. Many, many thanks for your really super-terrific answers. R
  10. Hi Lewster32, Thanks that's v helpful, but not the answer I expected! So, what you're saying, I think, is that it sounds like to do what I wish to do, I should look at extending a sprite (call it UberSprite), and use addChild to make sprites part of UberSprite ? Please correct me if I'm wrong. Presumably I can then use all the physics/collision gubbins that I'm looking to use ... ? Thanks again btw. R
  11. Hi, Wonder if anyone can help. I'd like to build a composite sprite - so - has a base image, then ontop of this a turret that swivels, and below the turret some eyes (I know, odd, but hey). I've been experimenting implementing this using a Group. What I'd to be able to do is say something like: " this.game.physics.arcade.moveToObject(this, this.player.tank, this.speed); " where the "this" in this context is an "extended Sprite Group" - see the "extending a group" example up on http://examples.phaser.io/sideview.html. Now the first query is - is it possible for a SpriteGroup to have a "body"? If I currently run my code, the "this.game.physics.arcade.moveToObject(this, this.player.tank, this.speed);" fails at: " displayObject.body.velocity.x = Math.cos(this._angle) * speed; " in the Phaser source *because* my Group Sprite does not have a body. So, I'd like to be able to create a composite Sprite that I can move around as one entity, apply physics to, test for collisions, etc. If there's an example, happily look at it. Many thanks for any help, R
  12. Looks v interesting. Any sense as to when it might be ready to roll-out? I know, piece of string etc ... but just wondered, as I've found myself just creating a json file to describe various bits in a smalll game ... so always keen to avoid reinventing wheel, particularly if this is going to be out soon (ish) R
  13. I think it's down to the device. So Opera 12.16 on Linux, Phaser barely works. More up-to-date versions of Opera on Win/Mac, do seem to work. R