• Content Count

  • Joined

  • Last visited

About barodapride

  • Rank

Contact Methods

  • Twitter
  1. Hi all, I would like to use phaser to make a game that is playable (or marketable) on mobile but I'm unfamiliar with how to deploy an html5 game to mobile. Does the user have to simply navigate to a website and play the game through the phone's browser? How can I deploy to a mobile device where an app is downloaded from the market? Is this even possible with Phaser? I have only seen browser games shown as examples, never mobile games so I'm not sure how it is usually done. Since the source code is in javascript there is no way to release an app on the market is there?
  2. Does anyone understand the following function from the tanks example: function bulletHitPlayer (tank, bullet) { bullet.kill(); } This function is called here: game.physics.collide(enemyBullets, tank, bulletHitPlayer, null, this); Where does bulletHitPlayer get its parameters?
  3. Does createFromObjects() still exist? I don't see it anywhere in phaser.js
  4. Hi jcs, I cloned your repository (I guess it's called forked? Not sure what the difference is between forked and cloning...). Anyways, I will say I still haven't given this an honest effort yet but I think I will need more help on how I can break off some of your code and use it properly. I would like to understand more completely what I need to do here. Correct me if I'm wrong but all I need to do is get data from a tilemap layer. I'm not sure what functions Phaser has to support this but I definitely have access to the .json map file within javascript correct? If so, I should be able to write my own code to handle the new enemy layer and input those objects into the game. Anyways, I would have thought this would be a simple and straightforward task but it seems to be difficult. What is the point of using Tiled if you cannot define enemies and other dynamic objects within it? I am just looking for an environment where I can create each level of my game completely. Manually adding the enemies/items programatically would take a long time.
  5. I guess that's probably because Math.round(player.body.screenX) is never exactly equal to Math.round(baddie.body.screenX) Instead of checking for equals you could check if the baddie is within a small range of the player and stop.
  6. Hi everyone, does anyone have experience using Tiled to define enemy locations? Can I use Phaser to read in the enemy layer (I'm guessing it will be a Tiled object layer)? If so, how can I read it and do what I need with it? Thanks for any input.
  7. Wow, thanks that works perfectly. I have a couple of questions: 1. How did you know that you can call destroy() on a tilemapLayer? When I look in the documentation there is no destroy method listed in Phaser.TilemapLayer. 2. What's the difference between if (g_tilemapLayer != null) and if (typeof g_tilemapLayer !== 'undefined')? Why did you choose to use the first version?
  8. This bug is driving me insane. I tried to track down what is happening inside phaser with the debugger but my debugger crashes after it draws the second level. Here is the game - going from the first level to second seems to work, but when it goes to the third level it still draws the second level (although the tiles are not collide-able).
  9. I know how to make it move by setting the velocity or changing sprite.x/y but there are some really goofy details between the sprite and it's body that have caused me some headaches.
  10. Hello, what is the correct way to move a sprite? Do I do sprite.centerOn(x,y)? That doesn't seem to move the sprite.body...Do I modify sprite.body.x (never mind that's read only). Do I modify That doesn't seem to affect sprite.body.x. Why is something so basic causing me such grief?
  11. Here is the function that is called to set/increment the level. All that should happen is the level gets redrawn per the new tilemap and the player, and princess (end point for the level) get initialized for the desired level. Level.prototype.setLevel = function(levelNumber){ //g_map.destroy(); g_map ="tmap" + levelNumber); g_layer =, 0, g_map.layers[0].width*g_tileset.tileWidth, g_map.layers[0].height*g_tileset.tileHeight, g_tileset, g_map, 0); g_layer.fixedToCamera=false; g_layer.resizeWorld(); g_player.initLevel(levelNumber); g_princess.initLevel(levelNumber);}Any ideas? Notice I was drying the destroy() method. Anything with a g_ in front is a global variable.
  12. Hello, yes I tried the destroy() method but no change. What do you mean about changing states? I will be back later tonight and will post more details as I have no time right now.
  13. Hi all, I'm sure there is an easy way to do this but I have failed at finding it for an hour or 2 now. I have a tilemap for each level. At the end of the level, I want to erase the current tilemap and replace it with the next level. I can't figure out how to erase the current level. The sprites from the previous level continue to render although they are no longer collideable. What am I missing here? I tried destroying the tilemap before setting it to a new tilemap via game.add.tilemap()
  14. It's very well made! I got annoyed with making the symbols though, wish there was a faster way to do it. And I wish I could move with the arrow keys.
  15. Hi all, I'm very new to phaser and I have a couple questions before I continue with my project: 1. Is there a way to make circular objects and check collisions with them? If not, can I create a larger rectangular sprite (with a circular display of the image) with a smaller hitbox to provide the illusion of accurate hit detection? 2. Is there a way to provide accurate jumping based on time holding the jump key? In the examples, a simple initial y velocity is applied to the player upon jump. In Mario, and just about any platformer ever made, the velocity is constant or changes slightly over the first couple seconds of jumping depending on how long the jump button is pressed. Thanks for any insight you can add.