Nosmai Studio Build a blink game
Nosmai Studio / Tutorials / Build a blink game
Updated October 6, 2026

Build a face-controlled mini-game in Nosmai Studio by opening the BlinkFlyer template, previewing it, and learning how its script, game text, and reactions fit together. You play it by blinking, and the score and lives show on screen. This tutorial takes about 20 minutes and is the next step after your first filter.

Overview

This tutorial builds a face-controlled mini-game by opening the BlinkFlyer template and learning how its pieces fit: a Lua script drives the game, text layers show the score and lives, and a blink controls play. By the end you will understand how a game filter is assembled and how to change it.

Product: Nosmai Studio · Platform: macOS, Windows · Updated: 6 October 2026 · Reading time: 20 minutes

Prerequisites

1. Open the template

  1. On the home screen, open Templates.
  2. Open BlinkFlyer. It loads as editable layers.

2. Play it on a device

A game's Lua script runs on a device, not inside Studio, so you play the game on a phone through the Companion app:

  1. Connect a device. See Preview on a device for the full steps (same Wi-Fi, open the Companion app, it connects).
  2. Send the filter to the device with Preview on device.
  3. On the phone, blink to make the flyer move. The score and lives update on screen as you play.

In Studio's own preview you can see the game's layers, but the game does not play, because Studio has no Lua interpreter. The game runs because the filter's type is set to run as a game, which starts the Lua runtime on the device.

3. See how the game text works

The score, lives, and status you see are text layers bound to values the script sets live:

  1. Open the Code panel and find the script under Scripts.
  2. The panel detects the text slots the script writes (score, lives, status, countdown) and shows whether each has a matching text layer.
  3. If a slot had no text layer, nothing would show. The panel offers Create the missing text layers to fix that in one click.

This is the single most useful thing to understand about game filters: a script writes to a named slot, and a text layer bound to that slot displays it.

4. Change something

Try one small change and preview it:

  • In the Layers panel, select a text layer (for example the score) and change its font or colour in the inspector.
  • Or open the script in the Code panel and change a number, such as how many lives the game starts with. The change runs the next time you preview on a device.

5. Check performance and export

  1. Open the Performance view. A game is mostly shader and text, so it should read Good; the by-layer list shows what each piece costs.
  2. Press Export and produce the .nosmai package when you are happy.

Verify it worked

  • Blinking controls the flyer in the preview.
  • The score and lives update on screen as you play.
  • The Code panel shows every text slot with a matching text layer.
  • The exported folder contains a .nosmai file.

Common problems

What you seeWhyFix
The game does not respond to a blinkThe filter is not set to run as a gameSet the filter to run as a game in the Code panel
The score or lives do not showA written text slot has no matching text layerUse "Create the missing text layers" in the Code panel
A script change did nothingStudio has no Lua interpreter; scripts run on a devicePreview on a device, where the script runs
The flyer moves erraticallyBlink detection needs a clear, well-lit faceImprove the lighting and face the camera directly

Next steps

Reference

Nosmai

An AR and AI company. Founded on the idea that the next decade of software will be visual, and that the tools for it should be within reach of anyone building.

Newsletter

Product updates and release notes. No spam.

© 2026 nosmai, inc · all rights reserved