How I designed a game with Scratch

How I designed a game with Scratch

"Make a Difference" is a simulation game created entirely from open source tools, code, and audio-visual content.

Scratch for gaming
Image credits : 

Wilfried Elmenreich, CC BY

x

Get the newsletter

Join the 85,000 open source advocates who receive our giveaway alerts and article roundups.

As a fan of game jams and an open source aficionado, I was immediately drawn to last October's Open Jam on itch.io.

I decided to create a game using the Scratch programming language. Targeted at kids who want to learn programming, Scratch is designed to be easy and visual.

I am a good programmer, and I also do game development with other platforms, but what fascinates me about Scratch is that it is easy to get started with and I didn't need to remember too much to use the platform. This was a plus because I had limited time to spend getting up to speed on other platforms.

A project of the Lifelong Kindergarten Group at the MIT Media Lab, the coding system and player for Scratch is available as open source on GitHub, although Scratch is most often used via its browser-based online version. The latter also comes with cloud storage and a website to host, play, comment, and favorite projects. All published projects are automatically released under a CC-BY-SA 3.0 license, so as a Scratcher, you experience the open source concept first-hand. I even used code from another Scratch project for the text display in my game.

pic1_scratch-programming-interface.png

Scratch programming interface

The editor of the Scratch programming language

Designed to fit the Open Jam theme “Leave a Mark,” my game, “Make a Difference,” is a simulation in which players sail to different cities and influence their development by lobbying political and economic models and by trading with local merchants. The idea was inspired by Sid Meier’s fascinating game, Pirates!, in which players influence economies and political landscapes by attacking cities.

My game needed a map, which I generated using the open source tool Polygon Map Generator from Red Blob Games.

pic2_polygon_map_generator.png

Polygon map generator

The open source Polygon map generator was used to create the game's islands

The graphical elements of the cities were derived from Nicu's Clipart Collection, which is under a public domain license. I also needed images from within the city, so I used public domain images of old paintings from Wikimedia Commons.

pic3_trading_in_the_game.png

Trading in the game

The game's design incorporates elements such as Johann Adam Klein's painting of the port of Mainz, Germany. 

Finally, to suggest the ambiance of a sailing ship, a harbor bustling with activity, and the governor’s audience hall, I found audio samples under a Creative Commons Sampling Plus license on sites like freesound.org and Ambient-mixer.com.

The current version of Scratch 2.0 is based on Adobe Flash, so to play the final game, I used the Sulfurous Player, software that can execute Scratch projects in a browser under HTML5. Sulfurous is an open source project that builds upon the great work of Nathan Dinsmore, who created the original Phosphorus Player.

The game, which is of course under an open source license, is the product of many open source tools and builds upon open source code. Using all open source tools felt like a natural thing to do, and when it comes to using pre-made assets it is even often a requirement that the final product with all its components becomes open source as well. I like the fact that others can continue where I left off without the need to purchase software or acquire licenses. And open source does not mean non-commercial – the licenses used in this project would allow me to sell the final game. But I decided to give it away for free.

pic4_sailing_away.png

Sailing away game image

Sailing away to change the world...

Topics

About the author

Wilfried Elmenreich - Professor of Smart Grids at the Institute of Networked and Embedded Systems at Alpen-Adria-Universität Klagenfurt, Austria. Also affiliated with Lakeside Labs a research and innovation cluster. Research interests are smart grids, complex systems, and embedded communication networks. Among other things, Wilfried is involved in the...