6 ms·
Codakido, Lua/SDL programming environment for Kids, with C64-alike editor
- antirez 15y agoHi HN! 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.
- badboy 15y agoI really like the idea and the code is just great. I had fun by just reading the C code and experimenting a bit. Now that the editor is included it's even more awesome :)
- antirez 15y agoThanks 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.
- gaius 15y agoThis 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!
- cturner 15y agoThe 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.
- antirez 15y agoI agree, I want to add low level things like POKE to write to the screen memory. Sound would also be awesome.
- mhd 15y agoSprites are quite fun to move around, even if you're not doing it in a more interactive fashion (like Logo).
- seclorum 15y agoI 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.
- seclorum 15y agoI 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! :)
- owlpic 15y agoHas potential on the Raspberry Pi.
- antirez 15y agoThat'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.
- asb 15y agoHi Salvatore. I'll run it on my alpha board this evening and let you know how it currently performs.
- antirez 15y agoThat's awesome asb, thanks!
- seclorum 15y agoWorks great on my Beagleboard already! 10 points to you for using SDL and making it build so cleanly .. EDIT: just wanted to add, it works fabulously on my Open Pandora console as well!
- antirez 15y agoGreat :) Thanks you for testing it. Probably adding full screen support makes sense at this point.
- seclorum 15y agoQuite easy to do! :) 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?
- tluyben2 15y agoVery nicely done!
- Zhiz0id 15y agoFrom user point of view using flash as GUI is a better idea. http://code.google.com/p/lua-alchemy/ http://code.google.com/p/lua-alchemy/ example: http://lua-alchemy.googlecode.com/svn/trunk/demo/index.html http://lua-alchemy.googlecode.com/svn/trunk/demo/index.html
- perfunctory 15y agoI'm worried I won't be able to explain to my kid this part: as3.class.mx.controls.Label.new()
- Zhiz0id 15y agoI'm talking about GUI/Editor and library that helps to use lua in a browser. circles/lines/... functions must be coded on lua or as3
- Turing_Machine 15y agoI disagree. 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.
- noonat 15y agoIncorrect. 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.
- Turing_Machine 15y agoApples and oranges. The example to which I was responding shows it running in a browser. 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.
- beza1e1 15y agoReinventing Smalltalk? Nice job.
- klez 15y agoY U NO READ THE README??? 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)
- GeneralMaximus 15y agoOfftopic, 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.
- klez 15y agoTIL
- prof_hobart 15y agoI've been playing around with Scratch (http://scratch.mit.edu/ http://scratch.mit.edu/) and its slightly extended version BYOB (http://byob.berkeley.edu/ http://byob.berkeley.edu/) over the past couple of days. 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 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).
- bob_kelso 15y agoThat'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. Also, try 'z' and 'p'.
- prof_hobart 15y agoIt'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.
- Zuider 15y agoYou may be interested in the Panther project, a modification of Scratch, which adds among other things the ability to clone and delete sprites. (http://pantherprogramming.weebly.com/ http://pantherprogramming.weebly.com/)
- virtualritz 15y agoReally nice! 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. :)
- antirez 15y agoFor now it's just a start ;) Soon I'll add more features into the editor to make it more user friendly indeed. I don't want to add completion as IMHO does not help learning.
- virtualritz 15y agoCool. :) Btw., I assume you know LOEVE? https://love2d.org/ 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).
- seclorum 15y agoIf you like this, you'll love MOAI: http://getmoai.com/ http://getmoai.com/ (For when those kids grow up a little more, perhaps..)
- api 15y agoIf 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.
- antirez 15y agoGood point, I think I'll rename it, and extend it enough to make it more interesting than just drawing a few circles ;) good suggestion thanks.
- seclorum 15y agoAs 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/ 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 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 .. ;)
- antirez 15y agoGreat 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). Thanks for the suggestions!
- eterps 15y agoThe project has moved here: https://github.com/antirez/load81.git https://github.com/antirez/load81.git
- antirez 15y agoProject renamed as "Load81", so unfortunately now the link is broken. If an admin could fix this it would be great.