Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slower in Leopard than in Scratch 3 #138

Open
sfederici opened this issue Jul 19, 2022 · 2 comments
Open

Slower in Leopard than in Scratch 3 #138

sfederici opened this issue Jul 19, 2022 · 2 comments
Labels
compatibility Bugs that cause Leopard's behavior to differ from Scratch's

Comments

@sfederici
Copy link

It seems that project https://scratch.mit.edu/projects/401788041/ it slower in Leopard than in Scratch 3. To see it working move the mouse around

@towerofnix
Copy link
Member

towerofnix commented Jul 19, 2022

Behavior I'm seeing is that the project renders 3D planes one horizontal line at a time instead of all at once, so seems like a compatibility issue.

Edit: to devs - labelling as such in this repo but this may actually be an issue with sb-edit sb3 -> leopard translation?

@towerofnix towerofnix added the compatibility Bugs that cause Leopard's behavior to differ from Scratch's label Jul 19, 2022
@towerofnix
Copy link
Member

Block basically responsible for rendering is "fill xyz123 color" (fillXyz123Color in generated Leopard). It's "run without screen refresh" but sb-edit doesn't seem to detect that, calls to children custom blocks are e.g. yield* this.rotate(x33, y33, z27) instead of this.warp(this.rotate)(x33, y33, z27). Warp procedure call generation, warp detection.

I made a minimal demo to show the behavior of nested non-warp custom blocks under warp and non-warp ones: https://scratch.mit.edu/projects/715531565/

Code responsible for compatibility here was added in leopard-js/sb-edit#56. That's from January 2021, which is a while ago, so I'd assume leopardjs.com supports it, but... maybe not...?

...Yeah, tested locally, and this minimal project translates as expected. The project linked by @sfederici also works (and runs at 30 FPS pretty easily—Scratch only reaches around 15-20 FPS on my device!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Bugs that cause Leopard's behavior to differ from Scratch's
Projects
None yet
Development

No branches or pull requests

2 participants