GameSpot may receive revenue from affiliate and advertising partnerships for sharing this content and from purchases through links.

Canadian Prime Minister Proves Anyone Can Make a Game

Be like Justin: Learn to make a game in an hour with The Hour of Code.

83 Comments

Canadian Prime Minister Justin Trudeau has made a game about ice hockey, which shows that making games is easy, but making games that aren’t broken is more of a challenge.

No Caption Provided

As part of The Hour of Code, a worldwide celebration of computer science designed to demystify and introduce programming to kids, Trudeau built a simple ice hockey bounce game using the introductory programming tool Code Studio.

Code Studio is a building-block programming tool, that allows users of all ages to create simple programs out of previously-established blocks. Blocks have pre-defined characteristics, some of which can be modified by the user. For instance, Trudeau was able to change the speed of the hockey puck in his game by editing the block “set [dropdown] ball speed.” This could be modified to anywhere from “very slow” to “very fast,” or even “random” if he chose. That building block could then be attached to the “when ball misses player” action block, meaning that on failing to hit a puck, he could change the speed of the next ball to be thrown.

A version of Trudeau's game, edited to not be so broken.
A version of Trudeau's game, edited to not be so broken.

Trudeau attended the Hour of Code event held at the Shopify headquarters in Ottawa, Canada. “Every job we’re going to do in the future will rely on technology and be benefited if you are powerful users of the technology that surrounds us,” Trudeau said to several dozen students at the event, reports The Star. “This is part of making sure we have a great resource in terms of young people who understand how to code and understand how important it is, he said, “and that’s what we’re working on right here.”

Trudeau’s hockey game won’t set the world on fire, though it may attempt to set your computer on fire if you let it run too long. A bug in his code will eventually cause a cascade of pucks to be thrown, causing the game to chew-up huge amounts of memory until your browser crashes.

Well puck me, right?
Well puck me, right?

The Hour of Code runs from December 5-11, in locations across 180+ countries, and is aimed at people aged from 4 to 104. Apologies to our 105+ year-old readers.

Got a news tip or want to contact us directly? Email news@gamespot.com

Join the conversation
There are 83 comments about this story