The last week was spent adding the Wren language to program toy. Unlike lua, Wren is class-based, while sharing many of the advantages that make lua such a great scripting language for games. It's thrilling to finally have this feature because it opens up a world of possibilities for game programming learning material, directly consumable on the web.

This tutorial will teach you the fundamentals of setting up a simple yet fully working game using toy. Thanks to how portable toy is, you will do all this right here, on this web page :)

You are free to write directly in the script editor, or to use the paste button of each snippet which will insert the code at the current cursor position inside the editor. Using the browser copy function with Ctrl+V will also put it in the editor clipboard, so you can then paste it.

This tutorial aims to familiarize yourself with toy user API, as well as demonstrate the potential for live interactive learning material, and how toy can help achieve that. It uses Wren, but all the functions and classes used here are just a 1:1 mapping of the C++ API. Please keep in mind this is also a proof of concept, which will be further refined and perfected in future iterations.