Pandora How to execute lua scripts in pandora


psychotron

Still Fresh
Joined
Sep 5, 2006
Messages
55
Hi,


recently I started to learn Lua due game scripting needs, and when I'm on the road it will be great to be able to practise on the go on my pandora.


However I cannot get to work even 'hello world' script - I try scite & codeblocks from repo but without success.


Can you help me out please? I prefer to work with Lua 5.1


I was using luaedit on windows and recently I stumble upon zerobrane which is opensource and also provide versions for ubuntu.


Would you folks be so kind have a look at zerobrane http://studio.zerobrane.com/ and try to port it to pandora's PND? Would be great if it can work out of the box (running scripts).


Thanks for any information.
 
You can grab my Code::Block PND on the repo. Lua is include and you work "out of the box"'.
 
Last edited by a moderator:
A version of Lua is included in the default firmware, I don't know wich version though.


Type lua --version into the terminal


edit: nevermind it's "lua -v"


mine says it's version 5.1.4


you should be able to run scripts by typing "lua scriptname.lua"


edit2:


yup, just tested a file with


print("Hello World")


It works
 
Last edited by a moderator:
p'titSeb > when I choose build and run or run in code:blocks on print('hello world') file which is saved it just tell me 'it seems that this file has not been built yet. do you want to build it now?'


when I choose yes, this notification windows prompt again and nothing happens


felix20 > that's very positive, however it seems I'm unable to navigate thru filesystem in console.. ls list just Applications and Desktop directories and I don't know how to get to SD card where my lua files are saved, will you enlighten me please?


yup lame here :) that's why I'm looking for some lightweight IDE where I can write code and run it without hassle
 
Your sdcards can be found in /media/SDCARDNAME


This is Linux, not windows. Everything is logically mounted into the rootfilesystem. There are no driveletters or something ;)
 
p'titSeb > when I choose build and run or run in code:blocks on print('hello world') file which is saved it just tell me 'it seems that this file has not been built yet. do you want to build it now?'


when I choose yes, this notification windows prompt again and nothing happens


yup lame here :) that's why I'm looking for some lightweight IDE where I can write code and run it without hassle
Ah, sorry, I misguide you. Code//Block cannot be used as an IDE for LUA. But you can just update "Mousepad" (again, in the repo). The update version feature Colored syntax (you have to activate it). It's not an IDE, but it works quite well. Then, you can compile with the LUA in the firmware (via a Terminal), or the LUA in the Code::Block PND (via the Command Line menu). Not entirely plug'n play I'm afraid.
 
There's still Geany, Geany can handle nearly anything. By default it seems to only know how to execute scripts, but you can easily add other commands, which are file type specific, so it's a one time thing for all your LUA needs.
 
There is also LOAD81, which doesn't get much love, but is still freakin' awesome anyway (I don't care, waaah!):


http://repo.openpand...tail&app=LOAD81


Includes my hacks to make the joystick work, use Pandora native screen resolution, &etc. Its *quite* usable as a Lua games engine, since it exposes a bit of the SDL stuff, and adding more is easy and fun (My branch at https://github.com/seclorum/load81 can be built with CDEVTOOLS.pnd)


One more thing, on this topic: I'm working on the MOAI port to Pandora. More news when it works and I have nub support added ..
 
Last edited by a moderator:
One more thing, on this topic: I'm working on the MOAI port to Pandora. More news when it works and I have nub support added ..

Is this MOAI  http://getmoai.com/  ???

If yes i think we could have very nice games portable to Pandora...great news and works too
 
Lua seems really simple. I was watching Sethbling's computercraft tutorial and it seems like a really easy language. I think I might learn it.
 
Lua is a lovely language and an amazing tool.  If you want to learn it on your Pandora, easiest way is to get LOAD81 and have at it .. 
 
Back
Top