Discuss Scratch

JaxAlt3
Scratcher
22 posts

3D on scratch, And how it's professionally accomplished

carvabra000 wrote:

Raman15 wrote:

_-ValX-_ wrote:

Raman15 wrote:

Hmm I wonder which programming language it uses
The project was developed on Scratch and the scripts used inside of the engine are Scratch and text-based programming that looks pretty much like usual scratch
Fun fact: I imagined a scratch-like engine named 5.1Script, I'm working on the engine, I made even a part 1 tutorial on YouTube! (See channel on my “What I'm working on” page). My scratch version has only possible text engine and all scratch blocks but they are text based, my imagination version is an app called 5.1 PowerZ1 (PWZ1 for short). It lets you use 2D/3D assets or you can make your own or generate in your game, you also have cool extensions!
Here are the extensions i imagined:
• Music extension (basically the scratch extension but with more instruments)
• Pen extension (same thing as scratch version but supports hex too)
• Text engine extension (the scratch Lab text extension but with more fonts and custom fonts)
• MIDI extension (Allowing you to connect your piano or something to your device, it also works with converters, you can play midi songs and games in it, just use .mid if your piano supports .mid or .midi if your piano supports .midi. You can also send desired sound output to your piano with it)
• 3D engine extension (letting you draw real 3D cubes)
• MX Servers extensions (now scratch please don't ban me because the link in gonna enter isn't real, it's just something part of my imagined programming language. So MX Servers is an extension to access stuff outside 5.1Script where you can download it in my imagined link called mx.5.1.com/mx_extensions/elements/b1b2b3b4txtbx1img1fldwnld1/file/mxservers.mx and upload it with the “⬇️” download icon)

That's all of the extensions!
You can also make your own extension by pressing the + icon to make a new extension with 5.1Script and tons of other programming languages.
Oh and I forgot to mention lol, you can also use other programming languages in 5.1Power Z1.

My imagined version of my scratch programming language may not be real but it's at least real in my heart

imagine if we got a game engine inside a game engine before GTA 6

honestly at this point if you release it then im gonna try to learn it and make GTA 6 in it
We already did, called scratch in scratch by griffpatch
Beating_music
New Scratcher
2 posts

3D on scratch, And how it's professionally accomplished

Hi i am Beating_music i get it all i under stand it was hard to under stand at first but then i got it when i was coding a project the varibels did not work for some reson if some one has some thing that they can tell me to let me know it has happend yeserday i am not sure if it was my computer or not but i dont know
(☁ score)
Feelinfresh26
New Scratcher
9 posts

3D on scratch, And how it's professionally accomplished

If anyone wants to use a lag reducer, use this script:
when green flag clicked
forever
wait (0) secs
end

This code forces scratch’s engine to keep refreshing and makes it use a higher FPS.
hashdashpotato
Scratcher
500+ posts

3D on scratch, And how it's professionally accomplished

Feelinfresh26 wrote:

If anyone wants to use a lag reducer, use this script:
when green flag clicked
forever
wait (0) secs
end

This code forces scratch’s engine to keep refreshing and makes it use a higher FPS.
I can see how this may be useful for some of the more heavy 3D projects.
Feelinfresh26
New Scratcher
9 posts

3D on scratch, And how it's professionally accomplished

Beating_music wrote:

Hi i am Beating_music i get it all i under stand it was hard to under stand at first but then i got it when i was coding a project the varibels did not work for some reson if some one has some thing that they can tell me to let me know it has happend yeserday i am not sure if it was my computer or not but i dont know
(☁ score)
It’s because you are a new scratcher. Cloud variables do not work for new scratchers.
GL00B
Scratcher
87 posts

3D on scratch, And how it's professionally accomplished

Feelinfresh26 wrote:

If anyone wants to use a lag reducer, use this script:
when green flag clicked
forever
wait (0) secs
end

This code forces scratch’s engine to keep refreshing and makes it use a higher FPS.
this is false, as it just adds delay between the ticks. it may do some fake “stabilization”, but nowhere near the claim of higher fps.
hashdashpotato
Scratcher
500+ posts

3D on scratch, And how it's professionally accomplished

GL00B wrote:

Feelinfresh26 wrote:

If anyone wants to use a lag reducer, use this script:
when green flag clicked
forever
wait (0) secs
end

This code forces scratch’s engine to keep refreshing and makes it use a higher FPS.
this is false, as it just adds delay between the ticks. it may do some fake “stabilization”, but nowhere near the claim of higher fps.
Too good to be true. The usual.
Raman15
Scratcher
76 posts

3D on scratch, And how it's professionally accomplished

hashdashpotato wrote:

GL00B wrote:

Feelinfresh26 wrote:

If anyone wants to use a lag reducer, use this script:
when green flag clicked
forever
wait (0) secs
end

This code forces scratch’s engine to keep refreshing and makes it use a higher FPS.
this is false, as it just adds delay between the ticks. it may do some fake “stabilization”, but nowhere near the claim of higher fps.
Too good to be true. The usual.
Yea
Feelinfresh26
New Scratcher
9 posts

3D on scratch, And how it's professionally accomplished

I’ve used it before, it works. It’s literally in one of my projects. It’s in my laser leap project.
Feelinfresh26
New Scratcher
9 posts

3D on scratch, And how it's professionally accomplished

GL00B wrote:

Feelinfresh26 wrote:

If anyone wants to use a lag reducer, use this script:
when green flag clicked
forever
wait (0) secs
end

This code forces scratch’s engine to keep refreshing and makes it use a higher FPS.
this is false, as it just adds delay between the ticks. it may do some fake “stabilization”, but nowhere near the claim of higher fps.
It works for me.
ultracat31
Scratcher
16 posts

3D on scratch, And how it's professionally accomplished

I think now is a good time to bring up the placebo effect?
_-ValX-_
Scratcher
500+ posts

3D on scratch, And how it's professionally accomplished

ultracat31 wrote:

I think now is a good time to bring up the placebo effect?
Well fps counters are a thing
Raman15
Scratcher
76 posts

3D on scratch, And how it's professionally accomplished

_-ValX-_ wrote:

ultracat31 wrote:

I think now is a good time to bring up the placebo effect?
Well fps counters are a thing
yeah and you forever divide the fps variable by 1 divided by the timer
abraham93420
Scratcher
64 posts

3D on scratch, And how it's professionally accomplished

Feelinfresh26 wrote:

If anyone wants to use a lag reducer, use this script:
when green flag clicked
forever
wait (0) secs
end

This code forces scratch’s engine to keep refreshing and makes it use a higher FPS.
A lag reducer! Well could you use 2 lag reducers to change the lag more
_-ValX-_
Scratcher
500+ posts

3D on scratch, And how it's professionally accomplished

Raman15 wrote:

yeah and you forever divide the fps variable by 1 divided by the timer
Not exactly : you have to reset the timer each frame, which can be quite annoying if you need it for other scripts.
So here are some other ways to do it :
First way :
define calculate fps (timestamp) // no screen refresh
wait (0) secs // waits for a frame (so the "days since 2000 - timestamp" equals the duration of a frame)
set [fps v] to ((1) / (((days since 2000) - (timestamp)) * (86400))) // the * 86400 is used to convert days in seconds

when green flag clicked
forever
calculate fps (days since 2000)
end

Note that the timestamp input did not change between the frame : when you use a custom blocs, if you put special blocks like this in an input, the input will stay the exact same during the execution of the block. This is used to calculate the difference of time without having to save the timestamp in any variable.

Second way :
when green flag clicked
forever
set [last timer v] to (timer) // by saving the timer value, we can calculate by how much the timer increased in a frame and then calculate the fps
wait (0) secs // waits for a frame (same as before)
set [fps v] to ((1) / ((timer) - (last timer))) // we calculate the fps using the same formula as before (1/delta) but we use our "last timer" variable here
end

And obviously the third way :
when green flag clicked
forever
reset timer
wait (0) secs
set [fps v] to ((1) / (timer)) // 1/delta formula
end

I prefer the first way more, because it saves you a variable (which makes the project easier to work with, it starts to get really annoying when there's variables everywhere) (and I also think it looks messy, just my opinion)
You choose the one you want, hope this helps

such a long post just for fps scripts lol
Feelinfresh26
New Scratcher
9 posts

3D on scratch, And how it's professionally accomplished

abraham93420 wrote:

Feelinfresh26 wrote:

If anyone wants to use a lag reducer, use this script:
when green flag clicked
forever
wait (0) secs
end

This code forces scratch’s engine to keep refreshing and makes it use a higher FPS.
A lag reducer! Well could you use 2 lag reducers to change the lag more
Well, that would actually not work.
Feelinfresh26
New Scratcher
9 posts

3D on scratch, And how it's professionally accomplished

GL00B wrote:

Feelinfresh26 wrote:

If anyone wants to use a lag reducer, use this script:
when green flag clicked
forever
wait (0) secs
end

This code forces scratch’s engine to keep refreshing and makes it use a higher FPS.
this is false, as it just adds delay between the ticks. it may do some fake “stabilization”, but nowhere near the claim of higher fps.
I tried it with my lag reducer and an FPS counter, and it at least stabilized the FPS.
GL00B
Scratcher
87 posts

3D on scratch, And how it's professionally accomplished

Feelinfresh26 wrote:

I’ve used it before, it works. It’s literally in one of my projects. It’s in my laser leap project.
Look, no offense, but with that pfp and a “new scratcher” tag under your name, I don't think your use case is a 3D rendering engine with extensive math and rendering going on the background. as I said, you might have made a frame “stabilizer ”, which is due to adding a millisecond of delay between each frame, making the frames less and adding the illusion of more stability. this however, is horrible for anything that is more complicated than an apple catching game. the scratch community have been optimizing and building new techniques for years, and a simple ms delay between frames isn't the next breakthrough.
GL00B
Scratcher
87 posts

3D on scratch, And how it's professionally accomplished

_-ValX-_ wrote:

Raman15 wrote:

yeah and you forever divide the fps variable by 1 divided by the timer
Not exactly : you have to reset the timer each frame, which can be quite annoying if you need it for other scripts.
So here are some other ways to do it :
First way :
define calculate fps (timestamp) // no screen refresh
wait (0) secs // waits for a frame (so the "days since 2000 - timestamp" equals the duration of a frame)
set [fps v] to ((1) / (((days since 2000) - (timestamp)) * (86400))) // the * 86400 is used to convert days in seconds

when green flag clicked
forever
calculate fps (days since 2000)
end

Note that the timestamp input did not change between the frame : when you use a custom blocs, if you put special blocks like this in an input, the input will stay the exact same during the execution of the block. This is used to calculate the difference of time without having to save the timestamp in any variable.

Second way :
when green flag clicked
forever
set [last timer v] to (timer) // by saving the timer value, we can calculate by how much the timer increased in a frame and then calculate the fps
wait (0) secs // waits for a frame (same as before)
set [fps v] to ((1) / ((timer) - (last timer))) // we calculate the fps using the same formula as before (1/delta) but we use our "last timer" variable here
end

And obviously the third way :
when green flag clicked
forever
reset timer
wait (0) secs
set [fps v] to ((1) / (timer)) // 1/delta formula
end

I prefer the first way more, because it saves you a variable (which makes the project easier to work with, it starts to get really annoying when there's variables everywhere) (and I also think it looks messy, just my opinion)
You choose the one you want, hope this helps

such a long post just for fps scripts lol
quite right! however, the days since 2000s block doesn't work with pausing, so it can be a big problem if the project froze or a turbowarp user paused. however, it can be perfect for other use cases that synchronize the timer between them!

Last edited by GL00B (Nov. 26, 2025 15:10:23)

auron3294
Scratcher
12 posts

3D on scratch, And how it's professionally accomplished

@Peabraintest casually sitting there with raytracing and i made it faster and more hd

Last edited by auron3294 (Nov. 26, 2025 16:11:04)

Powered by DjangoBB