Jump to content




Standalone CC OSes.

lua java

81 replies to this topic

#61 Alice

  • Members
  • 429 posts
  • LocationBehind you.

Posted 24 June 2015 - 12:16 AM

 Dr. Poof, on 24 June 2015 - 12:14 AM, said:

 Alice, on 23 June 2015 - 11:55 PM, said:

 oeed, on 23 June 2015 - 11:49 PM, said:

 Alice, on 23 June 2015 - 11:42 PM, said:

"allows to draw pixels" is kinda stretching a bit too far.

Given that ComputerCraft will be getting that feature, I don't see why not..

And what would we use to draw pixels on a screen?
If we're doing this in a terminal application, terminals don't support drawing of custom characters.
We would have to almost make an X server type thing for it.
Meh.
Not _too_ hard.
Oh really now? Then why don't you go ahead and draft something up.
I'll get to work on setting up a VM for testing and writing code. You have one week, if it's not too hard.

#62 FUNCTION MAN!

  • Members
  • 292 posts

Posted 24 June 2015 - 12:19 AM

 ardera, on 23 June 2015 - 09:38 PM, said:

In my opinion, we should just build an application that emulates ComputerCraft but implements some lower level stuff like TCP connections, allows to draw pixels, etc,
and modify raspbian/archlinux/ubuntu (whatever you want) to boot in this application. It's way to complicated to make a new linux distro.

It's just a matter of writing a couple Makefiles.

#63 Alice

  • Members
  • 429 posts
  • LocationBehind you.

Posted 24 June 2015 - 12:20 AM

 Dr. Poof, on 24 June 2015 - 12:19 AM, said:

 ardera, on 23 June 2015 - 09:38 PM, said:

In my opinion, we should just build an application that emulates ComputerCraft but implements some lower level stuff like TCP connections, allows to draw pixels, etc,
and modify raspbian/archlinux/ubuntu (whatever you want) to boot in this application. It's way to complicated to make a new linux distro.

It's just a matter of writing a couple Makefiles.
PKGBUILDs too.
Arch, m8.

#64 FUNCTION MAN!

  • Members
  • 292 posts

Posted 24 June 2015 - 12:21 AM

 Alice, on 24 June 2015 - 12:16 AM, said:

 Dr. Poof, on 24 June 2015 - 12:14 AM, said:

 Alice, on 23 June 2015 - 11:55 PM, said:

 oeed, on 23 June 2015 - 11:49 PM, said:

 Alice, on 23 June 2015 - 11:42 PM, said:

"allows to draw pixels" is kinda stretching a bit too far.

Given that ComputerCraft will be getting that feature, I don't see why not..

And what would we use to draw pixels on a screen?
If we're doing this in a terminal application, terminals don't support drawing of custom characters.
We would have to almost make an X server type thing for it.
Meh.
Not _too_ hard.
Oh really now? Then why don't you go ahead and draft something up.
I'll get to work on setting up a VM for testing and writing code. You have one week, if it's not too hard.

The code itself is not complicated. The problem, really, is allocating time for it. I'll have about a month of free time from July the 6th to the 31st (I think). So I'll start then.

 Alice, on 24 June 2015 - 12:20 AM, said:

 Dr. Poof, on 24 June 2015 - 12:19 AM, said:

 ardera, on 23 June 2015 - 09:38 PM, said:

In my opinion, we should just build an application that emulates ComputerCraft but implements some lower level stuff like TCP connections, allows to draw pixels, etc,
and modify raspbian/archlinux/ubuntu (whatever you want) to boot in this application. It's way to complicated to make a new linux distro.

It's just a matter of writing a couple Makefiles.
PKGBUILDs too.
Arch, m8.
m8 good luck getting pkgbuilds in LFS

I meant to quote this: "It's way to complicated to make a new linux distro."

Plus, m8, makefiles are way better.

EDIT: Give me a name for this project and I'll go ahead and make a GH repo

Edited by Dr. Poof, 24 June 2015 - 12:22 AM.


#65 Alice

  • Members
  • 429 posts
  • LocationBehind you.

Posted 24 June 2015 - 12:24 AM

 Dr. Poof, on 24 June 2015 - 12:21 AM, said:

 Alice, on 24 June 2015 - 12:16 AM, said:

 Dr. Poof, on 24 June 2015 - 12:14 AM, said:

 Alice, on 23 June 2015 - 11:55 PM, said:

 oeed, on 23 June 2015 - 11:49 PM, said:

 Alice, on 23 June 2015 - 11:42 PM, said:

