pixijs / pixijs

The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.
http://pixijs.com
MIT License
44.03k stars 4.79k forks source link

Cannot render Container2d in RPG maker MV #6431

Closed civmi closed 4 years ago

civmi commented 4 years ago

A few of my RPG maker MV game players report that the game encounters Cannot read property 'render' of undfined error when they enter battle scene.

One of them send me a screenshot: https://i.imgur.com/L1OWge8.png

It seems Container2d from pixi.projection.js I use in battle scene causes the error. They say they 100% encounter the error when entering battle. But almost all players include me don't encounter the error at all. So I have no idea how to fix this.

As for now, all of the reporters use Windows 7 32bit. Does this matter?

Any kind of leads will be appreciated.

eXponenta commented 4 years ago

More like a problems of pixi-projection https://github.com/pixijs/pixi-projection

And you use very old PIXI wich can't supported now. Latest supported v4 version 4.8.9, and there were a many fixes since 4.5.5.

@ivanpopelyshev I call you!!

UPD: nw.js 0.44.1+ using Chromium 79 backend, that's may be not compatibility with win 7 32bit

ivanpopelyshev commented 4 years ago

Latest pixijs v4: https://github.com/pixijs/pixi.js/releases/tag/v4.8.9 pixi-tilemap for v4: https://github.com/pixijs/pixi-tilemap/tree/v4.x/dist pixi-projection for v4: https://github.com/pixijs/pixi-projection/tree/v4.x/dist

It should work. However when I last time helped with RMMV , upgrade to latest pixi-v4 caused some problems. If you use any plugins that re-write the ShaderTilemap class - you'll have to make them compliant with latest corescript (https://github.com/rpgtkoolmv/corescript)

ivanpopelyshev commented 4 years ago

As for canvas2d - Im sorry, pixi-projection for v4 does not support canvas fallback, it crashes :( v5 does, but so far no one converted RMMV to pixi-v5.

Three ways to solve that:

  1. Uglify your code by adding IF's that use regular Container in case of canvas2d. - you can do it yourself.
  2. modify pixi-projection v4 - you can ask me to do that but it will take a few weeks to backport my changes from v5.
  3. convert rmmv runtime to v5. Hard, need pixi knowledge, maybe i can do it in a few months if more people will ask for that

You have to ask your users what do they see in console, if its Pixi WebGL or Pixi Canvas. If that's the case, they have to update their video drivers that way chrome picks up webgl support.

civmi commented 4 years ago

@eXponenta @ivanpopelyshev Thx for reply!

I updated pixi.js and pixi-tilemap.js to the latest version and they work well for now.

@ivanpopelyshev , Sorry but I couldn't get what "Uglify your code by adding IF's that use regular Container in case of canvas2d" mean. Does "Uglify" mean obfuscation? Does "IF" mean if-else condition?

ivanpopelyshev commented 4 years ago

@SQDT Sometimes, we all obfuscate our code by adding more conditions to avoid buggy places ;)

civmi commented 4 years ago

@ivanpopelyshev I got it... yes, that's what we all sometimes do ;D

I'll try to "uglify" my code then. Thank you for your help!

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.