Jump to content




Raspberry pi + ComputerCraft


  • This topic is locked This topic is locked
35 replies to this topic

#21 jadelade

  • Members
  • 43 posts

Posted 13 November 2012 - 03:56 PM

View PostJasonfran, on 07 November 2012 - 06:43 AM, said:

I doubt anyone would want to work with assembly. So this suggestion is highly unlikely to be made. And why buy a raspberry pi and complain it is too hard to understand, its the whole point. If you start hard you will be a great programmer. Lua is a cool language but you can't use it in many things as its just a scripting language. If you want to make programs and games I suggest just sticking with the OSes supported by the device and learn from there.

For Dan to make this possible he would have to create a shell in assembly and then make it so assembly has all the Lua functions as there will be no APIs for it like the Java Lua api that CC uses. Hard stuff

1 I'm not complaining, its as you said a suggestion.

2 I know Python just as well as i know Lua. you must of misunderstood me or i miss worded it.

3 I hate importing things that is why i would like to code in Lua.

4 I like coding Lua better then java or python (personal preference).

5 Yes, it is cool, and yes it is only a scripting language but the cc apis can make it more then just that.

I hope that clearse some stuff up

#22 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 13 November 2012 - 04:03 PM

View PostJasonfran, on 08 November 2012 - 04:48 AM, said:

Uh because its not a machine language, its a scripting language. You CANNOT write a computer operating system in Lua as CPUs don't comprehend it, they are built to run on Assembly.
The only way computercraft works is because it uses a Java API that emulates it. About 50% of the Lua functions in CC are Java, all the OS api is Java based. You can write and operating system then add a Lua scripting environment but you'd need an API that emulates Lua, and you can't get them for Assembly. Go ahead, try but fail early on
Wow, do you have any source for all that? Can you give me one commonly used OS that is entirely written in assembly? Typically, the bootloader is the only thing written in assembly. Everything else is often written in C (or other low level languages). This is compiled to asm, which can directly be compiled to binary. As well as lua can be compiled to assembly/binary. No difference, except for what you can do with the language (lua is limitted on some levels as far as I know).
Anyways, basically, all you need is a lua interpreter (as been stated before). I don't think it's worth porting the ComputerCraft api's though.

#23 dissy

  • Members
  • 181 posts

Posted 13 November 2012 - 04:25 PM

You could just install Raspbian (A Debian Linux distrobution) on the raspberry pi, then install Java on it, and finally install tomass1996's ComputerCraft Emulator. There is also a binary package of Lua 5.1 for it you can install.

apt-get install java6-runtime lua5.1

As you can install both the Java runtime (JRE) and the development kit (SDK), I don't see any reason why you couldn't also run Minecraft directly on it either.

Unfortunately my raspberry got damaged and I have another one on order that won't arrive until Friday, so I can't provide you step by step directions, but all of the software you would need for this is already available. I can confirm Java works.
I didn't think to try running Minecraft on it, but most certainly will next weekend! :P/>

#24 BigSHinyToys

  • Members
  • 1,001 posts

Posted 13 November 2012 - 04:56 PM

View Postdissy, on 13 November 2012 - 04:25 PM, said:

You could just install Raspbian (A Debian Linux distrobution) on the raspberry pi, then install Java on it, and finally install tomass1996's ComputerCraft Emulator. There is also a binary package of Lua 5.1 for it you can install.

apt-get install java6-runtime lua5.1

As you can install both the Java runtime (JRE) and the development kit (SDK), I don't see any reason why you couldn't also run Minecraft directly on it either.

Unfortunately my raspberry got damaged and I have another one on order that won't arrive until Friday, so I can't provide you step by step directions, but all of the software you would need for this is already available. I can confirm Java works.
I didn't think to try running Minecraft on it, but most certainly will next weekend! :P/>

Even if it can only run a CC emulator and development pad I think you have convinced me to get one too. I always have idea when I am away from my main computer and wanted a light weight computer to make some noted on or test ideas I never knew that the pi could have java capability.

#25 jadelade

  • Members
  • 43 posts

Posted 15 November 2012 - 06:31 PM

View Postdissy, on 13 November 2012 - 04:25 PM, said:

You could just install Raspbian (A Debian Linux distrobution) on the raspberry pi, then install Java on it, and finally install tomass1996's ComputerCraft Emulator. There is also a binary package of Lua 5.1 for it you can install.

apt-get install java6-runtime lua5.1

As you can install both the Java runtime (JRE) and the development kit (SDK), I don't see any reason why you couldn't also run Minecraft directly on it either.

Unfortunately my raspberry got damaged and I have another one on order that won't arrive until Friday, so I can't provide you step by step directions, but all of the software you would need for this is already available. I can confirm Java works.
I didn't think to try running Minecraft on it, but most certainly will next weekend! :P/>

i did add minecraft. the day I got it I clocked it to the max and boom it lagged harder then a giraffe

you need to start to look into the gaming view of the hardware.
its a lagy peace of crap that has trouble opening a window and the emulator dues not support the GPIO pins

I'm trying to get a real life version of the computers
the os is fast lightwight and simple
i cant and don't want to lug around my 40 lb desktop and i cant run minecraft or test rednet and/or redstone stuff on the emulator on my net book

#26 dissy

  • Members
  • 181 posts

Posted 15 November 2012 - 08:38 PM

