rparrett / pixie_wrangler

A puzzle game reminiscent of old school printed circuit board design software
https://euclidean-whale.itch.io/pixie-wrangler
44 stars 2 forks source link

Stage 3 lagged out my PC #1

Closed RylanYancey closed 2 years ago

RylanYancey commented 2 years ago

Stage 3 Lagged out my Laptop.

Specs:

Ryzen 7 5800 GTX 1650 16gb ram

It lagged out when I sent the pixies.

rparrett commented 2 years ago

Thanks for the report.

Are you playing on itch? And if so, what browser (and version) are you using?

Level 3 definitely ramps up the amount of pixies on the screen, and the collision / traffic code is extremely naive, but I'm surprised to see a report of a machine with those specs having issues.

There is a known issue where having the firefox developer tools open while playing noticeably slows things down.

RylanYancey commented 2 years ago

I just downloaded the src code from github and ran it.

rparrett commented 2 years ago

Did you run with the release profile? i.e. cargo make --profile release run (--profile release before run is important here) or cargo run --release ?

RylanYancey commented 2 years ago

ah, I did not. That may have been why. I'll try running it from Itch.io

rparrett commented 2 years ago

Release mode makes a huge difference, so some slowness without it is expected.

rparrett commented 2 years ago

Thanks again for motivating me to deal with some of the performance issues.

I've addressed this in a few ways:

https://github.com/rparrett/pixie_wrangler/commit/291e07c517420560e4a97afc0111526b7b778c6f adds optimizations in debug builds just for our dependencies (e.g. the bevy engine itself) as described in the performance section of the "bevy cheatbook"

https://github.com/rparrett/pixie_wrangler/commit/651ab0154de58831791d029e0380494a992cde0a adds a spatial index for collision detection in the laziest way possible, which still turns out to be a huge win.