Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
You're not rendering the scenes.
https://pixijs.io/examples/#/basics/basic.js

Btw. Fun fact: PIXI doesn't have any garbage gollector that would be responsible for all textures and as such you need to flush (release them from GPU memory) them by yourself. There is a garbage collector on the renderer, however it serves to deal with procedurally generated textures (text, graphics, etc.)
 

Levolpehh

Veteran
Veteran
Joined
Nov 17, 2018
Messages
86
Reaction score
81
First Language
English
Primarily Uses
RMMV
Would changing the scene serve to "flush" the textures? I'm displaying 30 sprites at a time, then set each of them to a texture based on whether or not a skill is learned or not, so they become 1 of 3 images, and the images update each time you learn a skill.

I've also tried removing the render multiple times. Hasn't worked..
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
In the worst case press f12 for dev tools, they should display if there are errors.
The only thing that catches my eye is, I don't know what Skills[index] is in your code. Do you have the skills etc. defined properly?
Also, no, changing thr scenes does not flush textures. They need to be flushed manually or reused.
 

Levolpehh

Veteran
Veteran
Joined
Nov 17, 2018
Messages
86
Reaction score
81
First Language
English
Primarily Uses
RMMV
Skills[index] is just an array filled with a bunch of components that setup positions and functions for each button/sprite.
for (var x = 0; x < Skills.length; x++) {
this.createSkillButton(x);
}
Index refers to the index of Skills and the respective Button]

There's also no errors. Just nothing appears. For your cat video, how did you setup the stage/app?
 
Last edited:

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
I did not set it up at all, I used default MV's. I just planted the three functions there as a plugin and used the SceneManager._scene.
 

Levolpehh

Veteran
Veteran
Joined
Nov 17, 2018
Messages
86
Reaction score
81
First Language
English
Primarily Uses
RMMV
Oh okay, we're onto something. Tried SceneManager._scene.addChild(sprite) and it worked for a few buttons. For some reason only works for ones nearest the top of the screen. I'll keep testing to see what the problem is..

Untitled.png

Think this element is the problem. The buttons above and below that blue bit are all touchable. If i were to delete it in the console, it fixes the problem. Would I have to add an exception to it like how you aliased the other Graphics.functions? o-o I'll try that in the meantime..

edit: Yup that worked! I thiiiink.. I'm good?

add this to your description :p
Code:
    Alias_Graphics_createErrorPrinter = Graphics._createErrorPrinter;
    Graphics._createErrorPrinter = function() {
        Alias_Graphics_createErrorPrinter.call(this);
        this._errorPrinter.style.pointerEvents = "none";
    };

I think I may have fixed the problem hours ago but since I never noticed only the top and bottom slices were working since I usually only checked the middle bit I didnt realize.. T__T
 
Last edited:

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
Well, I did not have problems with it as I don't use any plugins, so in my window it's smaller and doesn't really cause any troubles.

But aliasing the createErrorPrinter should do the trick, that's true.
 

Levolpehh

Veteran
Veteran
Joined
Nov 17, 2018
Messages
86
Reaction score
81
First Language
English
Primarily Uses
RMMV
Back to earlier's topic about removing the sprites? I was under the assumption that moving to a new scene cleared it all out, so that's how I was doing it even previously with Sprite_Buttons. Does this.removeChild(); work? Would be pretty ****e design wise if it just caused a big memory leak.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
It's not about the sprites, but about the textures. Sprites get dealt with through Javascript's garbage collector as they're saved in RAM, but textures don't and need to be flushed manually as they're saved in GPU, where Javascript doesn't have access to (as they're manipulated via WebGL).
 

Levolpehh

Veteran
Veteran
Joined
Nov 17, 2018
Messages
86
Reaction score
81
First Language
English
Primarily Uses
RMMV
texture.on('dispose', this.destroyTexture, this);
this.destroyTexture(texture);
this.removeAll();

do you know how to dispose of them or would one of these work?

edit: think I got it.. thingiwanttodelete.destroy(); ?
 
Last edited:

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
Yup. The destroy method.
 

Levolpehh

Veteran
Veteran
Joined
Nov 17, 2018
Messages
86
Reaction score
81
First Language
English
Primarily Uses
RMMV
Alrighty, thanks again for all your help with learning Pixi! :kaoluv:

I think I've got a better understanding of it now!
 

Latest Threads

Latest Profile Posts

Gameboy Tiles, Cure Writer's Block, Animations on Menu, Generate Tasks | RPG Maker News #40

How would you judge a game you played? Art/Graphics? Story? Gameplay?
Learn MV sales goal = 2%
NSFW game sales goal = 2500% (no jokes) :guffaw:
After gathering, sorting out & reconsidering hundreds of enemy battlers over the last two das, finally my favorite part begins: Inventing names and lore for them all :D

Forum statistics

Threads
111,377
Messages
1,060,592
Members
144,706
Latest member
DonTonyPepperoni
Top