Skip to content

Example Graphic

github-actions[bot] edited this page Jul 18, 2026 · 3 revisions

Example: Graphic

Goal: Play a tiny arena game drawn entirely in the terminal — move, shoot, avoid the opponent.

Setup

  1. Upload GraphicExample.
  2. Terminal at 9600 baud, UTF-8 on.
  3. Click inside the terminal window so keystrokes go to the game.

Controls

Key Action
W A S D Move
Space Fire
R Restart after win/lose

Mouse reporting is turned off in this example so random mouse bytes do not interfere with play.

What you should see

  • Blue walls (including a center barrier)
  • Green player face / red opponent
  • Yellow / magenta projectiles
  • YOU WIN! or GAME OVER plus restart hint

Tips

  • Keep the baud rate at 9600; faster redraws need a solid USB link.
  • If movement feels sticky, close other programs using the serial port.
  • This example shows a proper continuous loop() — a good pattern for your own games and dashboards.

Preview

A tiny arena game using WASD keys.

GraphicExample

In action

GraphicExample demo

Clone this wiki locally