obiot

Members
  • Content count

    81
  • Joined

  • Last visited

About obiot

  • Rank
    Advanced Member
  • Birthday July 20

Contact Methods

  • Website URL
    http://melonjs.org/
  • Twitter
    melonjs

Profile Information

  • Gender
    Male
  • Location
    Singapore

Recent Profile Visitors

302 profile views
  1. you just need to add a entity with a body shape, at the same place of the house, and check for collision from or with that entity. if you look at the melonJS source code, it's all we really we do : create an entity with a body, and configure them as WORLD_SHAPE for the the collision layer : https://github.com/melonjs/melonJS/blob/master/src/level/TMXTiledMap.js#L463-L465
  2. you just need to add a entity with a body shape, at the same place of the house, and check for collision from or with that entity. if you look at the melonJS source code, it's all we really we do : create an entity with a body, and configure them as WORLD_SHAPE for the the collision layer : https://github.com/melonjs/melonJS/blob/master/src/level/TMXTiledMap.js#L463-L465
  3. once you get a reference to the layer you want, you can get the tile information by using the getTile function : http://melonjs.github.io/melonJS/docs/me.TMXLayer.html#getTile here is an example here, where we use this to highlight the tile under the mouse pointer : https://github.com/melonjs/melonJS/blob/master/examples/isometric_rpg/js/screens/play.js#L46
  4. updateMovement is pretty old, it was from the 0.x and 1.0 version, before we added a full SAT based collision system. anyway, glad you solved it, and keep in mind that we have a page about migration tips : https://github.com/melonjs/melonJS/wiki/Upgrade-Guide
  5. indeed, our scale function (as for all matrix functions) follows the standard one : https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/scale
  6. game.currentMenu = this; assuming currentMenu is where you keep hold of the current menu, and assuming you do this from the current menu open (so this is your current menu instance)
  7. indeed, keep it simple I can only agree with that. And as for the UI navigation I would also use a global variable to store the reference to the current menu. And when opening a new one, you just need to close the current one and replace the global variable reference with the one from the new menu. Easy peasy
  8. more precisely (copy/paste from a post on our now closed google groups) There's a brand new plugin (with example) that Sean M wrote: https://github.com/swmuron/melonjs-astar And another example that Rolf Veinø Sørensen wrote: https://drive.google.com/folderview?id=0B3gBPqPnbEu8UHRuSkR4Qi00OUU&usp=sharing Useful threads: https://groups.google.com/d/msg/melonjs/nyYa0_DppiM/mrmdSxf5hT8J https://groups.google.com/d/msg/melonjs/5BbT7QhVtKI/AQzKEwTvKZsJ https://groups.google.com/d/msg/melonjs/jgHNI1Pmkc4/GXlDfEAEfc8J
  9. Really ? https://www.google.com.sg/search?q=melonjs+pathfinding this leads to related discussion on github, former google group, examples and even plugins
  10. I suggest you put a breakpoint in the class constructor and see if there is nothing wrong there. For example i see that you are calling a fsmReset function, but i don't see such a method definition for that object.
  11. you also need to register your object ( : me.pool.register("SoldierFSM", game.SoldierFSM); not that your SoldierFSM object is currently declared under the global namespace (based on the above comments), where you should rather do it under game (to work with the register example here) or your own namespace to avoid polluting the global one (low chances though to have somehting else also using SoldierFSM under the global scope).
  12. do you have any message in the console ? when these issues are happening? also, i'm not sure I'm getting what you mean by " Uploading placeholder maps of different sizes", can you further describe it ? upload where and which placeholder, and how are these things used by melonJS. I'm clueless about the pointer issue though, but we have know issue with anchor point and GUI element, where the only way to properly fix it is to set a [0, 0] anchor point (this will be fixed in the next 5.0 version)
  13. https://github.com/melonjs/melonJS/wiki/Frequently-Asked-Questions#form_inputs for example
  14. it is actually documented, but since it's specific to the Canvas Renderer, it's therefore only documented for it, but admittedly it's a bit difficult to find... Weird though that this is causing issue when scaling on your side, because that's exactly why it's there in the first place.... it's not the issue, but out of curiosity, any reason why you don't want to use antiAlias, especially if you are scaling by a factor of 4 and for a 8-bit "pixelated" retro game ?
  15. ooooh no I get what you meant by optional tileset, you meant use or not the provided tile id when creating an entity ? Another option for that was to extend me.Entity, and just create a renderable from within the contrusctor, in that case melonJS does not add the "built-in" tile sprite : https://github.com/melonjs/melonJS/blob/master/src/level/TMXTiledMap.js#L436-L453