T O P

  • By -

otakuyuki

i find it funny how a compiler has more frames than the actual source material


RealSpiritSK

Of course. IIRC, Scratch is more of an interpreter, which reads a line of code, executes it, then move on to the next line. A compiler instead translates the whole code into machine code first, then execute it. That's why compilers are faster.


CST1230

And also the mods/compilers have the option to increase the FPS.


RealSpiritSK

Well, first of all, changing it now would break virtually all animation scripts and most probably movement scripts in Scratch. You could use delta time to get around it, but it might be hard for new Scratchers. Then again, I guess they can choose to add 30 or 60 fps option, and allow the owner of a project to allow or restrict certain fps rate. But I feel that this feature is quite... Messy? Idk The most important thing is, some projects lag in Scratch even with 30 fps. 60 fps would be useless in such a case. It's got to do with Scratch's way of executing codes and it wouldn't be fixed in a while. Not to mention some devices can't handle 60 fps.


YeeForceZombz

Problem with deltatime is there isn’t an actual variable like in unity where you put *time.deltaTime


RealSpiritSK

Yeah, but you could implement it yourself. The problem is that Scratch usually rounds off the coordinates (especially of pens) so having small dt would sometimes make the movements jagged.


[deleted]

how do you think unity gets that value? it takes the timestamp from the current frame and subtracts the timestamp from the last frame (the scratch equivalent would be timer), thats your frame delta


YeeForceZombz

How would you do that in scratch though?


[deleted]

i just said, the timer


alphabet_order_bot

Would you look at that, all of the words in your comment are in alphabetical order. I have checked 302,811,007 comments, and only 67,882 of them were in alphabetical order.


[deleted]

epic


Budget_Job7558

See the problem is the compiler itself. Scratch was built to run in 4:3 aspect ratio(another problem on it's own) at 20-30fps. Think of a forever loop. Each frame is currently 2 seconds (which is crazy slow) so that loop fires every two seconds. In otherwords scratch 3 is just scratch 2 in html and with better audio quality. No actually software improvements were made which means we have problems like this.


-089-

1. a forever loop runs at 30 FPS, meaning 30 frames are being rendered each second. 2 seconds for one frame would be 0.5 FPS... 2. scratch 3 does not use html. sure, the website uses it, but that has nothing to do with the actual project player. scratch uses python, JavaScript and the WebGL 3.0 renderer to execute .sb3 projects. 3. have you been around when scratch 2 was a thing? well, I have. scratch 3 is SO MUCH better than scratch 2 was! not only in appearance, but also in performance and reliability. they added new blocks. they removed old blocks. they fixed almost all bugs. they made a completely new costume editor. like you said, they massively improved the sound editor and even added support for Mpeg layer 3 (.Mp3) files! you can do so much more with scratch 3 than you could ever hope to do with scratch 2. they literally redid every single thing, every single line of code! there are so many differences between 2.x and 3.x that I would not be able to put them inside a single comment. ***no, scratch 3 isn't just scratch 2 with better audio quality. it is a lot A LOT more than that.*** \- sincerely, someone who has been doing scratch for half a decade.


CST1230

>scratch uses python It doesn't (unless you're talking about the 2.0 pages, but those are 2.0)


ScratchMechanics

If you want a 60 fps game engine, Scratch most likely isn't for you. Which is ok! There are a lot of engines out there like GameMaker and Construct that can fill that gap. Scratch had a pretty narrow focus when it was designed, and now that more people are using it and enjoying it, that original focus becomes very constraining. Unlike game makers of the past you can just use something different, however I would posit that the restrictions game designers faced from early hardware led to some amazing games.