I’ve developed a few step by step projects for teaching Codea to a school class, but I think this approach works well for most beginners.
They are projects which are split into a number of code tabs, each of which can run on its own, and each of which adds something to the project, with explanations and comments. You can play with the code in each tab and then run it. When you run it, a slider at the left lets you choose which tab to run.
The first project is a lunar lander, created by @West (as a step by step project). I have modified it for use in a school context, and added a couple of extra levels to make it more challenging.
one of the first games I wrote was a Lander game. This is a great project to teach with, since you can progress from simple, sprite and block style graphics to 2D meshes, trigonometric functions, and collision detection.
If you can write a fully capable Lander game, you can write nearly any 2D action game that you can think of.
Nice updates @Ignatz - you need to update the displayed text for step 14 but otherwise like the extra steps and revised presentation
I have two more like this, that I’ll share soon
@Ignatz How do i run the steps seperatly?
Edit: Nevermind, didn’t look at the code, looks like Ignatz changed it from the original?
Nope, that’s not how you run them. Just use the selector parameter at upper left to switch code tabs while running.
@West & @Ignatz, this is one of the greatest projects I’ve seen for Codea! ^:)^
Many thanks and congratulations! =D>
Thank you, West did most of the work.
I have a few more now. Here is one that introduces some physics.
As ith the other one, the slider parameter lets you choose which tab to run
@Ignatz i dont have the parameter…
Silly me, uploaded the wrong version, sorry… Try it again
Hi @Ignatz. I tried to load your (lunar lander) tutorial into Codea but couldn’t find the “Paste into Project” command. I thought a long press on the “+ Add New Project” box on Codea’s front page was supposed to show it but nothing pops up. I tried copying an existing project’s tab (as a test), then went out and long-pressed “Add New Project” but that didn’t activate it either. What’s required to show the hidden command?
On a different note, I took a look at the code at the very top of the lunar lander project where you set up the tabs for use with parameters and was curious why you decided to use “loadstring”. It seems like a rather obscure way to set it up.
To show it I think the code needs to have the
--# Main Markings. This lets it know what to put in what tab.
The long press works for me on both the projects above…make sure you select everything.
The reason for using loadstring was simply so I could use a loop to create an array of code table names.
@Ignatz nice demos. There is a bug in the simple platform game. If you cycle through the demos then the invisible wall is in the wrong place - I’ve not looked at the code but suspect you are using the WIDTH parameter as a call when the screen has the parameter sidebar then when you expand to FULLSCREEN it still has old WIDTH value. If you jump back to the code then relaunch all is fine (as current demo=6 is retained)