YMTB - yet more tutorials for noobs

I’ve used Codea for a month or so, but it took me some time to grasp some key concepts, for example, all the push and pop stuff. I think it’s important to get that fairly early on.

So I’ve written a few tutorials, with a focus on explaining not just how Codea works, but why.

Here: https://coolcodea.wordpress.com

I’d appreciate feedback, especially from anyone who is very new.

Nice @ignatz nice and well formatted. Just one sugestion add the finalised code at the end.

Cool. How complicated to you hope to get this blog? Into shaders and stuff?

If I understood shaders and stuff, I’d give it a go, but right now, I’d like a tutorial on that too!

Really well laid out. Wish this was around when I started out.

On the second tutorial you have a small typo - you have a variable name (?) app, instead of the width of the rectangle – rect(10,20, app,400)

This appears twice.

Looks very nice.

Some (minor) comments:

  1. The code block highlighting is a little inconsistent. Sometimes it isn’t applied, sometimes there are non-highlighted gaps between contiguous bits of code. Sometimes there are spurious empty-but-highlighted bits before and after code blocks.

  2. The comment about < and > might be browser-dependent. I checked with my browser (Firefox) and it cut-and-pasted the code just right.

  3. In the “bouncing off walls” example, you reverse both components of the velocity when it bounces of a wall. A more realistic version would only reverse the component of the velocity corresponding to the wall that was hit. There’s also a potential trap there in that it is feasible (with changing various parameters) that the test evaluate to true while the ball is already heading away from the wall, thus reversing the velocity again back towards the wall. A possible workaround is:

     if x < d/2 then dx = math.abs{dx} end


     if x < d/2 and dx < 0 then dx = - dx end

    and so on.

For shaders, did you see my commented examples? http://loopspace.mathforge.org/discussion/19/shader-examples

Thanks for the comments

You’re right about the bouncing code, Andrew. I actually had it perfectly correct, then ran into a problem with WordPress where it treated < and > as HTML tags, and stuffed up the code completely. In working around that, I incorrectly retyped it. I’ll fix it. And thank for the pointer to your shader examples, I’ll have a look at them.

Hi! I’m new to all of this and your tutorials are going at a perfect pace for me to follow. Please keep up the awesome work! I will be following this blog! @Ignats