Coding with Minecraft

I feel like I struck nerd-parent gold with CC: Tweaked, a mod that adds programmable computers, turtles and a bunch more to Minecraft, all controlled using the Lua programming language.

It began with Coding with Minecraft that I picked up from the local library to see if E might be keen and ready to get into programming during the holidays.

The entire programming interface is in Minecraft itself. Coding is performed on “turtle” character. There’s a really basic shell, a file system, a full blown Lua interpreter, and a simple editor to get the edit-run cycle going.

We’ve been working through the chapters, E’s been copying code out of the book, getting it to work, then adding his own tweaks and modifications with some assistance.

Here’s one of the first programs he copied and extended (“Farmer” is the name of his turtle). Printing messages, taking input, concatenating strings to form responses and doing a little math at the end.

It was really nice to share in his excitement when he got the program to run exactly as he wanted after multiple edits and tries. *proud dad moment* Next, we’ll be getting into using for loops to make the turtle dance.

Also, Lua is actually pretty nice as a first programming language 😄.

One Reply to “Coding with Minecraft”

Comments are closed.