"allows to draw pixels" is kinda stretching a bit too far.

Given that ComputerCraft will be getting that feature, I don't see why not..

And what would we use to draw pixels on a screen?
If we're doing this in a terminal application, terminals don't support drawing of custom characters.
We would have to almost make an X server type thing for it.
Meh.
Not _too_ hard.
Oh really now? Then why don't you go ahead and draft something up.
I'll get to work on setting up a VM for testing and writing code. You have one week, if it's not too hard.

The code itself is not complicated. The problem, really, is allocating time for it. I'll have about a month of free time from July the 6th to the 31st (I think). So I'll start then.

 Alice, on 24 June 2015 - 12:20 AM, said:

 Dr. Poof, on 24 June 2015 - 12:19 AM, said:

 ardera, on 23 June 2015 - 09:38 PM, said:

In my opinion, we should just build an application that emulates ComputerCraft but implements some lower level stuff like TCP connections, allows to draw pixels, etc,
and modify raspbian/archlinux/ubuntu (whatever you want) to boot in this application. It's way to complicated to make a new linux distro.

It's just a matter of writing a couple Makefiles.
PKGBUILDs too.
Arch, m8.
m8 good luck getting pkgbuilds in LFS

I meant to quote this: "It's way to complicated to make a new linux distro."

Plus, m8, makefiles are way better.

EDIT: Give me a name for this project and I'll go ahead and make a GH repo
I think not. I'd rather do it my own way. Honestly? Linux from Scratch? No.
I'm gonna set up a new GitHub repo once I got the VM set up, then I'll post my repo. You can do whatever you feel like.

This was to make "Standalone CC OSes." Not OSes programmed off of ComputerCraft code.

Edited by Alice, 24 June 2015 - 12:29 AM.


#66 FUNCTION MAN!

  • Members
  • 292 posts

Posted 24 June 2015 - 12:30 AM

 Alice, on 24 June 2015 - 12:24 AM, said:

 Dr. Poof, on 24 June 2015 - 12:21 AM, said:

 Alice, on 24 June 2015 - 12:16 AM, said:

 Dr. Poof, on 24 June 2015 - 12:14 AM, said:

 Alice, on 23 June 2015 - 11:55 PM, said:

 oeed, on 23 June 2015 - 11:49 PM, said:

 Alice, on 23 June 2015 - 11:42 PM, said:

"allows to draw pixels" is kinda stretching a bit too far.

Given that ComputerCraft will be getting that feature, I don't see why not..

And what would we use to draw pixels on a screen?
If we're doing this in a terminal application, terminals don't support drawing of custom characters.
We would have to almost make an X server type thing for it.
Meh.
Not _too_ hard.
Oh really now? Then why don't you go ahead and draft something up.
I'll get to work on setting up a VM for testing and writing code. You have one week, if it's not too hard.

The code itself is not complicated. The problem, really, is allocating time for it. I'll have about a month of free time from July the 6th to the 31st (I think). So I'll start then.

 Alice, on 24 June 2015 - 12:20 AM, said:

 Dr. Poof, on 24 June 2015 - 12:19 AM, said:

 ardera, on 23 June 2015 - 09:38 PM, said:

In my opinion, we should just build an application that emulates ComputerCraft but implements some lower level stuff like TCP connections, allows to draw pixels, etc,
and modify raspbian/archlinux/ubuntu (whatever you want) to boot in this application. It's way to complicated to make a new linux distro.

It's just a matter of writing a couple Makefiles.
PKGBUILDs too.
Arch, m8.
m8 good luck getting pkgbuilds in LFS

I meant to quote this: "It's way to complicated to make a new linux distro."

Plus, m8, makefiles are way better.

EDIT: Give me a name for this project and I'll go ahead and make a GH repo
I think not. I'd rather do it my own way. Honestly? Linux from Scratch? No.
I'm gonna set up a new GitHub repo once I got the VM set up, then I'll post my repo. You can do whatever you feel like.

Why are you even making a linux distro and not something that's innovative?

 Alice, on 24 June 2015 - 12:24 AM, said:

