Codakido, Lua/SDL programming environment for Kids, with C64-alike editor
github.com
github.com
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.
Now that the editor is included it's even more awesome :)
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.
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 .. ;)
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).
Thanks for the suggestions!
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. :)
I don't want to add completion as IMHO does not help learning.
Btw., I assume you know LOEVE? https://love2d.org/ Is is very similar, though the target audience is not kids. :)
Personally, I think time would be well spent making a kids-friendly version of LOEVE (and ofc, porting LOEVE to Android/iOs, finally).
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).
Also, try 'z' and 'p'.
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.
EDIT: just wanted to add, it works fabulously on my Open Pandora console as well!
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?
http://boards.openpandora.org/index.php?/topic/7405-here-is-...
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..)
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.
(For when those kids grow up a little more, perhaps..)
No seriously, are you implying that
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)
example: http://lua-alchemy.googlecode.com/svn/trunk/demo/index.html
as3.class.mx.controls.Label.new()
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.
If the kids are going to share their creations, they need to run in the browser, without requiring installations, app stores, and so on.
As much as it sucks, Flash did have the one big advantage of being ubiquitous. That's no longer the case.
Have you ever tried to write some code without a real keyboard? It is a big pain.