Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Mar 29 00:27

    obiot on master

    Update README.md (compare)

  • Mar 29 00:22
    obiot closed #38
  • Mar 28 23:55
    obiot closed #45
  • Mar 28 23:55
    obiot commented #45
  • Mar 28 23:53
    obiot closed #39
  • Mar 28 23:53
    obiot commented #39
  • Mar 28 23:52
    obiot commented #38
  • Mar 28 16:52
    SpyrariSpagetify opened #38
  • Mar 28 15:11
    SpyrariSpagetify opened #45
  • Feb 28 02:14

    dependabot[bot] on npm_and_yarn

    (compare)

  • Feb 28 02:14

    obiot on gh-pages

    Bump prismjs from 1.25.0 to 1.2… Merge pull request #6 from melo… (compare)

  • Feb 28 02:14
    obiot closed #6
  • Feb 28 02:13

    dependabot[bot] on npm_and_yarn

    (compare)

  • Feb 28 02:13

    obiot on gh-pages

    Bump prismjs from 1.25.0 to 1.2… Merge pull request #44 from mel… (compare)

  • Feb 28 02:13
    obiot closed #44
  • Feb 28 02:12

    obiot on gh-pages

    added a link to the Tiled Intro… (compare)

  • Feb 26 02:19
    dependabot[bot] labeled #6
  • Feb 26 02:19
    dependabot[bot] opened #6
  • Feb 26 02:19

    dependabot[bot] on npm_and_yarn

    Bump prismjs from 1.25.0 to 1.2… (compare)

  • Feb 26 02:18
    dependabot[bot] labeled #44
Olivier Biot
@obiot
2./ you should definitely try to update at least to version 9.0, and then posssibly to 10.x (once on version 9, it's relatively easy to migrate to 10.x). v
3./ these days it seems that people are more on discord as well : https://discord.gg/aur7JMk
i see you are using enableChildBoundsUpdatebut this was implemented only in 9.0
and at least on the version hostedat www.silverhawk.co.uk it's still using 8.0
Olivier Biot
@obiot

given an melonjs UI example but does not work when integrated into a game as the mouse events don't work when using "main_player", game.player_entity, but if I make "main_player", me.Entity then mouse events work, but no player displayed.....stupid melonjs UI example if going to give an UI example make sure it works across multiple layers and mouse events work even when its not on the root layer...as I have a complex UI which needs these mouse events to work.

i see, sorry for the stupid example i guess, but feel free to propose any changes if you found a limitation in the example, the code is open source, so anyone can contribute

Benoy Sen
@soulvampire
Have been trying to find a way to get the mouse events to work for buttons, when I set the button to this.is_floating = true then the mouse events work, but buttons are not attached to the sprite panel so when sprite panel is moved by player the buttons don’t move, so need to find a way to get the button events to work, but using your UI example code the does not work with multiple layers in a complex arragment, so need to understand why, but have tried, the way that I am using this code allows for greater flexability on UI design, and have removed the line from the code referenced by melonjs 9.0, but your UI example is very simple, not a complex multiple layer UI just 2 layers 0 and 1, were the game has 7+ layers for different game effects on the platform level, so that when I load a new world their would be almost no changes to the code just a change to the graphics and the various enemy spawn points which woild be set from tiled map designer and were locked doors are with keys to open defined doors, so flexability on code reuse that why keeping things a generic as possible to allow flexabiltiy on game design
Benoy Sen
@soulvampire
Have been racking my brain as to why the buttons events don’t work when attached to a panel as a child of that panel so when game panel is moved by player the buutons are moved as well, but while in in this mode the buttons events don’t work, but if I change to buttons to this.is_floating = true the button events work as well as click events have no idea why, could you see why from the game at www.silverhawk.co.uk older code, have not updated the code on my domain, when I get it working then will update code, but as of yet have no idea why its not working, have gone through various example’s and have found no comparison code to find a clue
Olivier Biot
@obiot
sure, can you maybe share me a zip with the source code somewher ? would be easier to debug it and see what is wrong
also, have you tried setting isKinematic to false all all UI objects you defined that are not extending GUI Object ? again without it it won't work
Olivier Biot
@obiot
i can drag the game map panel though :)
Benoy Sen
@soulvampire
the panel can be moved, so the mouse events are working, just not for the buttons, even though the UI example has the same structure as my code, so the mouse events should work the same
I have made game.generic_floating_button_interface within the constructer isKinematic = false, but button events still don't work
Benoy Sen
@soulvampire
hope you can find where I have made the mistake as its driving me nuts.......it should work
no its fine the whole code will show how it interacts with the various layers and the first level
Olivier Biot
@obiot
found the bug !
and fixed it !
i need to clean my code, as i added a lots of things here and there to debug it, but i'll do it later, i just spent the whole day on it, I need a break !
the issue is related to the quadtree and how it sees non-floating items within floating container, not sure it is a regression or a long standing bug, but however the bug fix heavily rely on the new bounds implementation from the 10.x branch, so you will have to definitely upgrade
give me one more day to clean the whole thing, including your code, and i'll send it back to you
Benoy Sen
@soulvampire
Fantastic……its nice of you to do that much work on my code….its something I would have never been able to figure out…….thanks for your help on perseverance
Olivier Biot
@obiot
the reason why i could not find it until now, is that i was focusing on the pointer event implementation, where from a coordinate translation/convertion point of view everything was correct, so it was not making any sense
and the issue was the spatial grid returning the wrong set of object.. !
my god
ahahah
that was a fun one to track down
sorry about the bug, but thank you for reporting it !
Benoy Sen
@soulvampire
So does that mean that now if anyone uses that same complex UI structure it objects will react to mouse events……?
Olivier Biot
@obiot
yes
the other reason i did not see it before, is that in my platformer example, the UI Container has the size of the viewport, and located at the 0,0 coordinates
yours was offset in the below of the screen
and god knows why it was only affecting the y coordinates
Benoy Sen
@soulvampire
nice…..so now I can go full swing on implementing that UI upgrade that I was hoping to do before this strange bug appeared
Olivier Biot
@obiot
on the x axis, the quadtree was returning the correct location
yes you can !
but you should go full swing first on finishing converting everything to melonJS 2 :)
1 reply
i'll send it back to you tomorrow, is that ok ? i really need a break now :)
Benoy Sen
@soulvampire
fine…….would you be updating your UI example to a more complex UI to show that you can use the UI container and Gui buttons to make really nice UI effects
1 reply
Thats fine you have done me a big service with this fix, as I was trying to find a way to get the UI to work
Olivier Biot
@obiot
allright, talk to you later then, break time here !
Benoy Sen
@soulvampire
Cool….you have a nice day speak to you soon……..
Benoy Sen
@soulvampire
there are no UI examples of clipping text to a textbox area have code to display a textbox with vertical scroll bars, but can't find any example of how to limit the text display to this area only
Olivier Biot
@obiot

there are no UI examples of clipping text to a textbox area have code to display a textbox with vertical scroll bars, but can't find any example of how to limit the text display to this area only

http://melonjs.github.io/melonJS/docs/me.WebGLRenderer.html#clipRect

discord is really more busy/popular these days :)
Coder2195Text
@Coder2195Text
image.png
did the name space not import?

```import * as me from "melonjs/dist/melonjs.module"

me.device```

Olivier Biot
@obiot
from my experience you cannot use me.xxx directly from the console
it's only available where you actually imported it
havent tried to do import * as me from "melonjs/dist/melonjs.module" from the console though