News for hackers. Stuff that matters.
Re:Show HN: My first Open Source project -- Teaching my son Lua by shawndumas on Monday May 21, 2012 @06:29AM (#4002156)
A 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.

Re:Show HN: My first Open Source project -- Teaching my son Lua by dividuum on Monday May 21, 2012 @08:21AM (#4002485)
You might have a look at two projects of mine related to gaming and lua:

http://geolua.com/ - Allows you to develop mobile games for the browser using lua. http://geolua.com/adventure/all-widgets-demo-132 shows a basic example.

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 has some example code.

Re:Show HN: My first Open Source project -- Teaching my son Lua by shawndumas on Monday May 21, 2012 @08:30AM (#4002506)
I will totally be checking them out. Thank you.
Re:Show HN: My first Open Source project -- Teaching my son Lua by dividuum on Monday May 21, 2012 @08:34AM (#4002517)
Feel free to contact me (email in profile) if you have any questions.
Re:Show HN: My first Open Source project -- Teaching my son Lua by shawndumas on Monday May 21, 2012 @08:35AM (#4002523)
Will do. Thanks again!
Re:Show HN: My first Open Source project -- Teaching my son Lua by Kototama on Monday May 21, 2012 @07:33AM (#4002318)
How old is your son?
Re:Show HN: My first Open Source project -- Teaching my son Lua by shawndumas on Monday May 21, 2012 @07:37AM (#4002331)
10; 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.

Re:Show HN: My first Open Source project -- Teaching my son Lua by christianbryant on Monday May 21, 2012 @01:01PM (#4003746)
My 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.
Re:Show HN: My first Open Source project -- Teaching my son Lua by leke on Monday May 21, 2012 @07:44AM (#4002364)
I 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.
Re:Show HN: My first Open Source project -- Teaching my son Lua by shawndumas on Monday May 21, 2012 @07:56AM (#4002398)
For me it was Codea and iLuaBox. My son was stoked to know that he will soon be getting an iPad.
Re:Show HN: My first Open Source project -- Teaching my son Lua by shawndumas on Monday May 21, 2012 @08:23AM (#4002496)
BTW: I also made a little game to check out Codea -- https://gist.github.com/gists/2762088/
Re:Show HN: My first Open Source project -- Teaching my son Lua by shawndumas on Tuesday May 22, 2012 @04:04PM (#4009684)
I 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-Sta...

[2]: https://github.com/shawndumas/adventure.lua/blob/master/xamp...

Re:Show HN: My first Open Source project -- Teaching my son Lua by laacz on Monday May 21, 2012 @08:00AM (#4002414)
I'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.
Re:Show HN: My first Open Source project -- Teaching my son Lua by shawndumas on Monday May 21, 2012 @08:02AM (#4002421)
Don't rightly know. I did it because I work on the project from multiple computers using SublimeText and found it convenient.
Re:Show HN: My first Open Source project -- Teaching my son Lua by xxiao on Monday May 21, 2012 @10:09AM (#4002897)
I 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?

Re:Show HN: My first Open Source project -- Teaching my son Lua by shawndumas on Monday May 21, 2012 @11:52AM (#4003404)
JavaScript/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.

Re:Show HN: My first Open Source project -- Teaching my son Lua by cschmidt on Monday May 21, 2012 @11:27AM (#4003275)
Which python game book? This one...

http://inventwithpython.com/

or some of the others. I'm thinking of doing the same with my son this summer.

Re:Show HN: My first Open Source project -- Teaching my son Lua by xxiao on Monday May 21, 2012 @11:58AM (#4003435)
yes 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.
Re:Show HN: My first Open Source project -- Teaching my son Lua by creamyhorror on Monday May 21, 2012 @11:01AM (#4003138)
That's where the embedded Ruby or AngularJS comes in... :)