This works fine. When would it crash?
Posts made by info-creaticode
-
RE: Clear prints buttons don't work again
Can you please share the project link? We will look into why it crashes.
-
RE: Clear prints buttons don't work again
Please use the draw and clear blocks in the “Pen” category for now.
-
RE: How to add a code snippet?
You can right click on any sprite and select share. Please make sure the code in that sprite is serving one purpose so it is reusable by others.
-
Generate Vector Images Using AI
Image Formats: Vector vs Bitmap
In Scratch, a costume image can be a “bitmap” or a “vector” format:- Bitmap images are stored as a matrix of small square boxes called “pixels”
- Vector images are stored as a few shapes, where each shape is represented by its outline and fill colors.
You can easily tell the difference when you zoom in an image:
There are several important benefits when we use a vector image:
First, vector images will always look the same when you scale them up, but bitmap images look worse due to lower resolution when you switch to full screen mode.
Second, a vector image’s file size is usually much smaller than a bitmap for the same content. For example, imagine we need to draw a big square. In bitmap format, we need to specify every pixel’s color, but in vector format we only need to specify the edge length and one color. Therefore, if your project would run faster and smoother when you use vector images
Third, vector images are much easier to modify. Since it is composed of individual shapes, you can move/resize/recolor each shape without affecting other parts of the image.
Note that the vector format is not always better. If the image has a lot of details, then the bitmap format should used. For example, if almost every pixel in the image has different colors, then there is no easy way to describe it using simple shapes in the vector format, and we should just store each pixel’s information using the bitmap format.In summary, choose the vector format if the image is made of a few simple shapes in uniform or gradient colors.
How to Generate a Vector Image Using AI
On MIT Scratch, there are only a limited number of vector images from the library. On CreatiCode, you can use AI to generate new vector images based on your project. The basic idea is to generate a bitmap image using AI, then convert it to a vector format using another AI tool.
Below are the steps:
Step 1 - Generate a bitmap image
As shown, you can start by selecting the “AI” tool for adding a sprite.In the input box, describe the object, specify it is a vector image, and then click “generate”. For example:
Important notes:
-
This AI tool can only generate images in the bitmap format, even if our prompt says “vector image”. It will try to generate an image that looks like a typical vector image (a few shapes of simple colors)
-
The prompt must contain the keyword “vector” to ensure the AI generates an image in this style. You can add additional instructions to further emphasize this, such as “with simple shapes”, “flat vector illustration”, “for costumes in MIT Scratch”, etc.
-
You might need to refine the description or regenerate the image.
Once you have the image you like, click on it to add it as a new costume.
Step 2 - Clean up the costume image (optional)
The costume will be in bitmap format. Before converting it to a vector image, you might need to clean it up.
For example, the image may contain a shadow. You can use the erazer tool to remove it manually, or use the new magic wand tool to select and delete it.
For another example, sometimes the AI generated image has some transparent parts. You can use the “fill” tool to fill some colors in there.
Step 3 - Convert the bitmap costume to a vector image
You can click the “Vectorize” button to convert any bitmap costume to a new vector costume:
A new vector format costume will be added, and the original bitmap costume is not changed. This is a true vector image, as you can select individual parts and change them:
Note that the original MIT Scratch provides a button to convert a bitmap image to vector, but it is not really a true vector image. It only represents the entire image as one big shape, and you still can’t edit individual parts.
Create Vector Images from Drawings
Since you can convert any bitmap costume to a vector costume, you can also draw a costume of your own, then convert it.
For example, suppose we use a few simple shapes to create a small house, and then use the “variations” tool to convert it to a cartoon:
Next, we can convert this cartoon house to a vector image. Note that it needs to be in the “bitmap” mode first, since the “vectorize” button is only available in the bitmap mode:
Search for Vector Images
The vector images generated by any user is shared with the community. You can open the AI image tool for sprites (not backdrops), and select the “Vector” type to search for them:
-
RE: Weird bug in Creaticode
This seems to be caused by the new buttons we added at the bottom of the costume editor, which takes too much space. We will fix this ASAP.
-
RE: isn't there a way to upload scratch games to here by only having a link?
This button is also available in the My Stuff page now
Also, it will automatically quote the original project for credits.
-
RE: The ia moderation is broken ?
Please reload the playground. Now the moderation is more accurate.
-
RE: The ia moderation is broken ?
Thank you for the examples. We will check what’s happening.
-
RE: Important - code being run as if there multiple copies of the sprites
OK. All clones come with a copy of the scripts. It is not clear what you are referring to. Can you make a simple example to illustrate like what I did? Thank you
-
RE: Important - code being run as if there multiple copies of the sprites
Not sure if we are talking about the same thing. This is an example of clones responding to messages even though there is no code for “when I start as a clone”:
It is shared here:
play.creaticode.com/projects/68c44068f8e2996ebfb5e1d0 -
RE: Important - code being run as if there multiple copies of the sprites
That’s not entirely true. When you broadcast a message, all clones would respond to that message.
-
RE: Important - code being run as if there multiple copies of the sprites
Thanks for the link. This is a fairly large project, and it is hard to say if the issue is in the system or in your code.
As you should already know, when you make a clone, its script is copied, so that’s expected. Are you seeing more than 2 clones when it should only generate 2 clones? For example, if you add a “print” block whenever a new clone is created, do you see many such print logs or just 2?
-
RE: Important - code being run as if there multiple copies of the sprites
Can you share the project URL?
And to clarify, is this the bug: When a new clone is created, more than 1 clone is created?
-
RE: Important - code being run as if there multiple copies of the sprites
Can you please try to confirm the issue? You can add some “print to console” blocks to confirm if there are indeed many copies of the sprites that are running.
If that’s confirmed, can you share the project link and a method to reproduce the issue? We will fix that ASAP.
-
RE: are comments supposed to look like this
We made some improvements in organizing the comments and alternating background colors.
-
RE: Japanese
Thank you for the suggestion. We will be adding a few new languages over the next few months. We will consider Japanese as one of the candidates.
-
RE: Serious Duplication bug -- Feedback
The broadcast block should be working fine. You can try this simple test:
play.creaticode.com/projects/68b650671f1f6c01bf5cf461?version=1
When the green flag is clicked, it will broadcast the message. And when it is received, the variable will increase by 1. If there is an issue like what you described, you should see the variable increase by more than 1 each time, right?
To find out the real issue, I suggest you simplify your program to bear minimum, and also try to debug it using the “print” block in the “control” group. -
RE: Costume editor request -- feedback
Have you tried to hold down the SHIFT key and select multiple items?
-
RE: Help w/ code
Have you tried to use our AI assistant?
https://www.forum.creaticode.com/topic/1093/creaticode-xo-ai-assistant-explain-to-me
-
RE: AI image generation will not work
The image generation tool is working fine, but it has a strict safetey check, so it might be your requests are failing the test.
-
RE: How would i split by emoji?
Maybe you can split each item in the list by SPACE, then the first part will be the emoji? And the rest of the item will be the name?
-
RE: A new technology we could possibly take advantage of
We gave it some more testing and it does not always produce appropriate responses for school use. Sorry.
-
RE: POST request block
Thanks for the reminder. Yes, we do have this on our queue, but it is still lower priority compared to other tasks we are working on.
Please understand we have a small team, and we rank tasks based on the potential number of users who would likely use these features, and this POST request block is too advanced for most of our users.
-
RE: A new technology we could possibly take advantage of
Thanks for the suggestion. There are 2 issues to consider:
- It relies on GPU in the device and a large memory, so it is not clear how many school devices can support it.
- More importantly, it does not have any moderation, so the model may output inappropriate content.
-
RE: POST request block
So what would this block look like? What parameters should it take? Where would the results be stored?
-
RE: POST request block
There is already a block for “fetch web page as markdown” in the cloud extension. Can you give some specific examples for how to use this new POST block?
-
RE: users that need to be banned
Got it. We will implement a better way to ban this user.
-
RE: Bug: I don't have to pay for diagrams anymore
Yes, it is offered for free now.