I asked this question two years ago but in the meantime I have not had the time to make a start and I ask again now because resources may have come on.
I have no programming experience what-so-ever and don’t understand any code In any examples. I want to learn how to use codea and would love to find a step by step guide to understanding the breakdown of the examples on codea and learn basics code to make a basic programme.
Any links would be appreciate…i want a little hobby and im willing to learn but I don’t know where to start. THANKS
@thebugel I would say keep it simple to start with. I put together tutorial for creating a simple lander game aimed at a total beginner but I may well be making assumptions. I’d be interested to know how you get on.
It is broken into 12 steps, each one building on the last. Internal comments only refer to the new code in each step. Each step is a stand alone tab, and to run a chosen step move its tab to the far right position and press run.
Select and Copy the whole code from here: https://gist.github.com/Westenburg/5799558
Then In Codea, long press on add a new project and select “Paste into project”
Will defo take a look & let you know how I get on thanks. Is there anything that breaks down codea written programmes which explains every section and explains why that particular code is used in that particular order etc…
Not on ipad at minute but just looking at it, It’s all gobbledygook to me, maybe I need to understand the more basics.
I have a lot of tutorials for beginners, starting here
But I would start with Lua, the language behind Codea. I’ve written an ebook for it, here
There are quite a few other tutorials on the wiki link above, too
Hi thanks for posting your ebook ignatz that’s exactly what I was after, I’m going to print it off later (it’s annoying going back and forth) much appreciated.
I found this online book (for processing though) which might be useful for describing vectors and physics. Seems quite nice. Should be straightforward to convert the examples to Codea in most cases.
I’m in the exact same position. Thanks Ignatz for your tutorials they look great. I might also recommend looking at the GamePress App for working with gaming logic without having to bring in the coding aspect.
I’m working on a Codea ebook here
and I’d appreciate comments from beginners (rather than from experts), as it’s a lot of work and I want to know if I’ve pitched it ok.
I read through your ebook and it seems appropriately pitched to beginners–I wish I’d had it when I first picked up Codea.
Two things. The first is just a quibble. On page 12 in your description of “print” you describe it as “print several items, separated by commas”. I know what you meant but it might confuse the beginner. “print” arguments are separated by commas, but the values that are output appear with spaces between them (and end in a newline).
Later on you say for lack of space you’ve put several statements on one line, and they appear with spaces between them. Don’t do that because if the user copies/pastes it, it won’t work. Lua does allow multiple statements per line as long as you put semicolons between them–put those in and your examples will be fine for copy/paste.
@starblue, semicolons aren’t needed when putting multiple statements on one line. You can include semicolons if you want to, it does help with formatting for easy reading.
Here is an example of one of my buttons:
TextButton('Equipment', 824, 648, 1024, 768, function () alert("hello") currentMenu = 0 end, 30)
You can see in the callback function, it is all on one line. It successfully changes my menu to 0 and it alerts “hello”. The same would work just as well if I separated the statements with semicolons.
I stand corrected. Looking in PIL they call blanks between statements “ugly but valid”, preferring (but not requiring) semicolons in that situation. Well, it’s good to know what’s necessary and what isn’t.
@starblue - thanks for your comments. I’ll look at that print statement you raised.
I uses spaces to separate multiple statements quite often. For example, if I’m defining a mesh, I find it helpful to define the texture mappings next to the vertex mappings, to make the code easier to check. If it’s laid out neatly with a clear separation (and I concede my ebook kind of crammed them in!) then it works well.
Thanks a lot, @Ignatz, for the pdf. I’m looking at it right now, and it looks really helpful.
@Thebugel, asking precise questions on this forum is also a great way to get on tracks. I just picked up codea a few weeks ago when I broke my collar bone, among other things, and couldn’t operate a regular computer for a while. Thanks to the examples (they are indeed very useful, if a little obscure at first), but mostly to this forum (and the pain killers, I must say :D), I was able to get started experimenting and interacting with some pretty exciting little projects in no time!
I’m also working on an ebook for Codea (which assumes you know something about Lua), here. It’s incomplete, but there’s quite a lot there already.
@Ignatz, another good one! I was looking over it and I noticed that in chapter six you made a mistake. For the balloon and arrow game you say you always start at x = 0 and y can alternate between 100 and WIDTH. You got x and y backwards there
Thanks @JakAttak, I’ll fix that
@West, @Ignatz, great work! =D>