Omnimaga
Calculator Community => TI Calculators => Lua => Topic started by: annoyingcalc on August 18, 2012, 05:26:51 pm
-
After a while of switching between which language to learn next I have decided to try lua, this is my first program in lua it isnt anything spectacular but it is a start :D I hope luna compiled it correctly (I used oclua)
EDIT: no it isnt Hello world
-
Nice :)
Next step for you I guess is that you may want to use classes for creating more objects of the same type (instances of the class). Here's it's two objects so it's good enough not to use classes anyway.
Also I guess I don't see any indentation because it's not done on the computer ? (oclua / Luna, I'm not sure what you used ?)
Anyway, you can have the Nspire Software 3.2 while having your calc in 3.1 if you want to keep it so, and then you'll be able to profit from the Lua SDK inside the software which is much better than on-calc for longer scripts.
Don't forget to visit Inspired-Lua.org :D
-
Also I guess I don't see any indentation because it's not done on the computer ? (oclua / Luna, I'm not sure what you used ?
right I am using my computer in the future though
Don't forget to visit Inspired-Lua.org :D
That is where ive been going :D
-
Nice, what kind of things do you plan on makeing?
-
Games, not sure what games yet.
-
Interesting program. You could probably turn this into some puzzle game where you have to navigate through mazes on both sides of the field and there're switches one person activates to help another.
Good to see another Lua coder! :)
-
Yes, that is my plan for this!
-
EDIT: no it isnt Hello world
But there are no Hello World for the TI-Nspire yet. We need one! O.O
Just kidding I'll have to try your program when I have time. :) Is OS 3.2 absolutely required or will I be fine with 3.1? I have Ndless...
-
I use 3.1
-
You can make 3.2 programs completely compatible with 3.1 ones
-
You can make 3.2 programs completely compatible with 3.1 ones
Indeed.
Either if you have only one script frame in your .tns (and you never had anything more than that - even if deleted) then you have to put " platform.apilevel = '1.0' " at the beginning of your script.
You can also use Luna
-
You can make 3.2 programs completely compatible with 3.1 ones
Oh I meant for example if he decided to use the 3.2-only physic engine or commands. On the TI-84+ I remember people tried to make their games 83+ compatible, but some others forgot that the 83+ had no clock, so people complained that their games won't send to a 83+ because it uses the clock.
-
Oh, I only use 3.1 I want gpsp :D
-
You can make 3.2 programs completely compatible with 3.1 ones
Oh I meant for example if he decided to use the 3.2-only physic engine or commands. On the TI-84+ I remember people tried to make their games 83+ compatible, but some others forgot that the 83+ had no clock, so people complained that their games won't send to a 83+ because it uses the clock.
That would make it incompatible, so would using withGC. But since he is using 3.1, He shouldnt have to realy worry about anything other than using setAlpha, platform.gc, the clipRect command "intersect", and there may be a few others and I just dont remember them. Those commands that I just listed will not work on OS 3.2
-
As far as I know, they will work if you have "platform.apiLevel = '1.0'".
Don't know about setAlpha though. But that command wasn't even supported and did not work properly on calc.