What are these "operating systems" and how do I make one?
#1
Posted 06 May 2018 - 05:28 AM
#2
Posted 08 May 2018 - 02:36 AM
Their point is to make computers' basic functionality far better and better for use, like a file system where all files that are user created can be found etc.
How to make one is up to you, what functionality do you want your computer to have?
Some things I find useful are:
- Basic login screen, with users and passwords (also adds a challenge how to store them and keep them save, assuming you're doing mp)
- User interface (like files displayed etc.)
- Basic peripheral attachment and detachment
How to start such project.
First of all, what is your knowledge of lua?
Assuming you know the basics you should start by editing the startup file
You can do that as follows
type this in the computer
edit startup
Then as a test you can type for example
print("test")then save it and it should print test every time you boot your computer
then you can write there whatever you want and it will run when you start your computer
my advice is to use your startup file as a selector, you select from there what you want to run
here a little example of a selector
function main(int) if int == 1 then os.run("ex1") return true elseif int == 2 then os.run("ex2") return true else return false end end while true do input = read() input = tonumber(input) if main(input) == false then print("Program does not exist") end end
I hope this clarifies a lot for you and if you have any question feel free to ask them
#3
Posted 08 May 2018 - 06:43 AM
However, if you must, I recommend taking a look at the source of the more popular OSs.
#4
Posted 08 May 2018 - 01:58 PM
KingofGamesYami, on 08 May 2018 - 06:43 AM, said:
Operating Systems are the best thing ever
Honestly, you should greatly study the lua manuals (Different manuals for different versions), and then continue writing it. When you finish, you should re-write it a few times, greatly bug test it, and then post it.
EDIT: though *nowadays* I do agree it should be an actual OS, not just a GUI. I'm not very proud of mine and Sewbacca's original NyanOS (a GUI)
But you should definitely take a year or two to write an actual OS.
Edited by EveryOS, 08 May 2018 - 05:08 PM.
#5
Posted 08 May 2018 - 02:54 PM
KingofGamesYami, on 08 May 2018 - 06:43 AM, said:
I second KOGY's sentiment. Further, if you're new to programming, an 'operating system' is going to be a terrible first project for a variety of reasons. You won't have a finished product for quite awhile (you'll be working for weeks or months without being able to release anything) and you'll be dealing with advanced concepts that, as a new programmer, you will probably struggle with quite a bit just to grasp. On top of that, unless your 'OS' has something special that all the other 'operating systems' don't have, it isn't likely to gain much traction as the forums already have a wide selection of shells, GUIs, and OS's.
However, if you really want to make an 'OS' in CC (and not just a glorified GUI) then you'll definitely want to be familiar with Bomb Bloke's Guide to Coroutines.
#6
Posted 08 May 2018 - 03:13 PM
Dog, on 08 May 2018 - 02:54 PM, said:
Well, I guess I can agree there, I myself am writing an OS too and even with my experience it is quite a nightmare to work with. It's way too time-consuming.
#7
Posted 08 May 2018 - 05:03 PM
#8
Posted 08 May 2018 - 05:18 PM
KingofGamesYami, on 08 May 2018 - 05:03 PM, said:
An OS isn't a good starting project if you're trying to make a GOOD project, however, most people seem to tell people altogether, do not make operating systems, we have too many, etc, etc.
I think if something is fun for you to make, make it if you want, just don't expect praise or good reactions from the community.
#9
Posted 08 May 2018 - 05:45 PM
I have programmed in Lua for several years, and as others stated above, it may not be a very good first project. I find it fun, if I didn't then why would I be doing it?
Hope this helps!
#10
Posted 08 May 2018 - 10:44 PM
#11
Posted 09 May 2018 - 03:32 AM
MarcoPolo0306, on 08 May 2018 - 05:45 PM, said:
I have programmed in Lua for several years, and as others stated above, it may not be a very good first project. I find it fun, if I didn't then why would I be doing it?
Hope this helps!
#12
Posted 09 May 2018 - 12:14 PM
CLNinja, on 09 May 2018 - 03:32 AM, said:
MarcoPolo0306, on 08 May 2018 - 05:45 PM, said:
I have programmed in Lua for several years, and as others stated above, it may not be a very good first project. I find it fun, if I didn't then why would I be doing it?
Hope this helps!
EveryOS, on 08 May 2018 - 10:44 PM, said:
#13
Posted 10 May 2018 - 12:27 AM
First project I would recommend doing is a simple doorlock program - everyone starts there, and it's super easy to build off. Look into rednet client/server for authentication, look into making a nicer GUI (with colours!), look into using mouse events to make the GUI more interactive, look into making coroutines or windows for multiple settings and a user-friendly GUI.
You only need half of the above knowledge to make a decent-looking "OS".
#15
Posted 12 May 2018 - 11:20 AM
EveryOS, on 08 May 2018 - 10:44 PM, said:
That's a terrible generalization. Neither will you ever achieve true OS-esque programs. It'll always be a glorified shell with a bunch of utility programs; You don't have to do any of the low-level stuff an actual OS would be doing. CC isn't designed for this "OS" market anyway IMO.
#16
Posted 12 May 2018 - 01:35 PM
H4X0RZ, on 12 May 2018 - 11:20 AM, said:
EveryOS, on 08 May 2018 - 10:44 PM, said:
That's a terrible generalization. Neither will you ever achieve true OS-esque programs. It'll always be a glorified shell with a bunch of utility programs; You don't have to do any of the low-level stuff an actual OS would be doing. CC isn't designed for this "OS" market anyway IMO.
Okay, let's be fair. You can write the userland of an OS (of a monolithic kernel OS), as CC doesn't expose the lower level details like memory management (paging, etc), port io, MMIO, PCIE, ACPI, etc. In fact, as pointed out by SquidDev it doesn't *have* them in the first place. What you're left with is essentially just the desktop environment (or if you don't have a desktop, then just the environment) of an OS.
Edited by Restioson, 12 May 2018 - 01:43 PM.
#18
Posted 12 May 2018 - 04:02 PM
H4X0RZ, on 12 May 2018 - 11:20 AM, said:
#19
Posted 12 May 2018 - 07:07 PM
Bomb Bloke, on 12 May 2018 - 01:39 PM, said:
CLNinja, on 12 May 2018 - 04:02 PM, said:
A shell isn't necessarily the *only* thing an OS's userland can have. It could have a windowing system or a GUI toolkit for instance. CC "OS"es do tend to just include new shells though.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users