Discuss Scratch

explorerford
Scratcher
60 posts

How to make an OS

If you've seen any of my OS simulations and/or native operating systems (OSs), you (hopefully) get the impression that OSs aren't that hard to make.
Quick Overview
Now, when it comes to OS projects made on Scratch, these aren't real operating systems. Instead, they are simulations being run in whatever OS you are using. Think of it like one of those driving simulation games at an arcade: it makes you feel like you have a different OS, but you are just running that inside your computer's own OS.
Deciding What Kind of OS to Make
Before you make an OS, you need to decide on one major thing: what kind of OS you are planning on coding. You can make either a native Scratch OS (this OS will not be downloadable on a computer as a true OS, and will only be available on Scratch), or a simulation of a standard OS (think Windows). For these, you are attempting to simulate an actual OS that could be downloaded in real life on a computer properly, as well as be usable on Scratch as a simulation.
How to Make an OS
You can make bitmap UI on Scratch, but I usually import my icons and convert them to vector. To remove the background, set the style to bitmap, then fill in that transparent area, and afterwards, convert back to vector. Once you've decided on your UI, it's time to code. Most OSs on Scratch don't have a web browser, but I personally like to include one. But first, the basics: we need the icon to hide when it's clicked and tell the backdrop to change.
When this sprite clicked
broadcast [ openbrowser]
hide

when green flag clicked
show

This code is fairly basic, and after adding that you can have sprites that are the UI for the application you just opened receive the broadcast. For example:
when I receive [ openbrowser]
show

And then make sure it hides when the green flag is first clicked.

Now you need to figure out how to close the app.
Using this simple code can work. First, draw out an X or type it. You can also download it or import the UI.
Next, you simply have to make this code. Push the X into the corner.
When this sprite clicked
broadcast [ homepage has redirected again]
(HOMEPAGE HAS REDIRECTED AGAIN, IS MY SIGNATURE BROADCAST NAME)
Now all you have to do is code the rest, add the features, and make sure the apps show again when the recieve the X's broadcast
CONCUSION
And just like that, you can make an amazing operating system on Scratch. Good Luck!


Powered by DjangoBB