obiot

Members
  • Content count

    127
  • Joined

  • Last visited

Everything posted by obiot

  1. Changing tileset for a tile

    Hi, sorry fo the late feedback (Chinese holiday season in this part of the world) and yes indeed, the solution was to also update the "corresponding" tileId I do wonder though if manipulating directly those references/values is a good idea, and if we should not rather have something that better abstract the tile(set) "architecture" (e.g. if you change your tileset in Tiled, your index here above could then be incorrect?)
  2. Debug panel in 5.1 not registering click events

    oh so that's weird as there is no issues at all on my side. Is your Chrome up to date ?
  3. Git clone Melon example

    I'm afraid you'll have to clone or download the whole melonJS repo, as the platformer is just a folder within that repo : https://github.com/melonjs/melonJS best is probably to clone the boilerplate, and just add the platformer on top of it (in my opinion)
  4. Debug panel in 5.1 not registering click events

    Hi, did you also update the debugPanel to the latest version ? if useful, I attached the latest version of it to the latest release : https://github.com/melonjs/melonJS/releases/tag/5.1.0
  5. Sprite FlipX rotates full width on x axis

    Hi, yes indeed ! See here for both the explanation and the solution : https://github.com/melonjs/melonJS/issues/916 My bad as I ve been late in updating the tutorial accordingly !
  6. Problem migrating to 5.1 from 4.1.1

    Hi, thanks for the feedback ! through the 5.x releases, lots of effort have been made in fixing and better implementing anchor points for all renderable, and what you see is probably related to it. As since version 5.0 at least, the default Anchor Point (center of object) should properly be applied everywhere (including bounding box, transform, etc...) So long story short, if you set the container anchor point to [0,0], it should restore the previous behaviour (easier that changing everything to accommodate with the new center). let me know, Olivier. NOTE : and indeed this should be better clarified/mentioned in the migration guide !
  7. low fps

    Hi, this is anything but too vague to be able to provide any kind of assistance. most certainly , you should look at your code, and ensure that object creating and deletion are limited as much as possible in order to avoid triggering the garbage collector (which impact performances, especially with large amount of objects) you might also look at enabling object pooling : https://github.com/melonjs/melonJS/wiki/Frequently-Asked-Questions#object_pooling
  8. 5.1.0 release

    Cheers guys, here is the latest release of melonJS with version 5.10, which is also the latest major "ES5" release before the big jump to ES6 ! Blog Announcement : http://blog.melonjs.org/2018/01/melonjs-510.html lib and plugin download link : https://github.com/melonjs/melonJS/releases Happy Sunday to all of you !
  9. wip: PLAYERKILLERS.EXCHANGE

    I still see ogg only though... even after empty'ing the browser cache... // Initialize the audio. me.audio.init("ogg"); Concerning the multi touch support, we had further improvements in the latest 5.1 : https://github.com/melonjs/melonJS/blob/master/CHANGELOG I will release this new version at the end of this week, but if you want to give it a try, here is a link to the latest build: https://melonjs-builds.s3.amazonaws.com/artifacts/master/2139/build/melonjs.js only visible change compared to the 5.0.x version you use is `isKinematic`, is now true by default except for me.Entity, me.Container and me.GUIobjects. Which means that if you use me.Renderable as a base for a custom object responding to collision or pointer event, you will need to set it back to false within the constructor to match the current behaviour. https://github.com/melonjs/melonJS/wiki/Upgrade-Guide
  10. wip: PLAYERKILLERS.EXCHANGE

    awesome, from what I can it's one hell of a work, as you did implement the UI/inventory programmatically, right ? also you really need to add additional webm or mp3 version of the audio assets, because my poor iOS & Safari a currently complaining about ogg being the only one available
  11. Fix position after scale

    this should be fixed in the latest dev branch (-> 5.1 to be released within a few days), here an link to the latest build : https://melonjs-builds.s3.amazonaws.com/index.html?prefix=artifacts/master/2120/build/ make sure to also update the debugPanel to the latest version if you want to give it a try before the release : https://github.com/melonjs/melonJS/tree/master/plugins/debug
  12. wip: PLAYERKILLERS.EXCHANGE

    Good job ! I even managed to find someone after wandering for a little bit, but then got killed did you use nipple (https://github.com/yoannmoinet/nipplejs) for the controller ? Looks better than mine http://melonjs.github.io/melonJS/examples/platformer/#debug (#debug is required to show It up on desktop, else it won't until you are using a touch enable device) [EDIT] note that the online version of my controller does not work properly on chrome mobile (Android) though, but it was fixed in the repo
  13. How do I tween the rotation

    indeed, I never think to use that one to be honest.... and admittedly, the documentation is not super clear as well about it : http://melonjs.github.io/melonJS/docs/me.Tween.html#onUpdate
  14. How do I tween the rotation

    that's exactly what I do as well in one of my project, but in my case I pass an increment delta angle so that the object keep spinning (I just need then to negate the value if I want to reverse the rotation) If you want to tween it, then you can either change the delta angle value passed to rotate, or change the target angle in your case.
  15. 5.0.0 & 5.0.1 release

    I think we discuss here in the forum a couple of times (so you can do a search after), but the best in my opinion is to use a container as renderable component for your entity. We also have a Spine plugin, but if you want to take it out for a spin, I;m not really sure it this still work with melonJS 5.0, especially considering how transform are now used/applied to renderable (in 2.0 we were just using standard and straight canvas scale/rotate method, as opposed to matrix based transforms) https://github.com/melonjs/melonjs-spine
  16. 5.0.0 & 5.0.1 release

    Greetings, That's right, a 5.0.0 version has been released, but as a couple of bugs have been identified right before I had the time to publish the announcement, here are two versions for the price of one blog announcement : http://blog.melonjs.org/2017/12/melonjs-50x.html release details and download : https://github.com/melonjs/melonJS/releases [EDIT] Forgot to mention that the platformer example now features a virtual gamepad (visible on mobile devices, or if the debug panel is enabled) ! it is not like the most advanced and configurable implementation, but that does the job for a platformer, and should be a good start for those looking at adding one -> click here to run the platfomer
  17. 5.0.0 & 5.0.1 release

    Hi Ian_. to be honest, I have not looked before at that thread, but by the look of it I would say that yes it looks like it could have been that problem In the 4.x version transforms and anchor point were messed up in some cases, and it should be better in this version ! thanks ! Olivier.
  18. Do you build your UI's in MelonJS or DOM?

    I think another point is what device you are targeting, I mean if you target at some point to release your game through a wrapper (e.g. Cocoon) on the Apple Store or Android market, then you cannot rely on DOM for the UI ?
  19. wip: PLAYERKILLERS.EXCHANGE

    awesome start ! thank you for sharing it I had troubles though running it under safari (gave me some errors while loading the audio assets), but it was running fine under Chrome and Firefox... I'll add it to our gallery here if you wish, feel free to provide some small descriptions if you want too
  20. Run without rendering (for online game)

    they are a few games here that you can look at for online gaming examples. else for your second question you can set the alwaysUpdate property of your renderables to true, this will keep them "alive" even though they are out of the screen. Be careful thought, that obviously, the more objects you have the more resources it will use.
  21. melonjs zooming and panning

    here it is ! https://github.com/melonjs/melonJS/commit/927755376f3f8d0e0b8edf07a079e442b41c8715
  22. NPC Healthbar with DOM element

    sorry but i'm out of idea myself.... all I can say is that it does not seems an issue on melonJS side, so I'd rather look at your page composition (HTML/CSS) to see if something there is acting weird. did you try to output the actual returned coords in the console, and mornitor the ouput correspondingly to the player position ? at least it would allow eliminate a part of the equation, and to be fixed on either the coordinates returned by melonJS are correct or not. On a side note, you should also use a local vector object in your entity and pass it to the `localToWorld ` function, this will avoid instantiating a vector object at every frame and will make the GC more happy https://github.com/melonjs/melonJS/blob/master/src/renderable/viewport.js#L486
  23. melonjs zooming and panning

    Correct, if the entity the camera is following is constantly moving, calling moveTo won't basically have any effect.... but calling `me.game.viewport.follow(null, null)`; won't work as the method won't assign anything if the give first argument is not an instance of a renderable or a vector object. unfortunately we do not have a unfollow() method (i see it could be usefull though), but as a hack you can manually unassign the private target property by doing `me.game.viewport.target = undefined;` that should do the trick, and you can then move the viewport where you want.
  24. NPC Healthbar with DOM element

    oh I see is it not an issue with you updateLocation method and how it access the minion current position ? I see `this.pos.x` there, so is updateLocation a method of the minion class ?
  25. NPC Healthbar with DOM element

    Looks like you are using an isometric map, so what you are probably missing is to convert back the position to an orthogonal projection (using http://melonjs.github.io/melonJS/docs/me.Vector2d.html#to2d) before calling the WorldToLocal function. So in pseudo code, something like this : 1. localVector = copy(player.pos) 2 . LocalVector.to2d() 3. coords = worldToLocal (LocalVector)