Mariusz

Members
  • Content Count

    23
  • Joined

  • Last visited

  1. In your code, you declare your variable score implicitly, which makes it a global variable. Because you don't reset that variable back to zero in the create() function of the play state, it goes straight into the complete state.
  2. I had the same exact problem. In my game, I have different music tracks for the MENU and PLAY states. Because it takes quite a while to decode the audio files, the track that should have been playing in the MENU state was delayed and thus played in the PLAY state alongside a different track, it was a big mess. I think that making the player wait another 30 seconds or so just for the audio files to decode is a very bad idea. Therefore I attach a handler to the onDecoded event to stop the track IF the track I want playing is not decoded yet and the state is already changing. It works well, even if it's a bit hacky.
  3. I used CocoonJS to deploy my game on Google Play. For games you're generally advised to use their accelerated canvas implementation for better performance, but there are some things you need to watch out for (some are outlined here: http://likeadev.com/show/6-tips-to-make-your-phaser-game-work-with-cocoonjs.html, might be slightly outdated). I've recently published a fairly dynamic game using phaser and cocoonjs, if you want to see what the performance is on a device running android then have a look, it's in the game showcase thread.
  4. Thanks I think an update is in order as I've received some comments regarding that very issue.
  5. @patmood Thanks! It's really inputs like yours that motivate me I was slightly worried about performance on different devices, but I haven't had any complaints so far, so that's awesome. As to the ad banners, it took me some time to set it all up properly as I hadn't done it before (mopub/admob accounts). Then at some point it seemed as if the ads stopped showing for a while, but that fixed itself soon after.
  6. I'd posted in the Phaser subforum and I thought posting here would also be a good idea. I have recently finished polishing my game called 'Alien Run for the Moon!' using the latest Phaser version (2.1.3) and CocoonJS (2.1). I published the game on Google Play earlier today. Altogether the game took a good chunk of my free time to finish. I only tested the game on my Nexus 5 and it works rather well, but that's just one fairly high-end smartphone. The game itself is about an alien that's stranded on an asteroid that you're supposed to fly back to the moon by collecting crystals and avoiding obstacles such as bombs and asteroids. As a bonus, there are 26 parts of a spaceship that the player can occasionally spot and collect. I did this as I wanted to provide the feeling that there is a long term goal to playing this game. I think overall the game offers a nice experience, although I'd love any feedback. I don't even know how to market this and if it's worthy of any marketing whatsoever. You can download the game here: https://play.google....logic.tothemoon ... aaaand you can play the game here (try playing on your phone, I made use of gyro.js so you can control the alien through the accelerometer): http://oddlogic.co.uk/alien-run-for-the-moon/index.html Literally all feedback is welcome!
  7. I have recently finished polishing my game called 'Alien Run for the Moon!' using the latest Phaser version (2.1.3) and CocoonJS (2.1). I published the game on Google Play earlier today. Altogether the game took a good chunk of my free time to finish. I only tested the game on my Nexus 5 and it works rather well, but that's just one fairly high-end smartphone. The game itself is about an alien that's stranded on an asteroid that you're supposed to fly back to the moon by collecting crystals and avoiding obstacles such as bombs and asteroids. As a bonus, there are 26 parts of a spaceship that the player can occasionally spot and collect. I did this as I wanted to provide the feeling that there is a long term goal to playing this game. I think overall the game offers a nice experience, although I'd love any feedback. I don't even know how to market this and if it's worthy of any marketing whatsoever. You can download the game here: https://play.google.com/store/apps/details?id=uk.co.oddlogic.tothemoon Literally all feedback is welcome!
  8. I've just realized that the newest CocoonJS launcher that I had downloaded from Google Play recently gave me the same black screen when I tried to run my game. I can run the game in a compiled launcher for my project though.
  9. Do you get any errors in cocoonjs console?
  10. Hey Rudy, thanks for the response. What I want to be able to do is enable the user to start drawing a line upon left mouse button click and keep manipulating the shape until the button is released. Once the user is happy with the length and angle, they will release the button and, at that point, I want to assign a physics body to the object that will acquire all the aforementioned properties, i.e. the length and the angle. So yes, to address your question, the order is crucial in this case. Unless there is a better way to approach this problem? Edit: My bad. I actually put some thought into Rudy's idea and it works perfectly fine. The sprite is manipulated and upon click release, I store the desired rotation, reset the sprite's rotation to zero and then apply it using sprite.body.angle.
  11. Hello there. I've been playing with the P2 physics engine and I hit a brick wall. If I try to enable P2 body on a sprite that is already rotated, the physics body will create a body rectangle that matches the sprite's rotation AND set the sprite's rotation to 0. I made the following gif to illustrate the issue: http://www.gfycat.com/AdolescentBruisedCuscus The scale of the dynamically created sprite seems to be preserved perfectly fine, it's just the rotation that's been baffling me. I looked briefly into phaser.js, but couldn't pin it down... Could somebody explain to me what's going on? Thanks in advance Mariusz
  12. Hi there. Have you looked into cocoonjs? There is a fair bit of information and even examples available on this forum, do a search and see if you can find what you need.
  13. Well, I think your question is semantically unclear. My gut is telling me that what you are asking about is whether a player on a different computer can join in a game made with phaser and socket.io and whether that player's camera can focus on a different point in the game world than another player's. If this is the case, then the answer would be yes, absolutely.
  14. Hello guys. I'm trying to create an explosion effect in my game and the following is my approach to the problem. The explosion consists of one explosion particle, several smoke particles and some sparkle particles. Thus I'm thinking of having three emitters. So good so far. However, I'd like the particles to animate in some ways, e.g. diminish and fade out smoothly rather than having them disappear after a certain interval. I've looked into Phaser and tried to set my custom sprite class to the particleClass property in the Emitter function, to no avail. Iterating over the group and setting a tween to each child doesn't seem like an option, since that would interfere with other particles emitted in another place in the game. What's the 'proper' approach to the problem? Thanks in advance. Mariusz