Discuss Scratch

TheMobileGames
Scratcher
100+ posts

Vector & Bitmap Image Formats - Quirks/Problems

Currently, I'm making a high-quality Scratch port for the web game Territorial.io so I'm making a rough version first. The game needs a pixelated world map in various sizes; up to a 1754 by 998 map which is over 1.7 million pixels. This means I can't easily make use of lists and I don't want to use like 12 different costumes for a single map; ideally, just one costume per map would be best. I have the images of the maps in full resolution and I uploaded them into my project using TurboWarp's HD image uploads addon. I'm somewhat conflicted between vector and bitmap images and I am wondering if anyone has any tricks to fix my issues. These maps MUST be stamped with the pen tool.

Vector images:
- Pro: can be any size
- Pro: can expand past the costume editor's borders
- Con: transitions/smoothens the colors
Bitmap images:
- Pro: perfect quality/doesn't smoothen
- Con: size too small 480 × 360
- Neutral: things cannot be drawn outside of the costume editor

Does anyone have tricks to make Scratch use a vector image but doesn't transitions/smoothens the colors or have tricks to make the pixel count of bitmap images greater. Also, one more thing, does anyone have or can make an TurboWarp addon that allows people to zoom and scroll past the costume editing area of the sprite editor.
TheMobileGames
Scratcher
100+ posts

Vector & Bitmap Image Formats - Quirks/Problems

An badly colored pixelated vector map for testing will become smoothened and ruin everything when it gets stamped. My project allows me to zoom in and out well.

https://cubeupload.com/im/Themobilegames/IMG2412.jpeg

Last edited by TheMobileGames (May 11, 2024 10:20:13)

TheMobileGames
Scratcher
100+ posts

Vector & Bitmap Image Formats - Quirks/Problems

A badly colored pixelated bitmap map for testing will not become smoothened and will not ruin everything when it gets stamped. However, it doesn’t have enough pixels to use. My project allows me to zoom in and out well.

https://cubeupload.com/im/Themobilegames/IMG2411.jpeg

Last edited by TheMobileGames (May 11, 2024 10:22:33)

TheMobileGames
Scratcher
100+ posts

Vector & Bitmap Image Formats - Quirks/Problems

Yay, nevermind, I found a solution finally.

https://scratch.mit.edu/projects/1018320173/

Last edited by TheMobileGames (May 11, 2024 22:39:46)

TheMobileGames
Scratcher
100+ posts

Vector & Bitmap Image Formats - Quirks/Problems

Nevermind again! There’s a really inconvenient issue with this method! :(

I’m currently using TurboWarp to add large bitmap costumes to my project which are bigger than the fixed size (480 by 360) that Scratch allows. My steps for doing so are here https://scratch.mit.edu/projects/1018320173/ This method works great for basic images that are less than 20 kb like the example in the linked project. However, for images between 50 and 100 kb it still works yet it takes a painfully long time. Furthermore, when I try to upload images that are just a mere 300 kb, I wasn’t able to do so even after waiting for 10 minutes; much longer than I expected. It seems like file size is the major slowdown not image pixel resolution. If you have addon knowledge, please try it for yourself by following the linked project’s instructions and try improve the “HD Image Uploads” addon (it’s probably open source somewhere). Thank you so much if you do. I’m also going to ask the other addon creators but please try to fix it yourself if you have the time since they are quite inactive. @ErrorGamer2000, @GarboMuffin, @World_Languages, @SheepTester
davidtheplatform
Scratcher
500+ posts

Vector & Bitmap Image Formats - Quirks/Problems

The steps worked fine for me
Other ideas:
Use illustrator to convert the map image to a vector
Just use multiple costumes. I know you said you don't want to do this but it sounds like it's the only one that'll work
TheMobileGames
Scratcher
100+ posts

Vector & Bitmap Image Formats - Quirks/Problems

davidtheplatform wrote:

The steps worked fine for me
Other ideas:
Use illustrator to convert the map image to a vector
Just use multiple costumes. I know you said you don't want to do this but it sounds like it's the only one that'll work

Nevermind, I did a bunch more testing and I figured out that this problem only affects Safari but not Google Chrome. Furthermore, I can continue using Safari because, in this case, the stage size is really big so using the regular, default and not broken Scratch image uploader to add more costumes works just as well and has the same quality as uploading using the HD Image Uploads addon.

I updated the steps and it should work perfectly all the time now.
CST1229
Scratcher
1000+ posts

Vector & Bitmap Image Formats - Quirks/Problems

Vector images also take up way more memory, especially at different scales; it has to create an uncompressed bitmap copy of the image for each size, alongside the vector. Vector HD uploaded images also take up more storage space since it has to encode the PNG bitmap as base64, so it can embed it into the SVG vector image.
TheMobileGames
Scratcher
100+ posts

Vector & Bitmap Image Formats - Quirks/Problems

CST1229 wrote:

Vector images also take up way more memory, especially at different scales; it has to create an uncompressed bitmap copy of the image for each size, alongside the vector. Vector HD uploaded images also take up more storage space since it has to encode the PNG bitmap as base64, so it can embed it into the SVG vector image.

Okay, that’s helpful to know. Would Scratch lag if I have a 2000x1000 bitmap image as a costume constantly being stamped? So far, there seems to be no lag so I think I’m in the clear.
HowToMakeStuff
Scratcher
1 post

Vector & Bitmap Image Formats - Quirks/Problems

There's a Problem In Bitmap Where you duplicate the costume in Bitmap and try to move it it just like go to the location which the other costume is at. Does Anybody have the solution?

Powered by DjangoBB