obiot

Members
  • Content Count

    298
  • Joined

  • Last visited

  • Days Won

    5

obiot last won the day on August 13

obiot had the most liked content!

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

4142 profile views
  1. just to be clear though, the build process in the boilerplate is to actually build a one file minified version of the game, and additionally automatically generate the asset file. nothing prevent from actually using the boilerplate "manually" by running the provided index html file, without building the whole thing (or even just not using the boilerplate, it's not mandatory) and manually building the resources file yourself : https://github.com/melonjs/tutorial-platformer/blob/gh-pages/tutorial_step9/js/resources.js
  2. just added this too : https://github.com/mbolis/melonjs-resources-webpack-plugin#readme
  3. Hi, Again with this error ! (facepalm) are you using the latest version of the boilerplate ? this was addressed in the latest commits (https://github.com/melonjs/boilerplate/commits/master) see as well here : https://github.com/melonjs/boilerplate/issues/34 but yes the boilerplate really/definitely needs a big update (remove grunt) and switch to either webpack or rollup
  4. obiot

    SoulVampire

    Sorry for the late answer, normally you should have all you need here : http://melonjs.github.io/melonJS/docs/me.collision.html#.ResponseObject - you can check if b is an instance of a ladder object - use the overlapV vector to determine by "how much" your player collides with the ladder, I would rather use that instead of binA, as there is little chance the player is always completely inside the ladder (see in your picture it is overlapping, but not completely inside, check the collision box, in red, using the Debug panel) as for types, this is more to limit which object the main player (or others can collide with), but by default this is mostly all of them, so it should not be an issue http://melonjs.github.io/melonJS/docs/me.collision.html#.types let me know if this helps, or if you managed to implement it in the meanwhile
  5. obiot

    melonJS es6 module

    took me a few build to properly fix some remaining internal reference to the me namespace, but since build 2839, even more complex example such as the platform one is working when importing the ES6 module, so it seems that it starts to be stable enough to share and play with. here is one, for those interested, that does not have any external dependencies (using the latest dev build) import * as me from "https://melonjs-builds.s3.amazonaws.com/artifacts/master/2839/build/melonjs-module.js"; // upon device ready me.device.onReady(function () { // Initialize the video. if (!me.video.init(1218, 562, {scale : "auto"})) { alert("Your browser does not support HTML5 canvas."); return; } // add a gray background layer me.game.world.addChild(new me.ColorLayer("background", "#202020")); // add a text object in the center of the display me.game.world.addChild(new me.Text(609, 281, { font: "Arial", size: 160, fillStyle: "#FFFFFF", textBaseline : "middle", textAlign : "center", text : "Hello World !" })); });
  6. obiot

    melonJS es6 module

    Hi Guys, as part of the 9.0 (master) branch, all classes have been converted to es6, and the build process now generate 3 files : melonjs.js (plain es5 umd bundle) melonjs.min.js (minified es5 umd bundle) melons-module.js (es6 module) both the es5 umd bundle and es6 module are now available under our amazon build bucket (click on the latest build version) : https://melonjs-builds.s3.amazonaws.com/index.html?prefix=artifacts/master/ I haven't yet really tested it to be honest, as I'm still focusing on other features and I haven't really yet converted any example, but It would really be nice to have any external feedback/testing on this one if anyone here wants to be a alpha-beta tester for the es6 module. the API are still supposed to be backward compatible (inheritance mechanism has not been changed yet to the es6 class inheritance), so using "import * as me from melons-bundle.js" should just be working as previously. Thanks!
  7. obiot

    The COVID-19 Game

    Runs pretty well on my iphone (using the web version of course), pretty happy of all the hard work we put into the 8.0.1 version (with your help) is paying off with the resizing issues being gone, and extra bonus the game seems much smoother than before Congratulations on the update !
  8. obiot

    melonJS 8.0.0

    Few of the improved examples I was talking about : Sprite rendering around a specific Anchor Point, including rotation, scaling and transparency : UI example, with the canvas embedded in a CSS layout, and input fully working even when zooming in/out or scrolling the page : Shape drawing in WebGL and Canvas mode, including masking : Also, examples have been moved into their own repositories, and will keep being improved over time, feel free to submit there your changes as well : https://github.com/melonjs/examples
  9. obiot

    melonJS 8.0.0

    Hi all, It took waaaay too long to reach a proper stable release, but melonJS 8.0 is finally available ! Full list of changes is here, but to sum it up, the initial goal of this release was to improve the physic implementation and move forward with ES6 support (at least for class definition), but we actually ended up revamping the WebGL renderer and improving other part of the engine following numerous and very helpful feedback from some users, like @PLAYERKILLERS, @alcor and @siauderman to name a few WebGL & Canvas Renderer : WebGL renderer and embedded shaders have now been fully rewritten and should offer better compatibility (especially on mobile and linux platform) and definitely better performance. WebGL2 support, WebGL2 brings performances improvements and most of all allow to use now-power-of-two texture, which will decrease memory consumption and therefore also performances. It’s currently off by default (there is a ‘preferWebGL1’ flag to set to false to enable it)probably it will be enabled for the next release) as it has not been used yet for any games deployment, so I definitely recommends to test it on your side as well (will fallback automatically to WebGL1 if not supported) Proper tint support for both WebGL and Canvas renderer (just specify a tint color using me.Sprite.tint, and the sprite color will be changed accordingly) -> this is great as well to optimise the amount of assets as they can simply be coloured programmatically, by extension BitmapText can now also be tinted, using tint, or by specifying a fillStyle in the constructor parameters (so just one white bitmap text is enough now and can be coloured any way we need) Physic Improvements : me.game.world is now a specific container that manage physic related properties and updates and hold instances like the quadtree used for Broad phase gravity for physic bodies is now defined globally under me.game.world.gravity, and can be scaled individually using me.Body.gravityScale any shapes or physic body can now be fully rotated around either their center or a specific given point renderable can now be fully rotated around either their Anchor Point or a specific given point Other improvements : melonJS now create a default Stage by default, which means you can just add any child to the game world right after initialising your game (great for prototyping or small games) massive improvements on the canvas scaling/positioning and related input detection when embedded into a complex CSS layout lots of Tiled related fixes, including for staggered map rendering, anti-diagonal rotation, tile animation, etc... add support for free-texture-packer (http://free-tex-packer.com), a free Texture Packer alternative some new Color utility function (lerp, random) melonJS will now automatically release any registered event on a renderable as soon as the object is destroy accelerometer and motion detection improvements (to support latest w3c api) fix the long standing issue of sprite position being offset when scaling or rotating a sprite -> this will bring some visual differences in any existing game where scaling or rotating me.Sprite objects (since now the position will be updated accordingly to the Anchor Point) examples have been cleaned up and improved to show most of the new features (check the sprite, graphics, UI ones for examples) tons of other bug fixes here and there There should not be any breaking changes in this release, as always we tried to keep it backward compatible, but keep an eye on the console log for deprecation warning and make sure to check the upgrade guide on how to upgrade your game : https://github.com/melonjs/melonJS/wiki/Upgrade-Guide Last but not least, everything is available on NPM and jsDeliver, README has also been updated and worth a read if you haven't since a long time Then next, for the version 9.0 (I guess), few things we are looking at : Physic improvement: as the goal is to be able to plug a physic engine in melonJS (like matter, box2d, etc..) we will keep improving/changing the internal implementation of the physic body and how the world is iterated in order to more closely match those library and more easily allow defining a physic plugin or something or even directly use one in melonJS (if anyone has any advise/preference on a physic engine for javascript, please shoot) me.Entity will be deprecated, way to go forward will be to add a me.Body object to any me.renderable, this will automatically fix all the entity bounds issues, and is more aligned with how physic engine (like matter) are working. The new way to work is already working in the current 8.0 version, but not fully tested, I do recommend though to start using it so that we can track left over issues with it. I created a ticket for that on GitHub, if you have comment let’s discuss it there : https://github.com/melonjs/melonJS/issues/1008 convert class definition to ES6, will probably start with the one that are more like internal and not likely to be extended in your game (like vector and matrix). but also for now we will keep the current rollup build setup to output a pure ES5 library (so even though we slowly migrate melonJS to ES6, we still transpile it back to ES5, at least until the whole library is converted), a track list has also been added for those classes here : https://github.com/melonjs/melonJS/issues/915 further improvements to the WebGL renderer : finish testing WebGL2, and other things like VAO that could be added as well ... and I think that's all for now ! So, I hope you guys are excited about this new release, let me know what you think, and will definitely look forward to your feedback ! -- the melonJS team
  10. Hi, for the level not stretching or taking the entire screen, check the params you passed to the me.video.init() method, the `scaleMethod` is the one to specify with something like `flex` to match the desired effect (at least that's the one used in the tutorial, but there are other you can check as well, for Platformer I personally use `flex-width`) for the movement, maybe you can post here the code of your entity if you are sure you properly follow the tutorial, but else I would say to check again part 3 and make sure that you added the call to `this.body.update(dt);` good luck !
  11. based on the callback stack it's more like the image used for the font is undefined and therefore the width & height properties, how did you define the font object, and did you added both the json and image in the preloader asset list ?
  12. awesome, and indeed i's a way better "experience". else, since I noticed you are using the master branch, would you mind testing the WebGL2 renderer ? it has been added in the last 8.0 (be sure you also have the latest 8.0), it seems to be working for most things (the platformer example uses it as well now), but it's still disabled by default, you can just add "preferWebGL1 : false" to the video init parameters (don't worry it will fallback to WebGL1 if the device does not support WebGL2).
  13. wait I'm being stupid, in the response object you already have all you need, including the overlap magnitude : http://melonjs.github.io/melonJS/docs/me.collision.html#.ResponseObject plenty of things to play with anyway, let me know which one worked the best for your use