View Postjadelade, on 15 November 2012 - 06:31 PM, said:

you need to start to look into the gaming view of the hardware.
its a lagy peace of crap that has trouble opening a window and the emulator dues not support the GPIO pins

I see. Then all I can say is good luck on your project.

#27 jadelade

  • Members
  • 43 posts

Posted 16 November 2012 - 12:59 PM

better the nothing

#28 Tiin57

    Java Lunatic

  • Members
  • 1,412 posts
  • LocationIndiana, United States

Posted 18 November 2012 - 01:16 AM

View Postjadelade, on 16 November 2012 - 12:59 PM, said:

better the nothing
I think you mean "Better than nothing."?
Also, it's not. It's actually worse than nothing, imho.

#29 dissy

  • Members
  • 181 posts

Posted 18 November 2012 - 03:21 AM

So in playing more, I think I see what the OP did wrong.
By default the ram/vram settings only give 32mb to the GPU which doesn't let it do much 3D work.
If you up that to 64mb to just enable the GPU 3D, the CC emulator runs OK with enough ram.

Now all I need to do is code in GPIO pin support and I feel the Pi will work great as a stand alone emulator.

There is still not enough RAM to run full minecraft at any decent speed :{

#30 ETHANATOR360

  • Members
  • 423 posts
  • Locationyour hardrive

Posted 18 November 2012 - 12:47 PM

i checked the rasberry pi wiki lua should work with it

#31 Mtshaw113

  • Members
  • 3 posts

Posted 07 June 2013 - 05:36 PM

Im not too sure if this is what somebody has pointed out, but can you run Lua on the Pi? I know some Lua, and I know its easy to learn and understand, and since I havent really coded anything or learned a whole lot about any language(except some Java and Lua) I would love to be able to write programs, in Lua, on the Pi.

#32 mlaga97

  • Members
  • 4 posts

Posted 18 June 2013 - 03:05 AM

View PostJasonfran, on 08 November 2012 - 04:48 AM, said:

Uh because its not a machine language, its a scripting language. You CANNOT write a computer operating system in Lua as CPUs don't comprehend it, they are built to run on Assembly.
The only way computercraft works is because it uses a Java API that emulates it. About 50% of the Lua functions in CC are Java, all the OS api is Java based. You can write and operating system then add a Lua scripting environment but you'd need an API that emulates Lua, and you can't get them for Assembly. Go ahead, try but fail early on

One could write a standalone bootable lua interpreter in C/C++/Assembly that does hardware abstraction and write the rest in Lua. Also, you can definitely get them for assembly. In fact, the official Lua interpreter is compiled to assembly.

#33 Tiin57

    Java Lunatic

  • Members
  • 1,412 posts
  • LocationIndiana, United States

Posted 18 June 2013 - 09:26 AM

View PostMtshaw113, on 07 June 2013 - 05:36 PM, said:

Im not too sure if this is what somebody has pointed out, but can you run Lua on the Pi? I know some Lua, and I know its easy to learn and understand, and since I havent really coded anything or learned a whole lot about any language(except some Java and Lua) I would love to be able to write programs, in Lua, on the Pi.
Yes, you can run Lua on the Pi. Just run "lua" in a terminal window.

#34 Nina

  • Members
  • 19 posts

Posted 18 June 2013 - 01:44 PM

View Postjadelade, on 15 November 2012 - 06:31 PM, said:

View Postdissy, on 13 November 2012 - 04:25 PM, said:

You could just install Raspbian (A Debian Linux distrobution) on the raspberry pi, then install Java on it, and finally install tomass1996's ComputerCraft Emulator. There is also a binary package of Lua 5.1 for it you can install.

apt-get install java6-runtime lua5.1

As you can install both the Java runtime (JRE) and the development kit (SDK), I don't see any reason why you couldn't also run Minecraft directly on it either.

Unfortunately my raspberry got damaged and I have another one on order that won't arrive until Friday, so I can't provide you step by step directions, but all of the software you would need for this is already available. I can confirm Java works.
I didn't think to try running Minecraft on it, but most certainly will next weekend! :P/>

i did add minecraft. the day I got it I clocked it to the max and boom it lagged harder then a giraffe

you need to start to look into the gaming view of the hardware.
its a lagy peace of crap that has trouble opening a window and the emulator dues not support the GPIO pins

I'm trying to get a real life version of the computers
the os is fast lightwight and simple
i cant and don't want to lug around my 40 lb desktop and i cant run minecraft or test rednet and/or redstone stuff on the emulator on my net book
When I tried Minecraft: Pi Edition on my Pi, it actually ran pretty well.
Also, not being able to smoothly open and move windows is not as much a problem with the hardware as it is a problem with the software that runs on it. Currently X11 is used for the GUI in Raspbian (or well, any Linux distro for real use that has a GUI pretty much) and there currently no drivers for X that make use of the Pi's graphics hardware, so everything is done on the CPU. This is slow for obvious reasons. Wayland appears to be a solution for this issue.

"start to look into the gaming view of the hardware"? This is just a rather weak ARM SoC, what do you expect from it? The best you can get out of this thing is Quake 3 at a pretty decent framerate.

#35 Tjakka5

  • Members
  • 256 posts

Posted 19 June 2013 - 01:47 PM

It suprises me this topic hasnt been locked yet...

#36 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 20 June 2013 - 12:42 AM

Aaand with that...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users