-snip-
This was to make "Standalone CC OSes." Not OSes programmed off of ComputerCraft code.


u wot m8? I can read the title. I can understand it. I'm not proposing OSes programmed off of computercraft code, whatever the F that means

Edited by Dr. Poof, 24 June 2015 - 12:29 AM.


#67 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 24 June 2015 - 12:40 AM

 Alice, on 24 June 2015 - 12:16 AM, said:

Oh really now? Then why don't you go ahead and draft something up.
I'll get to work on setting up a VM for testing and writing code. You have one week, if it's not too hard.

Chill.

Time will tell of course, but there's no use it making an emulator of ComputerCraft in any form if it doesn't accurately simulate ComputerCraft. So having full pixels is basically a must if it does get added, which seems increasingly likely.

Edited by oeed, 24 June 2015 - 12:42 AM.


#68 FUNCTION MAN!

  • Members
  • 292 posts

Posted 24 June 2015 - 01:01 AM

 oeed, on 24 June 2015 - 12:40 AM, said:

 Alice, on 24 June 2015 - 12:16 AM, said:

Oh really now? Then why don't you go ahead and draft something up.
I'll get to work on setting up a VM for testing and writing code. You have one week, if it's not too hard.

Chill.

Time will tell of course, but there's no use it making an emulator of ComputerCraft in any form if it doesn't accurately simulate ComputerCraft. So having full pixels is basically a must if it does get added, which seems increasingly likely.

I'm planning to implement this in a freestanding, non-linux operating system. It'll be hard, sure, but once I get drivers for things (I plan to make this for the raspi, so the hardware is pretty standard), implementing Lua and the CC libraries (including pixel rendering) will be MUCH easier.

#69 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 24 June 2015 - 01:05 AM

 oeed, on 24 June 2015 - 12:40 AM, said:

So having full pixels is basically a must if it does get added, which seems increasingly unlikely.

Fixed that for you. :)

#70 Alice

  • Members
  • 429 posts
  • LocationBehind you.

Posted 24 June 2015 - 01:17 AM

 Dr. Poof, on 24 June 2015 - 01:01 AM, said:

 oeed, on 24 June 2015 - 12:40 AM, said:

 Alice, on 24 June 2015 - 12:16 AM, said:

Oh really now? Then why don't you go ahead and draft something up.
I'll get to work on setting up a VM for testing and writing code. You have one week, if it's not too hard.

Chill.

Time will tell of course, but there's no use it making an emulator of ComputerCraft in any form if it doesn't accurately simulate ComputerCraft. So having full pixels is basically a must if it does get added, which seems increasingly likely.

I'm planning to implement this in a freestanding, non-linux operating system. It'll be hard, sure, but once I get drivers for things (I plan to make this for the raspi, so the hardware is pretty standard), implementing Lua and the CC libraries (including pixel rendering) will be MUCH easier.
Who said it had to be OS specific?
The PKGBUILD is simply a script to build it from source.
This is going to be a POSIX / ncurses compatible port that I am writing for Lua ComputerCraft.

#71 ardera

  • Members
  • 503 posts
  • LocationGermany

Posted 24 June 2015 - 04:11 AM

Multithreading would be nice, although Lua is not made for it
love2d lets you make other threads, but only lets you receive/send values (not references!) from/to them.

#72 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 24 June 2015 - 05:52 AM

 Dr. Poof, on 24 June 2015 - 01:01 AM, said:

I plan to make this for the raspi, so the hardware is pretty standard

That's quite a good idea really. It'd probably make it a whole lot easier to develop, and I'd imagine lots of people here have one. Heck, if you don't they're only thirtyish dollars.

Edited by oeed, 24 June 2015 - 05:53 AM.


#73 FUNCTION MAN!

  • Members
  • 292 posts

Posted 24 June 2015 - 02:37 PM

Exactly! The raspi is an ARM computer with easy to program hardware.

Plus, with GPIO, we can get a redstone equivalent.

#74 Alice

  • Members
  • 429 posts
  • LocationBehind you.

Posted 24 June 2015 - 06:42 PM

but... why not just make a program to run ComputerCraft in a terminal, then allow for an optional Raspberry Pi interface?

#75 FUNCTION MAN!

  • Members
  • 292 posts

Posted 24 June 2015 - 08:23 PM

 Alice, on 24 June 2015 - 06:42 PM, said:

