johnfn Posted April 25, 2020 Share Posted April 25, 2020 Hey guys, Been working on a game with Pixi recently. The game started running at a lower FPS and I'm not sure why. I opened up the performance tab and indeed I see that frames are coming in slower occasionally: Notice the frame that takes 32.8ms instead of 16.6 as expected. However, the performance tab doesn't give much of a clue as to why this is. No big CPU usage spikes, no GPU spikes, and no other obvious problems I can see. How should I go about debugging this? Full source is here https://github.com/johnfn/ld46, but it's enormous and I have no expectation that anyone actually reads through it. More curious about general approaches here. (I am rendering a bunch of huge textures and I assume that's what the issue is. However, I'd REALLY like to know HOW to debug this sort of thing from first principles, assuming I know nothing!) Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 25, 2020 Share Posted April 25, 2020 > How should I go about debugging this? I dont remember if profiler actually shows GPU load, your app its probably gpu-bound. I can look at that , but I'm too busy with my tasks Give more info about project, how many pixels do you think you fill on screen? > I am rendering a bunch of huge textures shouldnt be a problem. How many pixels are actually drawn on screen is. If you have 10 full-screen layers - that's the problem. Quote Link to comment Share on other sites More sharing options...
johnfn Posted April 25, 2020 Author Share Posted April 25, 2020 27 minutes ago, ivan.popelyshev said: > I am rendering a bunch of huge textures shouldnt be a problem. How many pixels are actually drawn on screen is. If you have 10 full-screen layers - that's the problem. No need to actually debug my code This makes sense, but it also makes me wonder. I have a parallax background with about 10 layers, and each of the layers are pretty big (1500x1000ish). How would I go about optimizing something like this? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 25, 2020 Share Posted April 25, 2020 Convert what you can to geometry and eliminate huge parts that arern't being rendered for sure. if you have many transparent parts, you have to polygon-pack it, you can use pixi-heaven to use polygon packing with pixi sprites, it supports texturepacker input. If you can do one sprite like this, you can emulate tilingSprite with just 2-4 sprites like that. Quote Link to comment Share on other sites More sharing options...
jonforum Posted April 28, 2020 Share Posted April 28, 2020 (edited) for me nothing wrong here ! or nothing about pixi itself Look more a structure issue This is why i manually release GC in specified area with a scene loader, maybe you have too much thing in the GC and it release at random position in your streaming. Also notice you use front-end react for you dev tool, it seem make big computing. Hard to say what wrong, it a complexe projet. But for me , i dont think it pixijs issu, but you maybe need confirm by a pro. look more in react,chunker,and GC Edited April 28, 2020 by jonforum Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.