Tutorials for Kids

I’m making a 2D split screen Shooter 1v1

Maybe for your kids making a 2D Racing Game in Scratch is the best way to go since I’m 11 and started nearly 2 years ago on scratch I think that’s the way to start if they need something more advanced try a Flappy Bird Type Game.

Do you know any good lua toutorials B)

You could Check Out @Ignatz 's Blogs!

I wrote an ebook on Lua and also for one for Codea, specifically for Codea users, see the index page on my blog.

StarlordJJ is one of my boys. He’s excited to start coding in Codea! I’m going to introduce him to ignatz and dave’s amazing blogs, and will be handing over our joystick and hero classes once I have them organized in an understandable fashion for him. He’s 9 and quite precocious! His brother is RocketNate - also 9, and will be joining us in the fun!

@interactivenyc Try Explain to Him some of the examples on codea

I would probably start with simple touches (or tilting) as controls, and introduce joysticks later, ie crawling before walking. But you know your kids best.

We are always happy to help if needed.

@interactivenyc I think it’s awesome that your getting your kids into programming. One thing that always puzzles me is why so early on a lot of people when programming games on touchscreen devices want to recreate a joystick. Why go through all this effort to recreate a physical device when you have an amazing touchscreen which can do so much more? I’m guessing you will have grown up with physical joysticks but the chances are a 9 year old won’t have (my 4 year old gets confused as to why my older laptop doesn’t respond to touches on the screen!)

My advice would be start with a simple game framework that you can give them and let them add bits to, whether that’s custom graphics (either importing hand crafted images from an art package,taking photos of hand drawn images from the real world, or even importing and cropping from real photos if drawing isn’t their thing) or additional baddies, or customising elements - e.g selecting different colours for objects. I’ve put together a few step-by-step tutorials aimed aut absolute beginners which might be of interest (snake, lander, asteroids are on the wiki https://bitbucket.org/TwoLivesLeft/core/wiki/Step%20by%20step%20projects and I’ve a number of other simple games - missile command, space invaders, endless runner on GitHub as well https://gist.github.com/Westenburg)

I also understand that you’re pretty experienced and are looking to find your feet with Codea and so the joystick is a good entry point for you - it just might not be the best entry point for your kids…

Hopefully this hasn’t come across as negative, because I applaud what you’re doing - just maybe as some food for thought - bottom line is you know what works for your kids.

…and you won’t go wrong with @ignatz stuff - it’s great!

I agree with West. I’ve tried programming all sorts of stuff in Codea, and joysticks are the most cumbersome both to play and program. Touching, swiping, and tilting the iPad, are much simpler and more fun, IMHO.

In the wiki link above, you should find a link to some “step by step” projects. These start with a very simple game, and in a series of code tabs, add more features with explanations. This makes learning much easier.

West, thanks! Points well taken. I’m looking at Noob Lander - what’s the best way to get this stuff into a Codea project? I’m not exactly sure how your “tabs” are supposed to work…

Thanks for sharing - I’ll definitely run through some of these with my kids.

I started creating a super simple tutorial on classes for my kids called Animals. Dog and Cat inherit from Animal. They will eat and make sounds at first - really simple stuff.

I just invested the $15 for Working Copy, and put my initial code up on GitHub here:

https://github.com/interactivenyc/Animals

This should make it easy for us to share code, right? Can somebody try to see if they can download my repository easily and open it up in Codea?

TIA!

Steve

BTW: My Animals project features ZERO joysticks :wink:

I was just able to open my project from GitHub through Working Copy, but it didn’t preserve the Classes as separate files - it all came in one paste into the Main file. It’s a start, but less than thrilling. I wonder if I didn’t already have the cat.png and the dog.png in my library, if they would come along with the Codea paste information.

It kind of looks like the bitmap graphics come along with the paste information, but it’s unclear to me how that works. When I type sprite() and click the parens, I don’t see the images in my graphics browser, yet somehow they appear when I run the code. Mysterious! Curious to hear how this works for other people…

Do people here ever use Google Hangouts to discuss things face to face? It would be nice to meet some of you and have a conversation - transfer some knowledge quickly, and exchange niceties :slight_smile:

I understand if people prefer to stick to the forums - just thought I’d ask to see what y’all think. I see Australia is 14 hours ahead - my evening is your afternoon.

@interactivenyc - I’m happy to skype or “hang out” if it helps, at any reasonable Perth time (I am retired, so any time except the middle of the night is ok). I’ve PM’d you my skype address, for a start.

To copy code in a way that it can be pasted back into separate tabs, press on the project icon, from the main Codea page with the list of projects, choose Export, then Copy Project Code. This copies all the code in all the tabs in one long string, but if you examine it, you’ll see each tab is preceded by a line with the tab name, starting with #.

To paste this code back into Codea, into the correct tabs, press Add New Project, and hold it down until you get “paste into new project”, which will break the code into separate tabs. Yes, I know, why is this essential trick not documented in the reference? Don’t ask me.

I usually save my code to a gist rather than Github (and share a link to it), because it is easy to transfer the code to and fro using the approach above.

wrt images and other assets, Codea can only use the files in your Dropbox (if synchronised) and Documents folders. To share the assets with other people so they can run your Codea project, you need to make the files available to them for them to download manually, or else include code that will automatically download and save them from an internet site, if they are missing. I have a post about this on my blog.

If you create an iOS app, your image and sound assets should be transferred to Xcode along with your code, but that’s beyond my knowledge, because I don’t make finished apps.

@interactivenyc when pasting from WorkingCopy to Codea, do a long-press on the + New Project button in Codea and select “paste into project”. That will split the file into tabs. If the repo contains the Info.plist that Codea exports, then the tabs will even be in the right order.

I started lua when I was 8. Now I’m making a game that has gone pretty well in 2 weeks. It was a slight bit hard to learn, but it was still a fun challenge. I think anyone can code as long as they try to do stuff instead of putting it off.

Awesome! I’d love to see what you’re working on.

Working Copy is great! I’ve been able to go to repositories and gists on GitHub, and click the download as zip button, importing that into Working Copy as a new repository, and then opening from there into Codea. Pretty decent workflow - brings in all the tabs intact. I wish it would bring in the graphics files into the project. I was able to test my Animals project that is set up as a file repository in GitHub with separate Lua files and the graphics as PNG files, but importing that into Codea doesn’t bring in the PNGs. You can try it yourself here:

https://github.com/interactivenyc/Animals

West - your tutorials are very nice. I’m looking at Noob Lander and Physics right now. I tried to load Asteroids, but am getting an error with setfenv - “attempt to call a nil value (global setfenv)” - but it’s weird. The errors show up in every tab, except the Main tab where the setfenv call is actually happening. Might you be willing to take a look? I’d certainly like to try out Asteroids, but I can’t figure out how to fix that error myself… It’s a weird case.

Thanks for all the help!

-steve

The problem may be a change in Lua, see this post and search for the post containing “New localise function”

https://codea.io/talk/discussion/6330/codea-2-3-lua-5-3/p1

Hey Ignatz - My son starlordjj just did your first tutorial, and he said it was fantastic!