I’m just getting into Codea with my twin 9 year old boys. I’m searching for one good project for them to get started with, in tutorial form. I’m thinking a spaceship that flies and shoots baddies out of the sky or something simple like that. We did the For Kids tutorial, and it went well, and we’re looking for the next step.
I see there are tons of documents and videos out there, but I haven’t found anything that feels right yet. I ask the community here - can you suggest something for me?
I’m a programmer myself, and work for a kids education company called Speakaboos. Thanks in advance for any advice you have to share!
Have you looked at the
Wiki link at the top of the forum. There’s a section
Codea for kids.
@interactivenyc - hi. Great as Codea is, I don’t think it’s for such young kids, because although it’s the easiest way to program iOS graphics, it’s still a programming language, and they need to learn Lua before they can really use Codea, which it may be too difficult for young children - unless they are very keen. We have had 11 year olds successfully learning Codea, but I think they are the exception rather than the rule.
I don’t know how keen your kids are, but I would probably suggest starting with more of a drag and drop app, eg an RPG builder, to get the hang of programming flow, and then introduce them to to full on programming later.
There are a number of step by step projects in the wiki, here
Unfortunately, I fear you’re not going to find anything terribly organised to help you, because Codea was built by a small team, and the user group, although enthusiastic and friendly, is also fairly small.
If you want to try it anyway, I suggest you pre-build simple projects, then get them to replicate what you have done. Simple 2D moving objects can be programmed pretty easily, and the physics engine will add collisions and bounces for you.
Anyway, don’t let me put you off. You’re in the best position to judge what will work best.
Thanks for your thoughtful comments! My kids are pretty sharp, but I agree with you that many of the concepts are pretty hard for them. However, we’re going to keep plugging away for a while to see if we can learn even a little coding
I’m happy to report back with my results. Perhaps I’ll make a tutorial of my own to share with others.
I’m thinking, right now I want to create a joystick to control a character on the screen. I’ll draw an ellipse on touched, and determine in the touch state if the finger is to the left or the right of the original touch point to control left and right movement. Wish me luck!
That’s cool. Is there a way I can see that code in action? Can I open a sample program with your joystick in it?
I’ve gotten a start on mine - right now, it’s just left/right motion, but the circle will position itself anywhere you begin an initial tap. I like the circle inside a circle you’ve got to determine a vector for movement. Me want 2 borrow!
Seems like Gist is a good way to share complete code files:
Here’s my very raw start:
I’m having trouble trying to make a variable in my JoystickLeft class a class variable, rather than a global variable by calling it self.visible. I’m getting an error when trying to do this. Can somebody tell me what I’m doing wrong?
Here’s where I’m trying to do this in the code:
And here’s the error I’m seeing:
Thanks in advance! I’ll check out some Lua documentation in the meantime
Maybe Try Hopscotch Or Scratch
I got into coding on scratch age 10 so maybe they can use that
Thanks! We’ve learned some Scratch and want to move to something a little more code oriented. Maybe we’ll try Hopscotch!
Looks like my Dropbox screenshot links aren’t appearing properly. Oh well… Need to find a better way to share graphics from my iPad.
This seems like an active community. I appreciate the feedback tons!
Here is something @dave1707 made and I modded it has two but I’m sure you can mod it back to one if not I can do it for you
@interactivenyc You can also upload images directly from your iPad to the forum like this ( I just Used my clash of clans screenshot )
It looks like that’s not working either
Let’s try this - here’s where I changed my variable visible to self.visible:
And here’s the error I’m seeing:
I updated my code here:
Now I have a joystick with a dot in the center that represents the direction my CharacterSprite is supposed to be moving.
I’ve got functions moveLeft and moveRight inside CharacterSprite, which is a global variable called “character” in my Main class. Inside my JoystickLeft class I’m trying to call character.moveLeft with no luck. I think I need some basic help here with syntax and how classes call each other’s methods.
Anyone willing to look and give me some guidance, and I’ll keep publishing my code so others can use it? Is this a good way to collaborate, or is there a better way to share entire Codea projects?
Sorry I forgot to click paste here is the joystick @interactivenyc
background(40, 40, 50)
if s1 then
if s2 then
if t.state==BEGAN then
if s1==nil and t.y > 50 and t.y < 150 and t.x > 50 and t.x < 150 then
elseif s2==nil and t.y > 875 and t.y < 965 and t.x > 615 and t.x < 715 then
if t.state==MOVING then
if s1~=nil and t.id==s1.id and t.y < HEIGHT/2 then
if s2~=nil and t.id==s2.id and t.y > HEIGHT/2 then
if t.state==ENDED then
if s1~=nil and s1.id==t.id then
if s2~=nil and s2.id==t.id then
fill(255, 255, 255, 255)
if self.y>HEIGHT/2 then
that’s cool! I copied and pasted the code into a new project, and I see it working. very nice. thanks!
Is that part of a bigger project? I’d be curious to see how you implement your joystick.