This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
ComputerCraft for the Android
Started by Isaac_256, 07 January 2013 - 06:50 AMPosted 07 January 2013 - 07:50 AM
I made a suggestion similar to this one instead I suggested that a computercraft emulator be made for the iPhone so that we could test our programs on our devices when we don't have computer access at the moment. So I was wondering if a android application was possible to make for testing CC programs on the phone.
Posted 07 January 2013 - 07:54 AM
Damn it I JUST found another post similar to this! Don't reply to this post I'll try to delete it if possible.
Posted 07 January 2013 - 11:46 AM
Actually, it's not that bad of an idea, and definitely more possible than an iOS app. Android apps are written in Java, which would make it pretty easy to port.
Posted 08 January 2013 - 02:35 AM
Well… Googles interpretation of Java… But yes, far easier than an iOS impl.Actually, it's not that bad of an idea, and definitely more possible than an iOS app. Android apps are written in Java, which would make it pretty easy to port.
Posted 08 January 2013 - 03:55 AM
Also, IIRC, LWJGL has been ported to android, which might make it possible for tomass's emulator to run. Not sure about all of this though.
Posted 09 January 2013 - 12:28 AM
So, who knows Dalvik Java and is willing to port? :P/>
Posted 09 January 2013 - 07:05 AM
I want to see this as well. It would be real nice.
Posted 09 January 2013 - 12:35 PM
The language is the same, it just has different bytecode. Obviously the standard libraries are also different (eg there are no windows on Android, only Activities)So, who knows Dalvik Java and is willing to port? :P/>/>
Posted 09 January 2013 - 03:57 PM
Yeah, I know. That's what I mean by Dalvik Java; the libraries. Java is pretty simple to learn; it's the libraries you use that are tough as hell.The language is the same, it just has different bytecode. Obviously the standard libraries are also different (eg there are no windows on Android, only Activities)So, who knows Dalvik Java and is willing to port? :P/>/>
Posted 09 January 2013 - 05:04 PM
Ooooor, like I've said before… You could use JavaScript… And make it cross-platform. Just sayin'
Posted 09 January 2013 - 11:35 PM
Please tell me that was sarcasm.Ooooor, like I've said before… You could use JavaScript… And make it cross-platform. Just sayin'
Posted 10 January 2013 - 12:15 AM
Did it sound like sarcasm?Please tell me that was sarcasm.Ooooor, like I've said before… You could use JavaScript… And make it cross-platform. Just sayin'
http://syntensity.com/static/lua.html or some other Javascript-Lua interpreter.
http://antony.lesuis...tware/ajaxterm/ or some other Javascript terminal-like display.
Doable? I think so.
Am I missing something here?
EDIT: Just to be annoying, I might take this challenge on in my spare time.
EDIT2: Or, to be really crazy, you could use that "Linux in JavaScript" thing that guy wrote
Off topic: actually, ROT13 is encryption. Very basic, and it sucks, but still encryption.
Edited on 09 January 2013 - 11:21 PM
Posted 10 January 2013 - 12:36 AM
Ehm, simulating ComputerCraft is a lot more easier when using some of it base classes, like Tomass did. So Java still is quite a wise choice. I don't think that recompiling it for the Android should so hard. Permission from the devs could be another thing. But if you really want to, you can also rewrite all the CC libraries for JS which usually runs slower. Go ahead. ;)/>Did it sound like sarcasm?Please tell me that was sarcasm.Ooooor, like I've said before… You could use JavaScript… And make it cross-platform. Just sayin'
http://syntensity.com/static/lua.html or some other Javascript-Lua interpreter.
http://antony.lesuis...tware/ajaxterm/ or some other Javascript terminal-like display.
Doable? I think so.
Am I missing something here?
EDIT: Just to be annoying, I might take this challenge on in my spare time.
EDIT2: Or, to be really crazy, you could use that "Linux in JavaScript" thing that guy wrote
Off topic: actually, ROT13 is encryption. Very basic, and it sucks, but still encryption.
Posted 10 January 2013 - 01:12 PM
I'm just saying it's an option. And cross-compatible. I'm a big fan of cross-compatible. And open source.Ehm, simulating ComputerCraft is a lot more easier when using some of it base classes, like Tomass did. So Java still is quite a wise choice. I don't think that recompiling it for the Android should so hard. Permission from the devs could be another thing. But if you really want to, you can also rewrite all the CC libraries for JS which usually runs slower. Go ahead. ;)/>
Plus, most of the CC libraries are written in Lua already. And the rest you could just use dummy data for.
Not unreasonable enough to warrant a facepalm or a "please tell me that was sarcasm".
Posted 10 January 2013 - 01:37 PM
Well, I'm convinced that it's not a wise choice. For starters, Javascript is a lot slower than compiled languages. Also, Java is cross-platform as well. The problem with CC/CCemu is that LWJGL is a platform dependent library and that's a shame. At last, as CC is written in Java, trying to get permission to use the CC base classes and port this over is a hell of a lot less work than rewriting the whole damn thing. This is especially hard because you don't have exact specification of CC internal workings, so you'll find yourself spending a lot of time figuring those out.I'm just saying it's an option. And cross-compatible. I'm a big fan of cross-compatible. And open source.Ehm, simulating ComputerCraft is a lot more easier when using some of it base classes, like Tomass did. So Java still is quite a wise choice. I don't think that recompiling it for the Android should so hard. Permission from the devs could be another thing. But if you really want to, you can also rewrite all the CC libraries for JS which usually runs slower. Go ahead. ;)/>
Plus, most of the CC libraries are written in Lua already. And the rest you could just use dummy data for.
Not unreasonable enough to warrant a facepalm or a "please tell me that was sarcasm".
Posted 10 January 2013 - 02:02 PM
Well, Javascript is more cross-platform that Android (*cough* iOS).Well, I'm convinced that it's not a wise choice. For starters, Javascript is a lot slower than compiled languages. Also, Java is cross-platform as well. The problem with CC/CCemu is that LWJGL is a platform dependent library and that's a shame. At last, as CC is written in Java, trying to get permission to use the CC base classes and port this over is a hell of a lot less work than rewriting the whole damn thing. This is especially hard because you don't have exact specification of CC internal workings, so you'll find yourself spending a lot of time figuring those out.
And I may not know the exact specifications of CC, but I don't have to. I know what everything does, I don't care how it happens.
> peripheral.getType("left")
Umm… Err…. I dunno.. Uhhhhhh
"printer"
There, that's good enough!
> peripheral.call("left", "newPage")
Oh… Ummmm……..
true
That ought to stop it crashing! (I didn't actually do anything, lol!)
Posted 10 January 2013 - 02:21 PM
Well, stuff like timings and side effects could be important. But specifications are just a minor issue. I guess, if you find a Lua interpreter for javascript, and you want to simulate only a small subset of CC, then it could be rather doable.
Posted 18 January 2013 - 11:16 AM
Well if this get's to Android or something that would be sweeeeet!
Sounds like a pretty good Idea.
Sounds like a pretty good Idea.
Posted 22 January 2013 - 06:13 AM
Or you could use something like Gideros Studio and write the whole lot in Lua, and just sandbox it. Profit???