TurboWarp / extensions

User-contributed unsandboxed extension gallery for TurboWarp
https://extensions.turbowarp.org/
MIT License
114 stars 236 forks source link

2D Instanced GPU Accerelated Object (Extension Idea) #1726

Open YogaindoCR opened 14 hours ago

YogaindoCR commented 14 hours ago

Since 3D GPU Accelerated project is possible, Why don't we make a 2D GPU Accelerated extension? I know this is possible using Simple 3D, But it takes some work to implement.

Isn't this a good idea? Having a lot of object in scratch without worrying about lags

David-Orangemoon commented 8 hours ago

Most of the lag that comes from scratch 2d isn't really scratch's doing. It already uses the gpu to draw everything and transform it. Though the big hurdle is stuff that should only happen cpu side.

YogaindoCR commented 6 hours ago

Most of the lag that comes from scratch 2d isn't really scratch's doing. It already uses the gpu to draw everything and transform it. Though the big hurdle is stuff that should only happen cpu side.

Well, having a single sprite that has a entire 2D RPG map image with thousand object in it. It's way better than having a thousand clones with each has their own "For this sprite only variable", "For this sprite only list", Broadcast listener and so on. Scratch CPU bottlenecking is horrendous.

I used an low end spec, the 100% CPU and 20% GPU Usage on Turbowarp games is very concerning.

This extension might be the solution for a bigger project that used a lot of clones.

CST1229 commented 5 hours ago

Well, having a single sprite that has a entire 2D RPG map image with thousand object in it. It's way better than having a thousand clones with each has their own "For this sprite only variable", "For this sprite only list", Broadcast listener and so on. Scratch CPU bottlenecking is horrendous.

I think Pen works for this (that also uses the GPU).

David-Orangemoon commented 5 hours ago

Most of the lag that comes from scratch 2d isn't really scratch's doing. It already uses the gpu to draw everything and transform it. Though the big hurdle is stuff that should only happen cpu side.

Well, having a single sprite that has a entire 2D RPG map image with thousand object in it. It's way better than having a thousand clones with each has their own "For this sprite only variable", "For this sprite only list", Broadcast listener and so on. Scratch CPU bottlenecking is horrendous.

I used an low end spec, the 100% CPU and 20% GPU Usage on Turbowarp games is very concerning.

This extension might be the solution for a bigger project that used a lot of clones.

It would probably be best to not have objects off screen or after a certain distance ticking, and as CST said Pen Rendering would be your best bet.