214 posts
Posted 24 November 2012 - 10:15 PM
sorry if this should of gone in ask a pro, but im not really sure. anyway this has been bugging me at the back of my mind. im getting quite good at computercraft. how ever, all the functions in computercraft like term.clear() are not available in lua. they are what dan and cloudy have added. so even though im good at computercraft does this mean im shit at lua its self?, when i get time imma look through the built in apis and see how there made. but, i just think that i would not be able to code anything in just raw lua? is this the case? i understand things like print, if/else/elseif statments will be there. and i can use those. as well as varibles. but still i would love some feedback.
536 posts
Posted 24 November 2012 - 10:20 PM
A lot of the original apis are made into Java itself, you wont find the FS api anywhere in there, some functions are visible in there such as nativeShutdown… I do believe decompiling the compiled java is against the Terms of Usage agreement.
how the hell are they meant to know? just download something like jd-gui and open it up, what would be against the terms of usage would be recompiling it or redistributing it etc.
1214 posts
Location
The Sammich Kingdom
Posted 24 November 2012 - 10:23 PM
Well, Lua itself has a lot of basic function, such as math, tables, string, etc. However, a lot of stuff you have to build to your situation. For instance, the functions you may use in Roblox, G-Mod and CC mat be completely different. Lua is kinda universal. Some people may use it to make coding a lot of complex stuff easier while some people may use it to make games easier to make.
214 posts
Posted 25 November 2012 - 12:00 AM
i was just wondering because its down to all the apis added in CC that i can code good stuff. other wise i would not be able to do much at all
537 posts
Location
Copenhagen, Denmark
Posted 25 November 2012 - 12:04 AM
What does the APIs in Computercraft allow you to do that you could not do outside of it?
For a rendering/audio engine, have a look at
LÖVE.
You can already do ALOT of stuff with "vanilla" Lua.
Basically, the only thing CC allows you to do out of the box, is making a GUI without any libraries.
2447 posts
Posted 25 November 2012 - 12:32 AM
Lua skills are pretty much transferable between program's. It's only random functions which don't exist in one or the other.
Mecha: I've no idea what your point was about decompiling - it wasn't even relevant to what he was saying.
214 posts
Posted 25 November 2012 - 10:12 PM
What does the APIs in Computercraft allow you to do that you could not do outside of it? For a rendering/audio engine, have a look at
LÖVE. You can already do ALOT of stuff with "vanilla" Lua. Basically, the only thing CC allows you to do out of the box, is making a GUI without any libraries.
well, it kinda gives me a purpose to code lua. with out cc i could not make programs like, controlling turtles. what would you actually be able to code in vanilla lua and how would you even run it?
536 posts
Posted 25 November 2012 - 10:15 PM
You would code in something like notepad and use a lua interpreter to run your script,
LÖVE, as suggested earlier, is a great one as it comes with a load of libraries installed which can make creating most things with lua far easier and simpler.