Beep8 logo

Textmode

Textmode Source Code

Beep8 includes a built-in Textmode system for drawing retro-style pixel art using text characters. Instead of drawing with pixels, you build images with a grid of text symbols, colours, and patterns.

You can create Textmode images using the Beep8 Textmode Editor.

The textmode system is built on top of Beep8’s Tilemap system, so it uses the same functions for loading and drawing tilemaps.

Textmode Methods

beep8.Textmode.draw(tilemap [,tileX] [,tileY] [,width] [,height]) async

Draw a textmode tilemap to the screen. This is a wrapper for beep8.Tilemap.draw to keep the API consistent.

Parameters

  • tilemap (Array): The tilemap array to draw.
  • [tileX] (number): The x-coordinate of the tile to start drawing from. (default: 0)
  • [tileY] (number): The y-coordinate of the tile to start drawing from. (default: 0)
  • [width] (number): The width of the tilemap to draw. (default: null)
  • [height] (number): The height of the tilemap to draw. (default: null)

beep8.Textmode.load(data) async

Load a textmode tilemap from data. This is a wrapper for beep8.Tilemap.load to keep the API consistent.

Parameters

  • data (Object): The textmode tilemap data.

Returns

  • (Promise): Resolves when the tilemap is loaded.

More Beep8 Docs

Actors Documentation

App Intro Documentation

Async Documentation

Cart API

Core Functions

ECS (Entity Component System) Documentation

Game Math Documentation

Game State

Input Documentation

Inventory API

Joystick Documentation

Menu Documentation

Music Documentation

Particle System Documentation

Passcodes Documentation

Public API

Random Numbers Documentation

SFX Documentation

Scene Documentation

Text Renderer

Textmode

Tilemap Documentation

Utilities Documentation