Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Olivier Biot
@obiot
oh let me try one last thing
(if you don't mind)
irisnegro
@irisnegro_twitter
sure, let's try
Olivier Biot
@obiot
here it is :
irisnegro
@irisnegro_twitter
that last one worked
Olivier Biot
@obiot
awesome, thank you very much for the help
I'll dig out my super old android tablet later and will look at the canvas fallback on the 7.x branch\
irisnegro
@irisnegro_twitter
thank you for your development of this engine
Olivier Biot
@obiot
based on the error you reported it seems like the WebGL context is actually created, but the shader compilation is failing
:+1:
Olivier Biot
@obiot
@irisnegro_twitter about this issue on Linux : melonjs/melonJS#982
what Chrome and FF version do you have ? the thing is that when researching the reported error on Google, I found out that this was raised by multiple people ~3 years ago and fixed since Chrome 49 and other browser back then
I fixed an issue though, and it should fallback properly now on your android device if WebGL not supported at all
irisnegro
@irisnegro_twitter
on Linux I have ff 68.0.1 chrome 76.0.3809.100
will try the new build
irisnegro
@irisnegro_twitter
no luck
I get TypeError: _context is null
followed by TypeError: me.video.renderer is undefined
and on top of them: Error creating WebGL renderer :0:2(12): warning: extension `GL_ARB_gpu_shader5' unsupported in fragment shader
0:21(29): error: sampler arrays indexed with non-constant expressions are forbidden in GLSL 1.30 and late
irisnegro
@irisnegro_twitter
on Android I'm up to date in one phone and on other I'm stuck on Chrome 71.0.3578.99
firefox nightly (up to date)
if I don't force canvas on my game I get black screen (or background color on up to date chrome)
and on the melonjs website the example game works good on firefox but it's constanly blinking on chrome
irisnegro
@irisnegro_twitter
(I'll keep forcing canvas for now as it works for my game and devices)
irisnegro
@irisnegro_twitter
btw I'm drawing some shapes using context.getContext() beginPath() moveTo() lineTo() closePath() etc, and since various versions ago I had to add 36 to adjust for some offset I was watching
I mean if I try to draw an square starting on top left corner (0,0), I need to start it on (36,36), does this happends to anyone else?
irisnegro
@irisnegro_twitter
(I noticed the offset thing is like from a two year ago, don't remember)
irisnegro
@irisnegro_twitter
sorry the offset is 5 not 36, if I want to start at (0,0) I have to write (5,5) if I want to go all to the right I need to write me.game.viewport.width+5
irisnegro
@irisnegro_twitter
(I think it started near version 5 of melonJS)
Olivier Biot
@obiot
to draw shape you can directly use the drawing function of the renderer
you can either directly pass a shape object (me.Polygon or other) or just involve the fill/stroke function to draw line square , etc...
see all the strokeXXXX and fillXXXX functions
Kevin Prehn
@kvn-prhn
hey all, sorry if this is a simple question, but is there a way to force rendering to respect z position? I have a sprite with a very positive z-index but it is still being drawn behind another entity with a much smaller z position.
Olivier Biot
@obiot
really ? z ordering is enable by default actually
how do you specify the z value for each sprite ?
Kevin Prehn
@kvn-prhn
I use this.pos.setMuted(x, y, z) and make z the z value
I set it to the same value as above when adding it with me.game.world.addChild(child, z)
and then call me.game.repaint() right after
Kevin Prehn
@kvn-prhn
I could be doing something else wrong but I'm not sure
kapilpipaliya
@kapilpipaliya
Hello, I am totally new to melonJS. is there an IDE available.?
Olivier Biot
@obiot
@kvn-prhn why do you use setMuted ? this prevents the engine to automatically update the absolute position of the child in the world, did you try the "standard" set function ?
irisnegro
@irisnegro_twitter
@kapilpipaliya it's javascript soo you can pick you favorite text/code editor that works with javascript.
kapilpipaliya
@kapilpipaliya
thanks
kapilpipaliya
@kapilpipaliya
hello melonjs does support android mobile browser properly?
Olivier Biot
@obiot
Yes
kapilpipaliya
@kapilpipaliya
Thanks