but... why not just make a program to run ComputerCraft in a terminal, then allow for an optional Raspberry Pi interface?

Because running in a terminal excludes the ability to have pixel rendering

#76 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 24 June 2015 - 09:51 PM

 Dr. Poof, on 24 June 2015 - 08:23 PM, said:

 Alice, on 24 June 2015 - 06:42 PM, said:

but... why not just make a program to run ComputerCraft in a terminal, then allow for an optional Raspberry Pi interface?

Because running in a terminal excludes the ability to have pixel rendering

Which means it won't use the CC font.

Also, although I could very well be wrong, possibly not mouse interaction.

#77 Anfred

  • Members
  • 22 posts

Posted 25 June 2015 - 07:00 PM

I you have a raspberry pi, try this!
Making a custom Raspbian Distro is easier than you may think. Installing Love2D and changing the RPI config file to run cclite emulator at startup is the only addition to this tutorial, in order to run craftOS at boot. You may also want to change the cclite config file to run full screen. Here is the full tutorial in just a few paragraphs:

the New Out Of the Box Software, or NOOBS is the Raspberry Pi’s official installer. It has simplified and standardised the procedure for installing a distro on the Raspberry Pi. While the main purpose of NOOBS is to simplify the installation of an operating system on to the Pi, the tool can also be used to create a custom distro.
To get started, grab the NOOBS installer from the website and install any of the supported distributions that you want to customise. We’d advise you to use the Raspbian distribution, which is also recommended by the NOOBS installer.


After you’ve installed Raspbian, boot the distro and make whatever changes you want. You can change the default wallpaper and also switch themes by running the obconf command from the command line, and you can install additional themes with:
sudo apt-get install openbox-themes


You can also install and remove apps either directly via apt-get or by first installing the graphicalSynaptic package manager.
You can copy over any files into this Raspbian installation. NOOBS lets you create a 512MB partition that you can use to store files. Or, you can use the
raspi-config
command to expand the root partition to fill the SD card. Also make sure you set up the distro to work with your network hardware straight out of the box. So for example, you can configure the wireless adapter to connect to your Wi-Fi access point and access network services such as the directory server, or change the default browser page to point to your intranet landing page.

