obiot

Members
  • Content Count

    205
  • 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

2,354 profile views
  1. obiot

    Fix position after scale

    sorry man, I did not have the time on my side to look at it yet.... but if you are up to it, I'll be super happy to integrate/merge any proposition for improvements
  2. so how many png or jpg are you loading totally ? how does your asset list looks like ?
  3. obiot

    How to set animation on GUI_Object using texture atlas?

    GUI object are just extending the me.Sprite object, so assuming you pass the right argument to the constructor, it should be working. Can you share how you instantiate your object ? if you pass game.texture for the image setting parameter it should do the trick.
  4. the issue is that WebGL has a limited amount of texture, and as of today the limit is 16 for ~70% of devices : https://webglstats.com/webgl/parameter/MAX_TEXTURE_IMAGE_UNITS in my opinion the only way to fix that is either to pack/merge your tilesets directly, or to use TexturePacker (that was the fix back in 2015) when possible (https://github.com/melonjs/melonJS/wiki/How-to-use-Texture-Atlas-with-TexturePacker)
  5. obiot

    [Noob Question] Rotate toward mouse cursor

    considering the result in wall to wall, I supposed you managed to fix it ? good mini-game by the way, I had fun playing it and almost did 100 points
  6. obiot

    Change image quality

    you are welcome, and happy it worked as you expected
  7. obiot

    Change image quality

    melonJS will overwrite whatever you set in the CSS based on the parameter(s) passed to the video init function : http://melonjs.github.io/melonJS/docs/me.video.html#init if you need/want to disable the pixelated rendering mode, just the set the antiAlias flag to true (for example) : me.video.init(800, 600, {wrapper : "screen", scale : "auto", scaleMethod : "flex-width", antiAlias : true, subPixel : false })
  8. obiot

    [Noob Question] Rotate toward mouse cursor

    There is really nothing more to it, it’s a pretty simple and straighforeward function, and if it rotates in the wrong direction just negate the angle. I wish i could provide you a more detailed answer but on this year end i’m traveling and do not have my laptop. So unless someone else can provide a better answer you will have to experiment a bit by yourself to find the solution you need. Happy New Year !
  9. obiot

    How to change animation when game paused

    You can use the updateWhenPaused flag on any renderable based object to update them even when the game is paused: http://melonjs.github.io/melonJS/docs/me.Renderable.html#updateWhenPaused
  10. obiot

    [Noob Question] Rotate toward mouse cursor

    me.pointer.pointer.pos is already a Vector object, so you should be able to directly use it with the angle function, with something like “this.renderable.currentTransform.rotate(this.pos.angle(me.input.pointer.pos);” which version of melonJS are u using ? Older (5.x), required the renderable.autoTransform to be manually set to true.
  11. obiot

    melonJS 6.3.0

    on this Christmas Eve, I'm happy to be able to "put" a new 6.3.0 version of melonJS under your virtual Game Dev Christmas tree The menu today will be the following : the WebGL renderer went through some heavy internal changes to align it with the Canvas one in terms of graphic rendering, allowing to stroke and/or fill all shapes properly (see here for a simple example of the final result, demonstrating shape drawing + alpha blending + mask/clipping in WebGL). on top of the API improvement for shape drawing, the WebGL renderer has also been greatly optimised in terms of memory usage or shape drawing operations (faster, better, stronger) renderable now support rendering mask in both Canvas and WebGL mode, by simply adding a me.Shape mask object to any renderable. This feature is pretty cool, works with any object inheriting from me.Renderable (Container, Sprite, etc...) and is the easiest ever to use audio core has been updated, and improve the audio unlock features (since desktop browser now also need that...) other small fixes here and there to make all the elves secretly running your game loop happier See here as well for a more detailed changelog, there is only one API change but in a backward compatible way, so you can safely upgrade without breaking your game Wishing everybody a Merry Christmas ! --- the melonJS team
  12. obiot

    Entity glow

    Hi, different ways i see to acheive that : 1. Draw a glow sprite overlay on top of your sprite (extend the draw method and draw your glowing sprite after call the parent draw function) 2. Draw a glowing ellipse using the renderer fillEllipse function (note that you need the 6.3.0 version that also implement it for the webGL Renderer). 3. Use a webgl shader, but this would work only in webgl mode and we still lack anyway the possibility to add a shader effect on sprite object (in my todo list for the next 6.4 version) let me know what you came up with !
  13. obiot

    melonJS 6.2.0

    as always, happy to announce that the latest 6.2.0 version is now available, and come packed with some nice improvements : text object have been redesigned into a more generic object and can now be added to an object scene as any other renderable we greatly optimised object re-cycling within the engine, so that melonJS keeps better control of its own internal object instances and does not add any unnecassry "stress" on the Garbage Collector. Benefits and improvement is especially noticeable on low-end devices (additionally the debug panel also now display the amount of reusable object instances currently in the object pool) improved support for Tiled with text object support and orthogonal rendering order Camera implementation has been redesigned partially, this is still a work in progress, but it's halfway there in order to allow adding several camera with a different viewport. the preloader now supports Font face preloading Bunch of other small improvements and fixes here and there See here as well for a more detailed changelog, there are also a few API changes but in a backward compatible way, so you can safely upgrade without breaking your game Have fun and tell us what you think. !
  14. obiot

    Can't Add Image Layer from PNG

    also I'm on the 6.x master branch, which version of melonJS are u using ? (might be a bug in a previous version that was fixed since then)
  15. obiot

    Can't Add Image Layer from PNG

    there is must be something not right somewhere, because I just tried on my side and the following is perfectly working : me.game.world.addChild(new me.ImageLayer(0,0, {image:"cityscene"}), 1); and cityscape is the name of an png image with the src set to "data/img/cityscene.png" Are you sure, the path to the image is correct, and that the image is properly returned by your server ? Else, can you share your example, because just like this I have no clue why it's not working.