← กลับไป Developer Portal

ONE BUTTON ARCADE — Developer Guide (Beta)

เอกสารนี้อธิบายรูปแบบ Game Package สำหรับ Community รุ่นทดลอง ไม่ใช่ SDK ABI ที่รับประกันความเข้ากันได้แล้ว

สิ่งที่เกมต้องมี

Game Key ถาวรไม่ซ้ำ เช่น creator.sample-game, เวอร์ชัน, ชื่อ/วิธีเล่น, อินพุตปุ่มเดียว, จอ OLED 64×128 และไฟล์ซอร์สพร้อม License ที่อนุญาตให้เผยแพร่

ซอร์ส C++ ของนักพัฒนาไม่ถูกนำมาคอมไพล์หรือรันโดยอัตโนมัติบนเว็บสาธารณะ การอนุมัติ Metadata ไม่เท่ากับอนุมัติ Build/Flash

ตัวอย่าง Manifest สำหรับลงทะเบียน Metadata เท่านั้น

{
  "schemaVersion": 1,
  "id": "creator.sample-game",
  "title": "Sample Game",
  "version": "0.1.0",
  "type": "community",
  "developer": "Example Developer",
  "description": "Game description",
  "howto": "Press the one button",
  "category": "Arcade",
  "icon": "🎮",
  "input": "single-button",
  "hardware": ["esp32c3-onebutton-v1"],
  "display": {"width": 64, "height": 128, "colors": 2},
  "releaseStatus": "local-preview-only",
  "preview": {"kind": "none"},
  "firmware": {
    "kind": "unreviewed-source",
    "buildEligible": false,
    "independentlyBuildable": false
  }
}

ArcadeGame C++ Contract (ฉบับร่าง)

class ArcadeGame {
  virtual const char* id() const = 0;
  virtual const char* name() const = 0;
  virtual uint8_t rotation() const { return 1; }
  virtual uint32_t frameIntervalMs() const { return 33; }
  virtual void enter() = 0;
  virtual void leave() = 0;
  virtual void press(uint32_t now) = 0;
  virtual void release(uint32_t now) = 0;
  virtual void update(uint32_t now) = 0;
  virtual void render() = 0;
};

เกมควรใช้ input, display framebuffer และ save service ผ่าน Arcade Core หลีกเลี่ยงการอ่าน GPIO, เรียก Wire.begin หรือ clear NVS จากภายในเกม ต้องทดสอบที่เครื่องจริงและตรวจความตรงกับ WASM ก่อนเปิด Play Demo

สิ่งที่ยังไม่เปิด

การอัปโหลด ZIP สาธารณะ, Auto Build จากซอร์สของผู้ใช้, Sandbox Compile, Play Demo แบบรัน JS/WASM จาก URL ผู้ส่ง และ Public Flash API ยังไม่เปิดใช้งาน

กลับไปคลังเกม →