Jump to content

obiot

Members
  • Content Count

    306
  • Joined

  • Last visited

  • Days Won

    7

obiot last won the day on December 27 2020

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

4791 profile views
  1. obiot

    Multiple shaders

    Hi, in the latest 8.x branch we did revamp partially the WebGL implementation, and introduced a new GLShader class which aims to be the base in providing such a multiple shader feature, with the possibility to specify a Shader manually .Unfortunately for now beside switching between the 2 shaders used internally for primitive drawing and sprite it has not been really tested, and probably the current code needs further changes to allow it (now we have one compositor used for both primitive drawing and sprite rendering that automatically switch shader , it should be split into two composito
  2. hi, can you copy paste the part of the code doing the scaling here just to be sure ? also is this on a me.Sprite object ? or for/in a an Entity ?
  3. Hi, thanks for the feedback ! "Parallax" layer has been a long due/requested feature, but nobody never got to actually implement it : https://github.com/melonjs/melonJS/issues/734 this said, changing the layer position should work (I don't see right now why it should not), what version of melonJS are u using ?
  4. there were a massive rewrite in the version 8 compared to version 7 yes, with better detection and fallback to canvas, and also WebGL2 support, so you should actually see performances improvement but this might be linked the the below changes on older computer with 2 GPU, as browser are all switching to a low-power mode by default, as opposed to the previous "high-performance" Renderer : allow specifying the default powerPreference value for the WebGL Renderer (on Safari and Chrome 80+ default is now low-power) see here for the WebGL specs : https://www.khronos.org/registry/w
  5. yes, but at that point it's either you set `failIfMajorPerformaceCaveat` to false and games won't work on some linux platform (this was one of the issue in the past), or true but then windows machines that don't have a good enough WebGL driver implementation will fallback to canvas.... unless you have a good idea, not much more I can do about this to be honest...
  6. interesting question ! I would see two options : OPTION 1 : using a regular physic body with a open polygon or several line shapes, you can know when your body (a polyline then here) is intersecting with any other shape, the trick being to check if both edge are respectively within these two circles, but something you can easily do by testing which line in your body is the one intereseting with a circle and keep track of the circles during the update cycle. OPTION 2 : I would definitely look as well at the raycast feature (demo here). the only thing is that you have to work aro
  7. in the Tiled screenshot here above, your foreground layer is marked as hidden (see the closed eye), are you sure this is not a setting "issue" in tiled ? the error you mentioned is just actually a warning, but it does not prevent the the texture from being used. We display warning about non-POT texture as it impacts performances with WebGL, but does not prevent the game from working. also, if you are on the latest 8.x version, you can actually enable WebGL2 that now accepts non-POT, by setting the preferWebGL1 flag to false : http://melonjs.github.io/melonJS/docs/me.video.html#.init
  8. I'm not sure why you do like this, why don't you just include melonJS in your package.json ? this is will install it with other dependencies, and then the call to require should work.
  9. 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
  10. just added this too : https://github.com/mbolis/melonjs-resources-webpack-plugin#readme
  11. 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
  12. 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 t
  13. 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.v
×
×
  • Create New...