Story image

Microsoft teaches kids to code for Minecraft

Article by Peli de Halleux, Microsoft principal RSDE

A few years ago, my group in Microsoft’s research organization began to experiment with tools that make it possible for kids to learn how to code in the context of Minecraft, the wildly popular game where players build fantastical virtual worlds out of digital blocks, create and play mini-games within the game, and learn to survive monster-filled nights.

Confused? That’s okay. Many grown-ups don’t understand Minecraft. Even if they think they do, they don’t. That no rules, open-world environment is all part of its appeal. Our goal is to leverage this enthusiasm to teach kids how to code while playing Minecraft. After all, game playing is the most natural way for humans to learn.

The research is an outgrowth of our TouchDevelop program, which we started in 2011 to teach people how to program and build apps using the touchscreen on their phones. These devices are much more powerful, graphic and sensor-rich computers than those we learned to code on as kids. Our TouchDevelop group wanted anyone to be able to program their phones as easily as we did 8-bit computers.

Then Minecraft emerged as the game people everywhere were playing and we found ourselves wanting to code inside Minecraft, too. The rest, as they say, is history.

Students in my after-school computer science classes lucky enough to tinker with coding in Minecraft went nutso crazy, in a good way. The ability to write code and immediately see the results in Minecraft, such as avatars that can jump 100 blocks high, dig through mountains and make it rain chickens, sent my students running around the classroom from screen to screen to see what their classmates did and shouting the IP addresses of their servers across the room.

Today, our Microsoft Research and Microsoft MakeCode teams are excited to make this learning experience widely available through Microsoft MakeCode for Minecraft on Windows 10.

The MakeCode for Minecraft editor has the pixelated look and feel of Minecraft. MakeCode allows coding with visual blocks, based on a drag and drop interface for beginners, as well as in text with a JavaScript interface for the more experienced learners.

Coding with blocks or text, MakeCode teaches the 101 of programming languages, including variables, control flow, if statements, loops and functions. More advanced users smoothly ramp up to more complex concepts such as recursion, fractals and object-oriented or distributed programming.

The Microsoft MakeCode team also works on other editors that allow the programming of physical things such as micro-controllers including the micro:bit and Adafruit Circuit Playground Express. In all these scenarios, the coding is directly linked to building something real, which is the primary reason most computer programmers learn to code in the first place.

Instead of thinking they are coding, students are playing a game, they are building their next superpower. Minecraft is a game. MakeCode for Minecraft fits the coding experience into the game itself.

Article by Peli de Halleux, Microsoft principal RSDE

Royole's FlexPai: So bendable phablets are a reality now
A US-based firm called Royole is delivering on that age-old problem of not being able to fold up your devices (who hasn't ever wished they could fold their phone up...)
Hands-on review: Having fun in Knowledge is Power: Decades and Chimparty
They don’t revolutionise social video gaming, but they are enjoyable enough to occupy you during a wet weekend. 
Kiwis losing $24.7mil to scam calls every year
The losses are almost five times higher compared to the same period last year, from reported losses alone.
Tile's Mate & Pro Bluetooth trackers land in NZ
If your car keys (or your tablet) have disappeared into the void at the back of the couch or if you left them somewhere in your car, retracing your steps to find them could be a thing of the past.
Government still stuck in the past? Not on GovTech's watch
What exactly is GovTech and what’s been happening in our capital city?
"Is this for real?" The reality of fraud against New Zealanders
Is this for real? More often than not these days it can be hard to tell, and it’s okay to be a bit suspicious, especially when it comes to fraud.
Hands-on review: The iPhone Xs
The iPhone Xs is a win that brought numerous new and exciting features to the market.
How much does your Amazon Prime Video subscription really get you?
For our NZ$8.90 per month, the average cost per title is US$0.00126 - but we only really get a choice of 416 TV shows and 4321 movies. Choice is a little bit limited compared to other countries.