r/ComputerCraft • u/KarmyDev • Feb 07 '23
Second day of making a Windows 95 like operating system for Computer Craft!
2
u/9551-eletronics Computercraft graphics research Feb 08 '23
As i cannot judge code quality, i can still reccomend a few things. First, making it use different to different colors. The current color scheme feels bit painful Second, you could use special block characters to archive 6x higher pixel density for things like icons so it could look much more detailed
1
u/KarmyDev Feb 08 '23
I have tried using these blocks but they showed up as [?] question mark symbols in CraftOS Emulator, I dont know about in-game
1
u/9551-eletronics Computercraft graphics research Feb 08 '23
CC uses custom ones. Check out the charset https://media.discordapp.net/attachments/477911902152949771/933498000385400862/1642633650325141456271.png
You can reference them like "\n" so "\154" for example
1
u/KarmyDev Feb 08 '23
I see, Thanks! This will help me a lot, but i'll have to write custom paint now
1
u/9551-eletronics Computercraft graphics research Feb 08 '23
You could usr dome sort of a program or lib to just read the images directly from smth like gimp
1
u/KarmyDev Feb 08 '23
Either way I need to write wrapper for default paintutils.drawImage() and paintutils.loadImage() and also my custom colored characters to handle drawing nfp image files onto the screen and overlaying colored characters on top of the icons (since my current instance of LinuXP os just loads .nfp files from /LINUXP/media/ and draws them in calculated center positions)
1
u/9551-eletronics Computercraft graphics research Feb 08 '23
I tend to avoid paintutils and nfp completely cause it's crap
2
u/Mayedl10 Feb 08 '23
What is the first line of code to write when making an OS? Here it would probably be some UI stuff but I wonder what it's like for other OSs
3
u/9551-eletronics Computercraft graphics research Feb 08 '23
Definitely not UI lmao, xou first wanna get a working prototype before things like UI design. If i were to make an OS i would dtart writing the codebase to allow making it easily expansible
3
u/KarmyDev Feb 08 '23
....first thing I wrote was UI (screen.lua), yeah.. have i mentioned that i just learned lua two days ago?
2
u/9551-eletronics Computercraft graphics research Feb 08 '23
Wowie thats impressive, but also kinda dumb to start with an OS, btw if you want your code reviewed you can join the CC discord to make sure you don't learn bad practices
1
u/NyoriE01 Feb 09 '23
i'm sorry but i don't think making a OS is a dumb decision. It is a goal, and a goal is always helpful to keep motivation to learn programming. The OS you are probably thinking about can be very complicated. These guys, who'd like to create a simple OS in CC, are mostly talking about a UI on top of the default cc shell - which can be easy to make.
2
u/9551-eletronics Computercraft graphics research Feb 09 '23
not if you are 2 days into learning Lua.
2
u/KarmyDev Feb 09 '23
Hey, I said I'm 2 days into learning Lua, not learning programming x3
1
u/9551-eletronics Computercraft graphics research Feb 09 '23
Well still. :P
1
u/KarmyDev Feb 09 '23
One wise man once said that by starting a big project and doing it you may learn a lot along the the way about what to do, and whatnot- Eeeeeven if you might never finish it, or drop it off you still gain experience and knowledge (。•̀ᴗ-)
[And finishing projects teaches you how to maintain and not overengineer stuff >p<]
3
1
1
6
u/churros_cosmicos Feb 08 '23
Epic stuff