4. Learning to code
As I said early on, when your screen is updating 60 times a second, the code in your draw function becomes very important. And, as we do more complex examples, you need to start learning the language behind Codea.
The Codea language is made up of two parts;
- Lua, an existing programming language, which has no graphics, and
- special functions added to provide all the visuals and make Codea work on the iPad
Lua commands do things like storing values, calculating, looping through some numbers ,etc, whereas the special Codea functions do things like drawing on the screen.
You can just google for help with Lua, because it’s been around a few years. Here is a good reference.
Codea has help in several places:
- the official documentation
- built into Codea (press the eye symbol on the onscreen keyboard while you are editing)
- the Codea forums, where people are always happy to help
There are several good links here.
As I said in my first post, I’ve tried to help with some ebooks. If you go to my index of posts, you’ll see all of them.
I suggest that each time you see something new that looks useful, you look it up to see what it does.