# Pinyol

A small 2D game engine for an open-source ESP32-S3 handheld: Lua games on a GBA-like virtual console and a no-code editor, on the console, the desktop and the browser.

游戏在这里就是一个文件夹：拷进 microSD 的 games/<id>/ 目录，开机后它自己出现在菜单里。

- id: ipaud-pinyol
- author: ipaud
- repository: https://github.com/ipaud/pinyol
- license: MIT
- shape: square
- scenes: games, home
- boards: ESP32-S3
- browser_playable: no
- preview: Project screenshots
- html: https://esp32gallery.com/projects/ipaud-pinyol/
- html_zh: https://esp32gallery.com/zh/projects/ipaud-pinyol/
- json: https://esp32gallery.com/data/catalog/projects/ipaud-pinyol.json

## Hardware

Supported hardware: ESP32-S3. Confirm the exact board revision and pin map in the upstream repository.

支持硬件：ESP32-S3。烧录前请在上游仓库核对板卡版本与引脚定义。

## English

```
A game here is simply a folder: copy it to the microSD under games/<id>/ and it turns up in the console's menu. The hardware is Cirera, an ESP32-S3 handheld with a 480×320 touch screen, buttons, a speaker and that card slot. The C engine gives Lua games a Game Boy Advance-style virtual machine — four background layers with Mode 7, 128 sprites, palettes, windows — at a steady 60 fps, drawing a 240×160 world at 2× into the 480×320 frame. Games can also be written as JSON data with no code at all. Build the firmware with ESP-IDF 5.4 and idf.py; the browser installer needs Chrome or Edge and ships fifteen games in flash. Desktop, browser and console all run the same folders. The Lua API may still change, while the older data format is stable.
```

## 中文

```
游戏在这里就是一个文件夹：拷进 microSD 的 games/<id>/ 目录，开机后它自己出现在菜单里。跑它的 Cirera 是台 ESP32-S3 掌机，配 480×320 触摸屏、按键、扬声器和卡槽。引擎用 C 写，给 Lua 游戏一套仿 Game Boy Advance 的虚拟主机：四层背景（可旋转缩放、Mode 7）、128 个精灵、调色板、窗口和马赛克，逻辑稳定在 60 帧，世界按 240×160 逻辑像素绘制、放大两倍铺进 480×320 的画面。不写代码也能做游戏，那种玩法用 JSON 描述场景、对话和谜题。固件是 ESP-IDF 5.4 工程，用 idf.py 编译烧录；网页安装器要求 Chrome 或 Edge，flash 里预装十五个游戏。桌面模拟器、浏览器和掌机跑的是同一份文件夹。Lua 接口还在变，早先的数据格式已经稳定。
```
