this is the result of two days of hacking during the weekend, the obvious inspiration is Codea. I and my son have fun with Codea but we can't use it often (we don't have an iPad at home), so I wrote this code. Later I realized that using an external editor was not working so I added a retro-computing alike editor, and now it is much easier for kids to modify and execute the program.
Everything is currently very work in progress, I hope I'll find more time to invest into this project, but even more I hope to get pull requests by interested parents that have children and are interested into teaching some programming.
EDIT: since I used most of the time hacking on the code I was not able to add some decent example. Please if you write some nice one drop me an email, pull request, whatever.
Thanks badboy! The editor was definitely the most fun part to write (but it need more love, there are a few bugs). Since the whole editor only uses setPixel() as basic primitive it will work the same in different operating systems that can be a good point. Probably could be easily extrapolated to be used into games for the same reasons.
If you want kids to use it, do not call it Codakido. Call it something that sounds interesting, and do interesting things with it. Kids don't want to be kids. Kids want to be kids getting ready to be adults. This is essentially instinctive. Things that are "for kids" are things that are labeled as things kids need to transcend, not things they need to grow into.
I learned on a C64, and was inspired by C64 demo-scene demos and the fact that the C64 was used for industrial process control. I started at age five.
As a rabid fan of your project, some things I think it needs:
a) cloud storage - somewhere to stash Lua scripts and retrieve them for playback (See moai cloud for inspiration: http://getmoai.com/)
b) sound synthesis - not just .WAV playback, but real synthesis using a small but happy engine. (See sfxr for inspiration: http://www.drpetter.se/project_sfxr.html)
c) some sort of network/multiplayer integration - again, with the cloud, it'd be nice to be able to push messages out to a queue and get messages back
d) 3D primitives .. ermm .. maybe this is going a bit too far. Okay, instead of 3D, how about some .png loading and basic sprites management?
Actually, I guess I'm describing MOAI at this point, but yeah .. you're definitely on the right track! Maybe I should go pester the MOAI guys about making a code-editing IDE for MOAI, in MOAI .. ;)
Great stuff! And most are already in my TODO list indeed...
The next weekend I'll hack on it a lot again to bring a few of this features.
But I would add another one:
e) Ability to write some kind of assembler or other low-level stuff interleaved with Lua, so that's possible to also do as-fast-as-ASM computations if needed.
I guess this should be a layer translating something like Z80 assembler into x86 code. You call Lua with a string containing the program, it gets translated, and executed. I guess it should not be entirely impossible to provide something that also compiles to something safe (that can't crash the Load81).
Inline Assembly, eh? Hmm.. not sure I can get behind that one, given that I've mostly been running codakido on my ARM machines .. but I can certainly understand the desire.
For my purposes, Lua has been quite performant enough!
Well, anyway maybe its time I added some of these features (can't stop thinking about the synth feature!) and do a pull request ..
But I do not get the C64 editor look stuff.
I mean why not add syntax highlighting and make this more eye friendly (neither requires abandoning a cute color scheme)?
I never had a C64, I saved 2 years so I could afford a 286, I used GWBASIC and, soon after, TurboC++. Neither had syntax highlighting. I don't think it helps kids who are getting into programming if the looks of these dev environment were regurgitated either. :)
It's simple enough that after an afternoon of basic instruction, my 5 year old managed to create this entirely on her own while I was cooking dinner - http://scratch.mit.edu/projects/hobart/2372941 (try pressing various keys - I know that "g", space, "8", "m", up arrow and the green flag all do something, but there may be more in there as well).
Congratulations, that's excellent! I'll have to show this to my daughter. She wants to make her own Hello Kitty game since she's been watching her older brother (8) making games on Scratch :) Its an excellent platform for learning the basics of programming. I was worried that my son wouldn't have the patience to work with Scratch since he sees what's on Wii and XBox and that has set his expectation level. But fortunately he's become very excited by Scratch and can build games with very little or no guidance from me now, w00t!
Thanks. I was expecting my daughter to get bored quickly as well. But having watched her, it strikes me as a software version of Lego - you'll never create a toy/game as good as one you could buy in the shops, but the real fun is the fact that you can create pretty much anything your imagination can come up with.
That's amazing! I would have loved something like this when I was growing up. If you can do that simple games would be no problem, and who doesn't dream of making their own games.
It's absolutely brilliant for kids - and it seems to be avaialble on Linux, so should be runnable on Raspberry Pi - which could be great for the classroom. It's so easy to add new little bits of functionality and see them in action that she never got bored whilst I was showing her the basics - in fact it seems to be her new favourite app at the moment. I can't recommend it highly enough as a first step programming educational tool (the reason I was first looking at it was because my wife's a teacher and was looking at a good app to teach programming to 10 year olds).
It's certainly possible to write very simple games. The tutorial I gave my daughter was a (very clunky) Space Invaders clone, and I'm going to have a go at something a little more advanced tonight - I've got to make sure she doesn't start overtaking me...
The one place it seems to fall down a little is managing multiple identical sprites - I looked at a rather more professional-looking Space Invaders that someone else had written and it looks like they needed a separate sprite with full code behind it for every single alien, although it looks like BYOB may address some of this.
That's my target, I hope that when the Raspberry PI will be available enough, Codakido will be functional enough to be a good alternative to the BBC micro BASIC.
I like the choice of Lua and SDL, not only as a modern LOGO/BASIC alternative. I think it can go much further.
I guess as a minimum you want the editor to function to the level of notepad/pico/nano, and then perhaps have helpers with regards to indenting, and after that error marking similar to that of QBASIC, and after that syntax highlighting.
Added fullscreen support and wrapped it in a launcher for file selection, courtesy of PickleLauncher (helpful utility for precisely this sort of thing in the Open Pandora scene..)
BTW, I wanted to say that I think that Lua as a first-programming-language for kids is a great idea! So much easier to explain a Lua table to someone than types and so on .. And quite performant, in the end, eh? I've been using MOAI for cross-platform game development, and now your little project is going to get some love in the homebrew sense, too .. what about adding sound at some point?
Appears to be painfully sluggish under X (Raspberry Pi doesn't yet have graphics acceleration there, totally not your fault). Somewhat better under SDL on the framebuffer, but I keyboard input doesn't seem to be working there. I only gave this a really quick go and it's on a wheezy rootfs I prepared, but running a rather old version of the RPi kernel. I'll delve into it in more detail later in the week.
I'm also hoping to port this to the rPI: http://www.specbas.co.uk which is Sinclair BASIC for modern PCs... Seems the PI is going to be spoilt for choice :)
This is exactly what I have been talking about! The way to get kids into programming is exactly the same way we all got into it: the 8-bit micro experience. Top marks!
I agree completely, which is why I have carefully curated my collection of computers over the years, to keep them functioning until the day my sons are ready to code. I've still got my Oric-1 (and now, an Atmos) with all accessories, in fully working order, ready to roll! :)
The language here is lua, a structured language, rather than a thin instruction layer over hardware. If it more of an API behind it (e.g. ability to work with sound at a low level) then the result could be better.
I think for sound it would be nice to have a little synthesizer where you can specify attack/decay/sustain/release, oscillator type, frequency and so on .. sort of like the SOUND command in the old 8-bit computers, even.
a) you consider small talk a language for kids
or
b) this is a complete and dynamic development environment with live debugging etc.?
I wish the OP best luck with the second, but I think he's not quite there (nor he needs to be, since the very nature of this project seems completely different from, say, squeak)
Offtopic, but Smalltalk was in fact meant to be kid-friendly. Modern Smalltalks are different beasts, though, with all their enterprisey bullcrap. Squeak is an attempt to correct that.
Flash won't work on iOS or (soon) any new Android device, nor will it work in the default browser on Windows 8. Despite what Adobe may say in public, I expect Flash to be completely dead (except possibly for maintenance/security updates) by this time next year.
Incorrect. The Adobe AIR SDK allows you to package Flash content as native apps for both iOS and Android. Adobe only halted development on the browser plugin for Android.
this is the result of two days of hacking during the weekend, the obvious inspiration is Codea. I and my son have fun with Codea but we can't use it often (we don't have an iPad at home), so I wrote this code. Later I realized that using an external editor was not working so I added a retro-computing alike editor, and now it is much easier for kids to modify and execute the program.
Everything is currently very work in progress, I hope I'll find more time to invest into this project, but even more I hope to get pull requests by interested parents that have children and are interested into teaching some programming.
EDIT: since I used most of the time hacking on the code I was not able to add some decent example. Please if you write some nice one drop me an email, pull request, whatever.