obiot

Members
  • Content count

    183
  • Joined

  • Last visited

Everything posted by obiot

  1. added to master : https://github.com/melonjs/melonJS/issues/947
  2. there is no really an event for it currently, but you can check for the inViewport value to detect if the object is currently in the viewport or not. definitely a good addition though, created a ticket to keep it under our radar : https://github.com/melonjs/melonJS/issues/947
  3. obiot

    melonJS 6.1.0 release

    Hi fellow melon lovers Here is a 6.1.0 version, beside others small improvements, this version focus mainly on the issue(s) raised with the 6.0.0 version around Linux and our WebGL Renderer (as you can read it here). Download link : https://github.com/melonjs/melonJS/releases/tag/6.1.0 Full changelog : Audio : latest audio core update (2.0.15) Core : new linux detection flag under me.device Renderer : now systematically warn when using non POT texture in both Canvas and WebGL mode Sprite : new function to allow reversing a given or current animation TMX : support for the Tiled 1.2 beta JSON property format (backward compatible with previous 1.1 version) CanvasRenderer : fix drawImage sub-pixel rendering in Canvas mode when using the short notation (2 or 4 parameters) WebGLRenderer : only throw an exception (e.g. stop execution) when using repeat/wrap mode with a non POT texture WebGLRenderer : properly fallback to Canvas mode in AUTO and WEBGL mode when failing at creating a valid WebGL Context Also, there are no API breaking changes, so purely a "drop-in" replacement ! Cheers, -- the melonJS Team
  4. obiot

    Disable respawn on leaving viewport

    Hi, did you progress or find out what is happening ?
  5. obiot

    Disable respawn on leaving viewport

    2 more things : * first your game is really looking awesome so far * in the latest 6.0 version of melonJS we added a camera damping features that really help in smoothing camera movements : // set the camera to follow this renderable on both axis, and enable damping me.game.viewport.follow(this, me.game.viewport.AXIS.BOTH, 0.1);
  6. obiot

    Disable respawn on leaving viewport

    well honestly.... I don't know..... I really don't see what would be causing that in melonJS. would you mind setting a breakpoint on the loadLevel function https://github.com/melonjs/melonJS/blob/master/src/level/LevelDirector.js#L208 so that we can see the call tree ?
  7. obiot

    Using sprite animations with particles

    I feel like I'm only the bearer of bad news recently, but for now the particle emitter only accept image .... that should not be that hard to add though, basically just check what is passed as parameter and either just draw it if an image, or call the update/xxx-draw method of the sprite from the corresponding methods, if a renderable is passed. https://github.com/melonjs/melonJS/blob/master/src/particles/emitter.js#L47-L55 https://github.com/melonjs/melonJS/blob/master/src/particles/particle.js#L35 https://github.com/melonjs/melonJS/blob/master/src/particles/particle.js#L159
  8. obiot

    registerPointerEvent not emitting in 5.1

    FYI, added it in the boilerplate : https://github.com/melonjs/boilerplate/commit/6b0708dea30fdf15a1a68d8398aa3265feec652b
  9. obiot

    .wav files loaded as .mp3 from game engine

    Hi, well this is just not how the current implementation works, the engine will just pick up one that is supported by the target broswer based on the given priority, and if you want to provide the 3 formats, you cannot therefore mix&match them. Keep in mind also that not all browsers will support ogg for example. I would personnaly recommend to stick to mp3 amd webm (wav files are just to big), and it’s pretty simple to convert them (some website even provide some online converter).
  10. obiot

    .wav files loaded as .mp3 from game engine

    Hi, the list of extensions is also a list of priority, which means that in this case melonjs will check if mp3 is supported, and if yes try to load the corresponding mp3 assets. if you need .wav, just put it first, or only that extension.
  11. obiot

    melonJS 6.0.0 release

    Hi guys, Happy to finally announce the latest release of melonJS with version 6.0.0 ! Blog Announcement : https://blog.melonjs.org/2018/08/melonjs-600.html lib and plugin download link : https://github.com/melonjs/melonJS/releases/tag/6.0.0 As announced on the blog, the previously announced ES6 version is being delayed a bit. Main reason being the unexpected huge amount of work required to make it happen, and the fact at the end that while we are working on building an equivalent ES6 version of melonJS, we are basically not adding any new features, or fixing anything to the current ES5 branch.... which we need as well ! so we choose to go with a more "hybrid" and progressive approach --- melonJS Team
  12. obiot

    melonJS 6.0.0 release

    awesome, looks I'm going to call it working then now on Linux, beside small improvements. we now have at least we have a proper fallback for browser that are not able to provide a performant webgl context.
  13. obiot

    melonJS 6.0.0 release

    Hi @can2nac and thanks for the feedback. And yeah it looks like it's working now in both mode though under Linux (performances aside). but I would definitely agree with you when you say that this is "it's all about Linux" (or at least the GPU support/driver), and the fact that setting failIfMajorPerformanceCaveat to true prevent the browser from succefuslly creating a gl context proves the point. As for Mac that's definitely working as this is my main working environment, and I see a ~2x speed improvement on my side 😛 Only on Linux we have these issues with our WebGL implementation (or had, since it least It does not seem to miserably crash any ore).
  14. obiot

    melonJS 6.0.0 release

    Hi guys ( @can2nac , @TheBoneJarmer ), I have been doing some house cleaning on both renderer, while trying to figure out the current issue with Linux, and ended up fixing a few things. The first thing is that the WebGL Renderer was never checking the returned GL Context for error, and therefore never properly falling back to Canvas Mode. Also, after the remark of @can2nac on the `failIfMajorPerformanceCaveat` option, I did check in Pixi (which I think we can agree as a reference in the matter) and they also pass true for that one, so I kept it that way, but now with the fallback properly working this might actually better work. And finally, I changed a bit how stuff are working when checking for POT or non POT texture, and melonJS is now only throwing an exception when using the repeat/wrap mode with non POT texture (else it's just a warning, and the wrap mode is force to Clamp) And so, since I don't have a Linux machine to test it, would you mind giving it a try to see if there are any changes or improvements ? the latest build is available here : https://melonjs-builds.s3.amazonaws.com/index.html?prefix=artifacts/master/2292/build/ (there are no API changes, so it's just a basic drop replacement) Last but not least, after working on my macbook today (as I'm travelling) and comparing both renderer, I must say that it's really way faster with the WebGL one (2ms to draw a frame with the platformer example, vs 5ms with the canvas Renderer!). Goes without saying I know, but I tend to forget how faster it its :P:P:P thanks ! Oliver.
  15. obiot

    melonJS 6.0.0 release

    @can2nac interesting especially since it's used to detect when rendering on software.... In theory when true and on low performance machine this should force melonJS to swith to the Canvas Renderer : do you mean that in your case it still use the WebGL Renderer but then display the same errors as reported by @TheBoneJarmer ? And when set to false, it all works but with lower performances compared to Canvas (which would make sense actually) ? About the performance difference a few things can quickly degrade perf under WebGL, like too many texture (texture packing is definitely recommended also anyway with Canvas), non POT Texture, and especially standard web font (bitmap font is highly recommended if you don't use them already).
  16. obiot

    melonJS 6.0.0 release

    wow sure, that would be fan-tas-tic !
  17. obiot

    melonJS 6.0.0 release

    Constructive and positive criticism is always welcome, and you actually exactly put your finger where there is a need for improvements
  18. obiot

    melonJS 6.0.0 release

    Which browser are you using ? Chrome ? But we do indeed have known issues with our WebGL implementation and some configuration (GPU) on Linux based platforms. Unfortunately, none of us have a Linux machine to actually debug it, nobody came up with a fix or patch for it, and to be honest sinceLinux based Desktop account for less than 2 percent of total users, it's pretty low in my priority list
  19. obiot

    melonJS 6.0.0 release

    Hi, thank you for your feedback, and indeed the main example on the website seems broken. We have some automated process flow for every release and I suppose that this did not really work out this time.... I'll investigate. Anyway in the mean time, here is the same example (running out of the main site): http://melonjs.github.io/melonJS/examples/platformer/ Then about what melonJS is doing that is different from the others, that's a good question but If I would try to formulate an answer : melonJS is/was the first open-source HTML5 engine available back in 2011, so to follow your logic I would then say that all other engines are actually like melonJS its' completely integrated with most of the 3rd party tools used by the community (Tiled for Map editing, TexturePacker, Physic Editor, Bitmap Font Generator, etc...) Provides it's own physic implementation based on SAT and Broad-phase collision detection using spatial partitioning Other fancy stuff you also probably have then like matrix based math and transform, a particle system (incl. an editor), object pooling, tween, etc... melonJS is super lightweight, despite of all the supported features, with a size of ~200k once minified integrated and working on all platform type (desktop and mobile), all major browser version , and most 3rd-party platform/tools like cocoon, ejecta, Cordova, phone gap, WeChat, FB Instant games. So that's for sure, these are common features available in various forms (worst or better) in all the various engine, and when you said that you developed the same in 2 weeks because you could not find what you like I can definitely relate, as this is how I started initially to "create" melonJS. And last but not least yes, you are right about the documentation, but the thing is that most of the public HTML5 game engine out-there are usually free project that can be supported by the community, and most of the engine are developed by a couple of developers that sometimes even do that on their spare time, and at no charge (e.g. as of today there is no monetisation on melonJS). So it's not always easy to keep it "truly" professional in terms of deliveries/services, but after all some of us are doing this for fun, and we are putting it out there to share with the world. Good luck with your engine, and thank you again for you feedback !
  20. obiot

    Music overlays

    Actually even though the API looks simple, you can do a lot with it. first of all, every time you call the play method, it will create a new instance of the given audio asset if required (e..g. already playing), and the method does return a unique instance ID. Once you have that instance id, you will notice that all other methods are taking an optional instance id parameters, so that you can either apply the "method" to the whole group of just a specific instance id. Not sure if I am clear, but basically it allows you to do something like that : // start "inGameMusic" var id1 = me.audio.play("inGameMusic"); // will return 1 as an example // start a second instance of "inGameMusic" var id2 = me.audio.play("inGameMusic"); // will return 2 assuming that this second call was made before "inGameMusic" ended up playing (as a result of the first call). // see the second instance of "inGameMusic" me.audio.seek("inGameMusic", 1000, id2); // speed down and fade first instance me.audio.rate("inGameMusic", 0.5, id1); me.audio.fade("inGameMusic", 0, 1.0, 1000, id1); and of course you can do the same with different audio assets, and play any track you want on top of any other. if you do mix different track, then the instance ID is not required, as this is only for different instances of the same audio assets
  21. obiot

    How to draw on particular [TMX] layer?

    Good to hear anyway! Memory usage should be lower too if you use Tiled. I will release officially version 6 this weekend, thanks for the feedback
  22. obiot

    Best engine for isometric RPG

    Hi, I would really be interested in some feedback on this one, first on the missing features (so that they can be added) and then on the glitches one, although honestly I am not seeing anything wrong in the example. over the years few isometric projects have been done an with a pretty good result, like GIK, (that seems to unfortunately be down right now), and recently someone is also working on a RPG isometric game, see the post here about recent discussion around it and a short video of it here (bit choppy due to the capture).
  23. obiot

    How to draw on particular [TMX] layer?

    Awesome thanks ! And yes they are still available, i’m just trying to progressively « upgrade » the physic implementation, but keeping all the old stuff for now. Else did you notice any performance improvements, or is it globally stil the same ?
  24. obiot

    How to draw on particular [TMX] layer?

    it should be fine now , latest build (2283) here : https://melonjs-builds.s3.amazonaws.com/index.html?prefix=artifacts/master/ sorry again about that !
  25. @rich great initiative, and adding then one specific topic too for melonJS : https://github.com/melonjs/melonJS/wiki/How-to-deploy-your-melonJS-game-on-Facebook-Instant-Games-in-3-minutes