Jump to content

Dramatic performance drop wen loading a few sprites


oukourj
 Share

Recommended Posts

Hi,

I'm new to Pixi.js and I'm trying to make a simple scene, in RPGMaker Style (with different tiles on the ground to draw the scene).

I coded a little app that simply creates all the needed sprites, adds them to a Container (or ParticleContainer, tested both), adds the whole container to the scene, and manages a few keyboard inputs.

The result is highly laggy...

What am I doing wrong? I would happily look for other ways to do this but I think I'm doing what guides show, so I don't get it.

Here is the code : http://pastebin.com/C9UUK8nL

Thanks !

Link to comment
Share on other sites

Alriiiiiight, found the error (sorry sometimes you just gotta do something different to finally find :p).

I forgot to "cut" in my tileset (texture.frame = rectangle), importing it all repeatedly over my scene... ! Which I couldn't see because it was imported every 32px... giving me the illusion of a successful Sprite cut and import.

Thanks for the fast answer anyway !

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...