Seeing a Strange Issue with PIXI versions above 4.5.1

Discuss issues pertaining to the various game/web runtimes of Creature here.
Post Reply
wermfood
Posts: 12
Joined: Sat May 25, 2019 5:27 pm

Seeing a Strange Issue with PIXI versions above 4.5.1

Post by wermfood » Fri May 31, 2019 2:16 am

Hi! Now that you helped me in Unity and I was able to do what I wanted, its time to change things up ;)

I have taken the page of the fox that is running from the WebRuntimes (PixiJSRef-Pack-Demo.html) and replaced the script of <script... pixi.js with the same version but hosted. So now it looks like this
<script src="https://cdnjs.cloudflare.com/ajax/libs/ ... "></script>

I can execute it and all is glorious! Then I decide I want to try the next version up (4.8.7) by replacing the script with this version
<script src="https://cdnjs.cloudflare.com/ajax/libs/ ... "></script>
Now the fox just sits there no animations in sight!

If I were to try any version above 4.8.7 no images are loaded. I even took the time to fix some of the deprecations but things still did not work at all on anything above 4.8.7.

Normally, I would just bundle the older version and be happy, but in this case I am creating a mod for an existing web application that you guessed it... uses version 4.8.7

Is there anything that can help me getting this version to function correctly?

chong
Posts: 1006
Joined: Thu Feb 19, 2015 2:21 am

Re: Seeing a Strange Issue with PIXI versions above 4.5.1

Post by chong » Fri May 31, 2019 4:00 am

So I haven't had the time to take a look at Pixi yet, however:
https://github.com/kestrelm/Creature_We ... enderer.js

You can check to see if the following is called. First, the UpdateRenderData() function should be called at every update ( this updates the vertices ). Make sure it is called.

Secondly:
https://github.com/kestrelm/Creature_We ... -Demo.html

Is:
new_manager.Update(0.05);

called? This steps through the animation. Also, it calls:
new_creature_renderer.refresh();

after that forcing a render data update. Are those called or are any errors occurring? You should debug that in your web console.

Thanks

wermfood
Posts: 12
Joined: Sat May 25, 2019 5:27 pm

Re: Seeing a Strange Issue with PIXI versions above 4.5.1

Post by wermfood » Sun Jun 02, 2019 12:53 am

I spent a few hours tracing code and making changes. I am no chong so after doing the simple programming changes deeper issues started occurring (like vertex full). Ill get back to it once I get my confidence back ;)

Here is a bit of a detailed list of what I have seen, maybe it will spark something from your memory when you worked on this.

[*] I had originally just been using the packed version, but went back and validated that the error occurs in the Pixijs-demo.html page as well. So as a quick reminder the first thing I do is replace the script for pixi with

Code: Select all

<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/4.5.1/pixi.js"></script>
. This will execute and work correctly. I then change the version to a bit of a later version

Code: Select all

<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/4.8.7/pixi.js"></script>
which is the version that the developer normally uses for this mod I am making.
[*] There are a few deprecations, but they relate to some constants that changed placed. So I easily altered those for version 4.8.7, until they wee repaired
[*] I followed your guidance and the UpdateRenderData() is always being called as expected. It completes its cycle without generating any exceptions. I was hoping that it was just not performing any of the calculations but that was not it.
[*] I also looked and validated that the creature_manager.Update(0.05) was being called in the animate function and this too executes. Interesting to note that this is not required in the Packed version (no manager is in demo) and it fails in same way.
[*] Its odd that I am the only one that has ever seen this, so I went back and pulled from Git and tried again. I verified its really an issue. Either people already fixed these in their projects, or they can control the PIXI version.

I know you are a one man show over there, and I appreciate any time you can spend taking a gander at it :D

wermfood

chong
Posts: 1006
Joined: Thu Feb 19, 2015 2:21 am

Re: Seeing a Strange Issue with PIXI versions above 4.5.1

Post by chong » Sun Jun 02, 2019 2:17 am

Hello,

You can sync up again, I got it rendering/running on my system. However, it seems like the new version of PixiJS might be a bit buggy, it does not seem to be updating indices correctly in certain scenarios so not all features might be fully functional compared to the old version ( maybe we can wait for the new PixiJS to become more mature/stable first ). In any case, the code has been updated and tested + checked in on GitHub.

Thanks

wermfood
Posts: 12
Joined: Sat May 25, 2019 5:27 pm

Re: Seeing a Strange Issue with PIXI versions above 4.5.1

Post by wermfood » Sun Jun 02, 2019 3:31 am

Wow that’s fast! The latest version is 5.0.3 I
Assume you have just configured the 4.8.7 version. I’ll pull it down and take a gander.
** Update
Just checked it out and you did make it work with the latest version 5.0.3! I did see a potential issue while I was running through the code when dealing with packed images.
In CreaturePixiJSRenderer.js line 48

Code: Select all

//~existing code and it crashes CreatureRenderer.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
CreatureRenderer.prototype = Object.create(PIXI.Container.prototype); //I made a change and this seems to work

chong
Posts: 1006
Joined: Thu Feb 19, 2015 2:21 am

Re: Seeing a Strange Issue with PIXI versions above 4.5.1

Post by chong » Sun Jun 02, 2019 4:44 am

I think you should use CreaturePixiJSRefRenderer.js instead, this is the one updated for the latest version of Pixi.js .
The older one is used for other variants ( like Phaser CE )

Thanks

wermfood
Posts: 12
Joined: Sat May 25, 2019 5:27 pm

Re: Seeing a Strange Issue with PIXI versions above 4.5.1

Post by wermfood » Sun Jun 02, 2019 4:46 am

will do. Thanks again! have an excellent night/day

Post Reply