When you’re done setting up the distro, it’s time to package it into an archive. Change to the root directory with cd / and enter the following command:
sudo tar -cvpf root.tar /bin /boot /cdrom /dev /etc /home /initrd.img /initrd.img.old /lib /lib64 /media /mnt /opt /proc /root /run /sbin /srv /sys /tmp /usr /var /vmlinuz /vmlinuz.old --exclude=proc/* --exclude=sys/* --exclude=dev/pts/*
This command can take up to half an hour to complete depending on the number of changes you’ve made to Raspbian.
When it’s done, you’ll have a file called root.tar in the root directory. Similarly now roll up the boot files. First, move into the boot directory with
cd /boot
and then create the archive with the
tar -cvpf boot.tar
command. This will not take much time, and when it’s done you’ll have a file called boot.tar in theboot directory.
NOOBS requires compressed versions of these files. But the Raspberry Pi doesn’t have the resources to squeeze these files. So you’ll have to move them out to a regular desktop PC where you can compress them with the xz -9 -e boot.tar and xz -9 -e root.tar commands. This will replace the files with their compressed versions, namely boot.tar.xz and root.tar.xz.


Now format the SD card and extract a fresh copy of NOOBS into it. Use the file manager to navigate to the os directory under the newly extracted files. This directory further contains a number of directories, each of which containing the files for a supported distro including Arch, Pidora, Raspbian and others. Since our custom distro is based on Raspbian, we can remove all the other directories from under the os folder. Rename the Raspbian folder to the name for your custom distribution.
Head inside this folder and open the file named os.json in a text editor. In the file, replace the text beside the name and description fields from that of the original Raspbian distribution to your custom one. Also, make sure you remove the file named flavours.json. You can also optionally change the artwork of the distribution.


Finally, remove the existing root.tar.xz and boot.tar.xz files from under this folder and replace them with the ones you’ve just created. That’s it! Now boot the Pi with this card. The NOOBS menu will now list your unique, customised Linux distro.

Edited by Anfred, 25 June 2015 - 07:06 PM.


#78 KeeganDeathman

  • Members
  • 61 posts

Posted 26 June 2015 - 06:25 AM

Hey guys I am currently working on an LFS for this.
My stepdad suggested MicroCraft Portals, a play on Minecraft and Microsoft Windows, ha ha.
It seems this thread spawned three OSes.
I was planning on making it run the advanced computer CraftOS by default, and then you can just pastebin in your favorite OS.
?

#79 Anfred

  • Members
  • 22 posts

Posted 28 June 2015 - 05:15 PM

Great! Please keep us posted on the progress. Are you building for x86 PCs or raspberry pi -ARM?
I still think a CCOS would be a great tool for STEM teachers and beginner coders.

#80 クデル

  • Members
  • 349 posts

Posted 28 June 2015 - 11:59 PM

 Anfred, on 25 June 2015 - 07:00 PM, said:

I you have a raspberry pi, try this!
Making a custom Raspbian Distro is easier than you may think. Installing Love2D and changing the RPI config file to run cclite emulator at startup is the only addition to this tutorial, in order to run craftOS at boot. You may also want to change the cclite config file to run full screen. Here is the full tutorial in just a few paragraphs:

the New Out Of the Box Software, or NOOBS is the Raspberry Pi’s official installer. It has simplified and standardised the procedure for installing a distro on the Raspberry Pi. While the main purpose of NOOBS is to simplify the installation of an operating system on to the Pi, the tool can also be used to create a custom distro.
To get started, grab the NOOBS installer from the website and install any of the supported distributions that you want to customise. We’d advise you to use the Raspbian distribution, which is also recommended by the NOOBS installer.


After you’ve installed Raspbian, boot the distro and make whatever changes you want. You can change the default wallpaper and also switch themes by running the obconf command from the command line, and you can install additional themes with:
sudo apt-get install openbox-themes


You can also install and remove apps either directly via apt-get or by first installing the graphicalSynaptic package manager.
You can copy over any files into this Raspbian installation. NOOBS lets you create a 512MB partition that you can use to store files. Or, you can use the
raspi-config
command to expand the root partition to fill the SD card. Also make sure you set up the distro to work with your network hardware straight out of the box. So for example, you can configure the wireless adapter to connect to your Wi-Fi access point and access network services such as the directory server, or change the default browser page to point to your intranet landing page.

When you’re done setting up the distro, it’s time to package it into an archive. Change to the root directory with cd / and enter the following command:
sudo tar -cvpf root.tar /bin /boot /cdrom /dev /etc /home /initrd.img /initrd.img.old /lib /lib64 /media /mnt /opt /proc /root /run /sbin /srv /sys /tmp /usr /var /vmlinuz /vmlinuz.old --exclude=proc/* --exclude=sys/* --exclude=dev/pts/*
This command can take up to half an hour to complete depending on the number of changes you’ve made to Raspbian.
When it’s done, you’ll have a file called root.tar in the root directory. Similarly now roll up the boot files. First, move into the boot directory with
cd /boot
and then create the archive with the
tar -cvpf boot.tar
command. This will not take much time, and when it’s done you’ll have a file called boot.tar in theboot directory.
NOOBS requires compressed versions of these files. But the Raspberry Pi doesn’t have the resources to squeeze these files. So you’ll have to move them out to a regular desktop PC where you can compress them with the xz -9 -e boot.tar and xz -9 -e root.tar commands. This will replace the files with their compressed versions, namely boot.tar.xz and root.tar.xz.


Now format the SD card and extract a fresh copy of NOOBS into it. Use the file manager to navigate to the os directory under the newly extracted files. This directory further contains a number of directories, each of which containing the files for a supported distro including Arch, Pidora, Raspbian and others. Since our custom distro is based on Raspbian, we can remove all the other directories from under the os folder. Rename the Raspbian folder to the name for your custom distribution.
Head inside this folder and open the file named os.json in a text editor. In the file, replace the text beside the name and description fields from that of the original Raspbian distribution to your custom one. Also, make sure you remove the file named flavours.json. You can also optionally change the artwork of the distribution.


Finally, remove the existing root.tar.xz and boot.tar.xz files from under this folder and replace them with the ones you’ve just created. That’s it! Now boot the Pi with this card. The NOOBS menu will now list your unique, customised Linux distro.

Will video allocation cause lag? I only have 16mb allocated iirc.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users