5 ms·
Show HN: My first Open Source project -- Teaching my son Lua
- shawndumas 15y agoA Lua Text Adventure Engine: Having settled on lua as a first 'real' programming language to teach my son I created a text adventure engine for him to code up some games. (He had a blast with MIT's Scratch and Lego's MindStorms.) There are two complete, albeit short, examples for him / you to get started with. I am learning Lua as well and so far I love it. Since I am a beginner to Lua I am certain that I am not coding idiomatically; any suggestions are welcome.
- Kototama 15y agoHow old is your son?
- shawndumas 15y ago10; His eyes where glazing over when I was talking about abstract concepts. He really liked Scratch because it was immediately available; very audio-visual. Once I got one complete adventure written he was excited to do the second with me. Now hopefully he'll take one from cradle to grave with only oversight from me.
- dividuum 15y agoYou might have a look at two projects of mine related to gaming and lua: http://geolua.com/ http://geolua.com/ - Allows you to develop mobile games for the browser using lua. http://geolua.com/adventure/all-widgets-demo-132 http://geolua.com/adventure/all-widgets-demo-132 shows a basic example. http://github.com/dividuum/infon http://github.com/dividuum/infon - A multiplayer game where players control ant-like creatures using lua. They fight, evolve and compete for food. https://github.com/dividuum/infon/tree/master/contrib/bots https://github.com/dividuum/infon/tree/master/contrib/bots has some example code.
- shawndumas 15y agoI will totally be checking them out. Thank you.
- dividuum 15y agoFeel free to contact me (email in profile) if you have any questions.
- shawndumas 15y agoWill do. Thanks again!
- leke 15y agoI have an 8 year old, who is video game crazy. Lua is a tidy little language which I had a hard time deciding it against python and javascript. The Löve 2D game engine for Lua eventually settled it for me.
- shawndumas 15y agoFor me it was Codea and iLuaBox. My son was stoked to know that he will soon be getting an iPad.
- shawndumas 15y agoBTW: I also made a little game to check out Codea -- https://gist.github.com/gists/2762088/ https://gist.github.com/gists/2762088/
- laacz 15y agoI'm sorry, if this is off topic, but is it common to put your project files into version control system? I'm talking about .sublime-project and .sublime-workspace.
- shawndumas 15y agoDon't rightly know. I did it because I work on the project from multiple computers using SublimeText and found it convenient.
- xxiao 15y agoI chose python and html/css/javascript for my kid, who is 9, the python game book got him started and now I was challenged at dinner table by various Python module questions... first thing after he started html, is: why can't html have if-else?
- creamyhorror 15y agoThat's where the embedded Ruby or AngularJS comes in... :)
- cschmidt 15y agoWhich python game book? This one... http://inventwithpython.com/ http://inventwithpython.com/ or some of the others. I'm thinking of doing the same with my son this summer.
- xxiao 15y agoyes it's this one, I bought one for him so he can read anywhere he wants to, this is a great book for his age.
- shawndumas 15y agoJavaScript/HTML/CSS is the eventual target. Lua is like JS-the-good-parts with better syntax, TCO and coroutines. My guess is he'll hate the transition for awhile but will have a lot of great habits and concepts that will really serve him well in JS.
- christianbryant 15y agoMy daughter's almost 5 but she's shown a strong interest in programming from early on. I had an XO for a time, and she was absorbed with Turtle from the get-go. Still a little young, I think, for Lua but your experience has got me thinking about it. Cheers.
- shawndumas 14y agoI added a Getting Started [1] page to the GitHub wiki and I included a very simple example adventure [2]. ---- [1]: https://github.com/shawndumas/adventure.lua/wiki/Getting-Started https://github.com/shawndumas/adventure.lua/wiki/Getting-Sta... [2]: https://github.com/shawndumas/adventure.lua/blob/master/xampleLand.lua https://github.com/shawndumas/adventure.lua/blob/master/xamp...