Omnimaga

Omnimaga => News => Topic started by: Hot_Dog on December 19, 2011, 06:36:56 pm

Title: Lua's compatibility with future versions of the Nspire
Post by: Hot_Dog on December 19, 2011, 06:36:56 pm
Lua has become quite a valuable and popular programming language for the Nspire series of calculators.  Since Lua is used for a lot of games, it would be awful if a promising game could only work on some OSes of the Nspire and not others.  As such, we are thankful to Critor for the following topic:  http://ourl.ca/14528

Basically, if your Lua game includes only functions that TI documents and gives instructions for, your game is almost 100% guranteed to work on future Operating Systems of the Nspire.  However, there are some functions that TI did not mention, hidden functions that were discovered through the work of others.  Sometimes these functions are changed or removed in future versions of the Nspire, and your game will not work on those particular calculators. 

What we're saying is if you would like to create a Nspire game that everyone can use, be careful using undocumented instructions.  There's no promise that the functions will remain.  You should be safe sticking with the functions that TI talks about.

On another note, here's an official TI operating system that critor found, but TI hasn't made available for download:

http://ourl.ca/13817
Title: Re: Lua's compatibility with future versions of the Nspire
Post by: Jim Bauwens on December 20, 2011, 02:23:51 am
Nice and clear :)
Title: Re: Lua's compatibility with future versions of the Nspire
Post by: Adriweb on December 20, 2011, 06:36:02 am
Just wanted to add something :

For people using Inspired-Lua (the wiki, at least),
we're now marking the unofficial/undocumented functions, so you can see it clearly.

Example : http://wiki.inspired-lua.org/gc:setAlpha (http://wiki.inspired-lua.org/gc:setAlpha)
Title: Re: Lua's compatibility with future versions of the Nspire
Post by: Loulou 54 on December 20, 2011, 09:48:26 am
Oh.. I use gc:setAlpha in ABA Logique..

Beside I noted it doesn't work very well on the calculator.
Indeed, on the device, there aren't 255 levels of transparency but two :
* If you set gc:setAlpha(255) what's displayed is opaque.
* If you set something between 0 and 254, it's the same and the thing displayed is half transparent..
That's weird. On the software it works well and that's proportionnal.

So if you want the same level of transparency on the software and the calculator, you have to set gc:setAlpha(128).

Then, if you want to make a gradient or other levels you can superimpose things with this transparency.

(That's what I made in ABA Logique under the titles)
(http://tiplanet.org/modules/archives/captures/1320610684abalogik.gif)