austincap

Members
  • Content Count

    6
  • Joined

  • Last visited

  1. I just want the player sprite to not be able to overlap block sprites. Both sprites have: game.physics.arcade.enable(sprite); sprite.body.enable = true; sprite.anchor.setTo(0.5, 0.5); and the blocks have "blocksprite.body.immovable = true;" Every game update has these two functions: game.physics.arcade.collide(PlayerSprite, BlocksSpriteGroup, collisionManager.handleBumpIntoBlock, null, this); game.physics.arcade.overlap(PlayerSprite, BlocksSpriteGroup, collisionManager.handleBumpIntoBlock, null, this); I've tried every permutation of only collide, only overlap, individual sprites, and groups. Every time the collisionManager.handleBumpIntoBlock function is definitely getting called, but the sprites always pass through each other. Collisions with world boundaries do work fine, it's just players not colliding with blocks that's the problem. The weirdest thing is that the update didn't even touch the collision or even players. It mainly altered the inventory system and how socket.io handles multiple players. Everything was working fine until that update. Anyone have any ideas?
  2. Basically I want to make an arrow sprite that automatically moves the player in that direction when they walk over it. 1) Can I even do this with arcade physics? When I set arrowsprite.body.enable=true, that makes the sprite solid and the player can no longer walk over it. I've thoroughly studied the docs and forums and there is no way to give a sprite collision *or overlap* logic without making it solid and impassable. 2) There is also no way to force player sprites to move regardless of the player's input. That behavior seems reserved only for non-player sprites. Do I have to create a separate non-player sprite, usually control that with player inputs, and make the actual player sprite invisible? If arcade physics doesn't have these functionalities in phaser 2, what should I use (for phaser 2)?
  3. I'm drawing all off-screen sprites. I'll look into skipping drawing sprites outside of an AABB rectangle. Thanks!
  4. Considering they all have to be called for nearly every sprite, every single frame, what's a good number of collision functions for me to use? I'm making a multiplayer shooter game, but I'd like a more general answer as well.
  5. I'm not using SpriteBatch but I don't think it's relevant for my purposes. Basically in my "game" players make posts, like you would on a message board. Each "post" is comprised of 4 sprites: the post-type (basically the block outline), an identicon representing the text data, the text data itself, and the sprite for the number of upvotes it currently has. On top of that, there's enemy sprites, bullet sprites, and image sprites of the post is for a picture. Also replies have dynamically drawn reply lines. For the record, my system is Windows 7 x64, 8GB ram, 3.3 GHz quadcore, and 2GB video memory.
  6. I typed "how many sprites can phaser handle" in the search bar and didn't get any relevant results. My game can't seem to handle more than 1,000 sprites simultaneously on-screen before the FPS dips below 40 (what I deem acceptable). Is this reasonable? From what I've read other games typically don't have more than 300 sprites loaded into the game world simultaneously, but I'm trying to make a game that let's users add content dynamically and I want to know what the upper limit should be. According to the Chrome profiler tool, "Animation Frame Fired" is taking up most of my resources. Is there anyway around this? Thanks.