Microsoft Research has announced a new project – Microsoft TileCode, which is a game creation app that allows you to design, code, and play video games directly on low-cost Microsoft MakeCode Arcade gaming handhelds, as well as in the web browser.

The engine is inspired by board games with pieces that can move from one square of the board to a nearby square, with the games being made unique by modifying the rules.

TileCode aims to enable everyone to become creators of video games by enabling the process of game creation to take place on gaming handhelds themselves, instead of tablets/laptops/desktops.

TileCode leverages the concepts of board games (a board is a grid of squares, board pieces move from square to square, and game rules define the permitted moves) to introduce computational concepts through the medium of video games. Users start with a low floor as they are able to simply play a game and change one rule or elements of the game world. Once familiar with the application, players are provided with wide walls for creating different types of games.

To code the games, users simply need to use a four-way direction pad and the A and B buttons common to most handhelds, as shown above. Despite the simple UI, Microsoft Research was able to create games as complex as Snake, Bejeweled, Pac-Man, Boulder Dash, and Sokoban.

TileCode: Design and Coding

For each game, TileCode allows users to select game characters (sprites) and game background (tiles) from a gallery, modify the sprites and tile backgrounds, and create a game level by editing the game map, as shown in the three other screens:

TileCode screens

A TileCode program is a set of rules, each of which is associated with a sprite. A rule takes the form of a When-Do pair, as shown below on the left (screen labeled “code”). The When section visually describes a pattern/predicate over the 3×3 local neighborhood around the central sprite (the player sprite, in this case) to be matched against the tile map. The Do section contains commands that are sent to the identified sprite when the pattern matches.

When-Do Rule

The above rule fires when the user presses the right-dpad button, a player sprite is on the tile map, and there is grass on the tile to the right of the player. When these conditions hold, the rule sends the player sprite a move-right command. From this example we see how TileCode encourages the user to explore the relationships between the tile map and how the rules fire based on the patterns present on the map. In the rule coding screen (shown above), the user can play the game, return to the coding screen to change the rule, and see its effect on game play. She can also visit the tile map editor and make changes to the map to enable/disable the firing of a rule.

TileCode taps into themes such as pixel art for tiles and sprites and engages users in new ways of thinking about game world design and the ways of creating different maps for different games.

You can try out Microsoft TileCode now and read more about TileCode in an upcoming UIST 2020 paper TileCode: Creation of Video Games on Gaming Handhelds.

Source: Microsoft