Jump to content


  • Content Count

  • Joined

  • Last visited

About nomolosvulgaris

  • Rank

Contact Methods

  • Twitter
  1. I want to calculate a distance between object of the platformer and a place it can possibly achieve without moving up or down (face the obstacle or fall down), just left or right. So I use test bodies called this.shadowSide (to watch wall facing) and this.shadowDown (to watch falling). Prefer to call them "shadow bodies". I use this.game.physics.arcade.overlap to determine if the shadow body overlaps the floor. I move shadow bodies (left or right, depending of the direction I need), check overlaps and either continue searching or return a distance. It works well for sprite floors. The trouble
  2. I guess it helps to prevent player sprite from trembling while jumping into the wall. It's not exactly the topic but it's really helpful. Here's the example of zero friction when left or right side is touching (in case I got it right): http://codepen.io/anon/pen/CfaBb
  3. I'm trying to implement a platformer using p2 physics. There's known issue with tiles converted to collide boxes with p2.convertTilemap(). I can propose an example of how it affects gameplay: http://codepen.io/anon/pen/lJGqB. It turns out that length of narrowphase.contactEquation list sometimes is 0 even when the player crashes into the tiled wall. The issue is being discussed from time to time (e.g. http://www.html5gamedevs.com/topic/8895-p2-when-the-player-touches-a-wal-over-the-side-it-gets-stuck/) but seems to have no other solution but "use polylines instead of tiles". The trouble is tha
  4. I'm developing an arcade game (2d platformer) with enemies moving like this: http://codepen.io/anon/pen/FytIg?editors=011 Everything looks fine, but the enemy tends to fall down when the ledge is too short for completing enemy's way (you can see what I mean by uncommenting the only commented line in my code). It's not what I want. So I find a way to bind a callback on the "moves-to-the-edge" event. Maybe to figure out if the collision with ground is only partial. This event might also be helpful to activate a "panic animation" for player staying at the edge (like in Sonic The Hedgehog). How ca
  5. You should use CSS propertied image-rendering and -ms-interpolation-mode (for old IEs) on <canvas>. There's a lot of information about it in Google. You may also be needed to set sprite.smoothed = false; on sprites that are being rotated or scaled (even -1:1).
  • Create New...