Acknowledged. This will be fixed soon. Thanks
Best posts made by info-creaticode
-
RE: Some avatars aren't shown to select until searched for
-
Wishlist for New Models
If you are looking for a particular 3D model that is not in our library, please reply to this topic. If you can include an example picture of it, it would be more clear what you are looking for. We will try to fulfill these requests as best as we can. Please make sure you do not submit duplicate requests by searching for it first.
Thanks
CreatiCode Support -
RE: Raycasting.
Basically it is drawing some arrows from the object to all directions, and when the arrow touches some other object, it triggers some actions.
More info here:
https://www.forum.creaticode.com/topic/41/checking-for-object-collisions-with-ray-cast
-
Number of Seconds since 2000
Introduction
In MIT Scratch, you can already manage dates using the “days since 2000” block. However, if you need a more granular control of date and time, you can use this new block:
This block will return the number of seconds that have passed between the given timestamp and the beginning of 2000.01.01.
Input Format
The input is a timestamp, which contains the date, a “T”, and then the time. The date is represented as year:month:day. The time is represented as hour:minute:second. Each field has to be 2 digits, except that the year has to be 4 digits.
The timestamp is assumed to be the local time of the computer that’s running this program. If you want to use the UTC time, which is the same across the world, then append a “Z” at the end of the timestamp, such as “2024.01.01T10:00:00Z”.
If the input is left empty, then the current time is used:
Calculating Time Difference
With this new block, you can easily calculate how many seconds are between 2 timestamps. You just need to run this new block for both timestamps, then calculate the difference between them:
Converting to Date
You can also convert the number of seconds back to a Date object. For example, the program below first gets the number of seconds for a specific timestamp, then create a date object using that result, and we get the same timestamp as our input:
-
Shape-Based Particle Emitters
Introduction
You learned about Single-Point Particle Emitter, which generates particles from a single point in the 3D space.
In this article, we will discuss “shape-based” emitters, which generate particles from within a 3D shape like a box. They allow us to produce very different visual effects.
Box Emitters
The box emitter is simply a transparent 3D box, and it can generate new particles from any random point inside this box. We can not see this box since it is transparent, but we can indirectly see its shape by where the particles are generated.
To use the box emitter, we need 2 steps:
- Select the “Box” shape when creating the emitter
- Configure the size of the box by its minimum and maximum X/Y/Z positions
Here is a simple example:
This program creates a box emitter that is 400 units in each dimension. For example, in the X dimension, the minimum is -200 and the maximum is 200, so the x position of new particles can be any random value between -200 and 200. When you run this program, you can see the particles are all confined within this box-shaped region:
Sphere Emitters
The shape of the emitter can also be a sphere. When we configure the sphere shape, we can set its size using the “radius” parameter.
There is also a “range” parameter (between 0 and 1), which controls the range of possible values along the radius. You can think of “range” as “thickness”:
- When “range” is 0, the particles will only be generated on the surface of the sphere, and not inside it.
- When “range” is 1, the particles can be generated at any random point on the surface or inside the sphere.
- When “range” is between 0 and 1, the particles will not be generated near the center of the sphere, but can be generated on the surface or near the surface.
Here is an example program with a range of 0:
As shown, particles are only appearing on the surface of the sphere:
Hemisphere Emitters
Hemisphere emitters generate particles from a half-sphere shape. You can specify its radius and range the same way as the sphere emitters.
One thing special about hemisphere emitters is that we can rotate the half sphere to different directions. As shown below, when we rotate it around X-axis for 90 degrees, the new particles are all generated at the bottom half of the sphere:
Cylinder Emitters
The emitter can also take a cylinder shape. We can control the radius of the circle, and also the height of the cylinder.
The “range” parameter also works for cylinders. You can think of it as controling the “thickness” of the cylinder’s skin. For example, when radius 0.5, the thickness of the cylinder skin is half of the radius:
The cylinder shape also supports an additional parameter of “direction randomness”. This only matters when we set the particles to not face the camera all the time, and we will see the particles facing different random directions when we set “direction randomness” to 100:
Lastly, we can rotate the cylinder emitter as well. For example, we can make it “lie down”:
Cone Emitters
For the cone-shaped emitter, we can console these parameters:
- Radius: The radius of the bottom circle of the cone
- Angle: The opening angle of the cone. Note that the angle and the radius would imply the height of the cone, so we won’t need another “height” parameter.
- Radius Range: This range value applies along the radius direction. When it is 0, the particles will only be generated on the surface of the cone. When it is 1, the particles may come out from anywhere inside the cone or on its surface.
- Height Range: This range value applies along the height of the cone. When it is 0, the particles will only emerge from the bottom of the cone, and when it is 1, the entire height can generate particles.
We can rotate cone emitters as well.
-
RE: "Important Forum Announcement" - Question
@011830-0a42ef84 said in "Important Forum Announcement" - Question:
@info-creaticode am I able to be a moderator/mod helper?
Currently 2 helpers are good enough. If they are overwhelmed we might need to add more. Thanks for the offer.
-
RE: Multiplayer 3D games
We are working on fixing the cloud blocks. Should be within next few days. Sorry about that.
-
3D - A Spinning Earth (Difficulty: 1)
Key Topics Covered
Introduction
In this tutorial, you will learn to create a spinning Earth:
Step 1 - Initialize An Empty Scene
First, create a new project, and load an empty scene using the “initialize 3D scene” block.
By default, it will create an empty scene with nothing but a blue background:
Step 2 - Set the Background Starfield
Next, use the “set sky” block to create a better-looking backdrop:
You should get a starfield with the Sun on the right.
Step 3 - Add a Big Sphere
Next, add a sphere with a large diameter of 10000 to the scene. Don’t worry about its color yet.
The sphere would look brighter on the side that faces the Sun.
Step 4 - Add Earth Texture
Now we need to update the sphere’s texture with the Earth. Add the “update texture” block, click the “Please select” input box, then search for “Earth” in the library window.
Step 5 - Flip the Earth Texture
You might have noticed an issue with the texture: the continents are upside-down. We need to flip the texture vertically to correct this issue. This can be done by changing the vertical repeat count from 1 to -1.
Step 6 - Make the Earth Spin
To make the Earth object spin, we can use the “set speed” block. Note that the Earth needs to be spinning from “left” to "right, so the “Z-rotation” speed needs to be negative.
Now your Earth object should be spinning slowly.
Step 7 - Highlight Around the Earth
Lastly, to make the Earth object glow in blue lights, we can create a new highlight layer, then add the sphere to that layer.
Now your Earth object should carry a blue light around it.
Next Steps
You can try to use a similar method to build other projects. Here are some example ideas:
- A Different Planet: You can change Earth to other planets like Mars;
- A Spinning Trophy: You can try to make a trophy object spin and shine.
-
RE: Suggestions for both the forums and CreatiCode!
@mathew139616-10db496a
Thanks for the suggestions.
For unpublished projects, the authors do not want it to be seen, so we can not let anyone see it, even the original author.
We can look into adding the notifications.
For forum, most of the questions are fairly specific to CreatiCode so ChatGPT can’t answer them well. Don’t worry, we have enough staff to answer questions, and there are also a few active users who often help out.
-
RE: Does saving private data act as like a "secret" or "environment variable"?
It should not be used to store real secrets like passwords. The reason is that this block runs on the “client” side (the user’s browser), so when the data is sent over the Internet to the webserver, it is exposed in the network package.
However, for most games/projects you build for learning, it should be good enough.
The “private” mode is meant to store data specific for one user. Say 100 users are running your shared game. Suppose each of them can specify a secret passcode that can be used to save or load game progress. You can use this block and use the “private” mode, so the data is separated by user ID, and 2 users can’t see each other’s data.
Latest posts made by info-creaticode
-
RE: What is the email that CreatiCode uses for Google Sheets?
Great question. The email we use is “user-606@creaticode.iam.gserviceaccount.com”
-
RE: Shows the Creaticode screen when I place DJ in -- "goofy Tower Defense test room"
That’s strange. Are you trying at school? It might be blocked. Can you share a screenshot?
-
RE: Shows the Creaticode screen when I place DJ in -- "goofy Tower Defense test room"
There are many ways to do this. For example, you can use a table or list to store all the speed and start time of all sprites.
This might be a good time to ask XO for specific coding suggestions.
-
RE: Shows the Creaticode screen when I place DJ in -- "goofy Tower Defense test room"
In that case, you will need to write some code to check which target sprite is currently the first. One way to do it is to look at how far it has traveled. Since every target starts at the same point, the one that has traveled the most should be the leading one, right?
And assuming each target has a constant speed, you just need to multiply its speed with how long it has been moving to get its total travel distance. The one target with the longest travel distance must be the leading one.
-
RE: Shows the Creaticode screen when I place DJ in -- "goofy Tower Defense test room"
Can you define what’s the “first” target? Do you want it to lock at the most front-running target? Or the one with the earliest born time?
In general, you should not use the “point towards [sprite]” block in this case. Instead, you can try to compare all the targets based on your rule, and find out which target is the one you want to point at, then you can save its x/y positions into 2 variables.
Then, in the gun sprite, use the point towards x y in N seconds block.
-
RE: Hitbox Help
For a game like Tetris, you don’t really need very complex physics, right? The key is collision detection, which can be done using the original “touching” blocks. So it might be overkill to use the physics engine for it.
-
RE: Concept of how to make something with google sheets
Maybe we can give you a new block to create a new tab in a google sheet?
Or, can you create a new google sheet with 100 tabs manually, then recycle them when a new user comes? It depends on whether each user needs to keep the data permanently.
-
RE: Concept of how to make something with google sheets
One way is to make sure each user writes to a unique column, so 2 users will never write into the same column, and each user can read the columns of other users to get their latest messages.
-
RE: Am I allowed to use databases (or other data storage) for large amounts of data?
The database blocks have limits on the number of rows. For your use case, probably a better storage is Google Sheets. You can store much more data there.