Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Will do! Pushed it. Looks good so far, but I'll keep an eye out
  2. Thank you for the help! I was able to get it working by having the player ignore the level entity: game.playerEntity: onCollision : function (response, other) { if (other instanceof game.PortalEntity) { return false;} return true; } game.portalEntity: (My level entity subclass) onCollision: function onCollision(response, other) { if (!this.supressed) { if (response.overlap >= other.body.width / 4) { this.goTo.apply(this); } } return false; }, This prevents the goTo fr
  3. I've created a subclass of me.LevelEntity, but it doesn't seem possible to set the collision system to allow objects fully overlap (it always pushes the colliding items out). Is the correct path to do something like this in the level entity? Or will this be highly inefficient? It seems a similar check is done every frame anyway. update : function (dt) { this._super(me.LevelEntity, 'update', [dt]); var player = me.game.world.getChildByType(game.PlayerEntity)[0]; var collide = player.getBounds().overlaps(this.getBounds()); if (collide) {
  4. Greetings! I've very much enjoyed getting to know MelonJS, and had an initial question: for LevelEntity objects in TMX maps, I wanted to adjust the behavior —  The default is to trigger the level transition as soon as the play object even touches the Level object. I'd like (and might even suggest as default behavior) to have the level transition as soon as the Player object is mostly CONTAINED by the level object. This would make many of the transitions more natural. You'd be able to walk on to stairwells, doorways, or into other level switch regions. What is the best way
  • Create New...