Omnimaga

Calculator Community => TI Calculators => Lua => Topic started by: Kjelddy on September 14, 2011, 11:29:36 am

Title: questions about starting LUA programming
Post by: Kjelddy on September 14, 2011, 11:29:36 am
hi all :)
I want to get started on programming stuff for my CX, but I haven't programmed ever before ..... so here are some basic questions( for you) I have before I start programming

1 is it hard to code in nspire LUA?

2should i learn LUA befor nspire LUA?(if not what must I know about LUA or other programming languages?)

3 how should I start (I know of the hello world but even that I don't get .... (from the video of adriweb)more explanation at the bottom)

4 how long does it take to make a simple programm/game?

this all may be dumb questions for some of you (and I may have not searched enough for more info). but anwsers to these questions may help me a great deal. I might post some more questions in this topic later on.
thanks in advantage

sidenode to 3 i think i undestand it now, so is a string a line of text?
Title: Re: questions about starting LUA programming
Post by: Levak on September 14, 2011, 11:46:36 am
1) nspire Lua is Lua but with nspire framework functions in it (I mean it is not like the difference between TI-èBasic and Basic whom are really differents)

2) Yes. Personnally I learnt Lua while discovering and documenting Nspire Lua. But I'm not an example. On the other hand, learning a language is hard without a goal/project. Your goal : understand how Lua tables and meta tables work :D

3) You have the choice. So the question is "do you have time to learn completly Lua before learning the extra-functions of Nspire Lua ?" . If so, start open the huge Lua documentation (http://www.lua.org/manual/5.1/) and read it from begin to end. Same for lua-user (http://lua-users.org/wiki/LuaDirectory) documentation. Otherwise, use Inspired-Lua starting tutorials (http://www.inspired-lua.org/category/tutorials/starting-in-lua/)

4) What is a simple program for you ? For example I made in two days Nyan Cat (http://tiplanet.org/forum/archives_voir.php?id=3707). Two days is really short I think and a normal person will make it in 5-6 days. Give an example of what you think to be a "simple" program/game.

sidenote : a string is a table of characters. 'a' is a character, "aaaaaaa" is a string. But "aaaaa \n aaaaaaaaaaa \n aaa" is also a string.
Title: Re: questions about starting LUA programming
Post by: Jim Bauwens on September 14, 2011, 12:28:53 pm
Quote
Two days is really short I think and a normal person will make it in 5-6 days. Give an example of what you think to be a "simple" program/game.
Yes, we all know you are not normal :p

Personally I didn't think it was hard, but if its the first time you program, it can be a bit hard.
Title: Re: questions about starting LUA programming
Post by: Wellen on September 14, 2011, 01:28:17 pm
Plus with sound ! ^^
Title: Re: questions about starting LUA programming
Post by: Kjelddy on September 14, 2011, 02:54:53 pm
2) Yes. Personnally I learnt Lua while discovering and documenting Nspire Lua. But I'm not an example. On the other hand, learning a language is hard without a goal/project. Your goal : understand how Lua tables and meta tables work :D

3) You have the choice. So the question is "do you have time to learn completly Lua before learning the extra-functions of Nspire Lua ?" . If so, start open the huge Lua documentation (http://www.lua.org/manual/5.1/) and read it from begin to end. Same for lua-user (http://lua-users.org/wiki/LuaDirectory) documentation. Otherwise, use Inspired-Lua starting tutorials (http://www.inspired-lua.org/category/tutorials/starting-in-lua/)

4) What is a simple program for you ? For example I made in two days Nyan Cat (http://tiplanet.org/forum/archives_voir.php?id=3707). Two days is really short I think and a normal person will make it in 5-6 days. Give an example of what you think to be a "simple" program/game.

3 I don't think i have time to learn Lua completely (busy with school and stuff) but ofc i don't know how long that takes. so how long do u think to learn it (and it's it irritating to learn Lua first and then nspire Lua which seems to be a bit different)
4 by simple program I mean something like somethig that isn't just plain text like hello world but some action(and ofc as start not very large to make ) and what do u mean by days 24 hours or 8 hours ?
Title: Re: questions about starting LUA programming
Post by: Adriweb on September 14, 2011, 03:02:56 pm
About 3) :  I think Lua is so easy by itself, you can pretty much look at what its syntax is and right away dive in Nspire Lua.

You can look at other's code, tutorials, documentation etc., it will really help you a lots :)
Title: Re: questions about starting LUA programming
Post by: Levak on September 14, 2011, 04:24:09 pm
3) Lua is _exactly_ the same in syntax and command in Nspire-Lua. It is clearly a Lua port of the version 5.1. Then, TI added its own framework and way to program (event based), but it is still Lua.

4) 2 physical days during holidays .... understand what you want I can't remember how much I slept :D
Title: Re: questions about starting LUA programming
Post by: Kjelddy on September 14, 2011, 04:28:14 pm
if that's true I am a bit worried
5 * 24 = 120 hours and i think i have 0,5 til 1 hour a day (maybe some more in weekend but still ) so it would take me 120 to 240 days to make a game like nyancat :O
Title: Re: questions about starting LUA programming
Post by: Levak on September 14, 2011, 04:30:44 pm
If you only have 1 hour a day, yes it is really short for you. Actually many things are made during the weekend, or during school hours :D