Playfield Engine
Playfield Engine
は、どんな環境でも動く2Dゲーム用のスクリプト実行環境です。
独自開発のスクリプト言語 Playfield Script を使えば、グラフィック描画もサウンド再生も、プラットフォームの違いを意識せずシームレスに扱えます。
ダウンロード v0.8.9
📁 | ![]() |
![]() |
![]() |
⛏️ |
---|---|---|---|---|
全部入り | Windows 64-bit インストーラ | macOS | AppImage x86_64 | iOS |
ソースコード | Windows 64-bit EXE | Android | ||
サンプルのみ | Windows Arm64 EXE | WebAssembly | ||
Windows 32-bit EXE | Unity Plugin |
ハイライト
完全新規開発された Playfield Engine の特徴は次のようなものです:
- 気軽に書けるスクリプト
- C や JavaScript に似た文法の "Playfield Script" で記述できる
- 内蔵の JIT コンパイラでネイティブ並みの速さ
- 思いついたらすぐ試せる — Jot and Run!
- どこへでも移植できるグラフィック&サウンド
- 独自開発の軽量ゲームライブラリ「StratoHAL」がベース
- Windows, macOS, Linux, Chromebook, WebAssembly, iOS, Android, ゲーム機まで対応
- 持ってないハードウェア用に開発できちゃう — Go Far, Stay Close!
- コンパクトな実行環境
- Windows版のランタイムサイズはたったの 1.4 MB
- モバイルアプリにもピッタリ — Go Magically Small, Get Massively Loved!
なぜ Playfield Engine なの?
「もしゲームエンジンがどこでも動いたら、世界はどう変わるだろう?」
Playfield Engine は、このたったひとつの問いから生まれました。
クリエイティブって、本当はパソコンの性能とか、住んでる場所とか、持ってる道具に左右されるべきじゃない。 Playfield Engine は「誰でも、どこでも、自分の世界を作れるように」という想いで作られています。
古い PC や低スペックな環境でもちゃんと動くから、コンピュータさえあれば創作の場はある。 開発リソースが少ない場所にいる人にとっても、頼れる相棒になります。 作りたいものがあるなら、Playfield Engine が一緒に歩んでくれる。
たとえば、教室で Raspberry Pi を使うときでも、避難所で配布された Chromebook を使うときでも。 シンプルで、思いやりがあって、自分らしく使えるツールとしてアイデアを形にできます。
目標はただひとつ:
ゲーム開発を、誰でも手に届く、やさしいものにすること。
必要なのは夢だけ。夢こそが Playfield Engine を動かす燃料です。
Web で試せるデモゲーム
ブラウザ上でそのまま遊べるサンプルゲームを用意しています。
開発状況
現在は 0.8.x 系列を開発中。 安定版の 1.0.0 リリースを目指して進行中です。
最新ビルドの動作確認状況:
種別 | OS | ステータス | 確認日 | 確認環境 |
---|---|---|---|---|
Desktop | Windows | ✅ Works | 2025年9月22日 | Windows 11 x64 |
macOS | ✅ Works | 2025年9月22日 | macOS 15 Sequoia Arm64 | |
Linux | ✅ Works | 2025年9月22日 | Ubuntu 24.04 LTS x86_64 | |
Mobile | iOS | ✅ Works | 2025年9月22日 | iPhone iOS 18 |
Android | ✅ Works | 2025年9月22日 | Android 16 | |
BSD | FreeBSD | ✅ Works | 2025年9月22日 | FreeBSD 14.3 amd64 |
NetBSD | ✅ Works | 2025年9月22日 | NetBSD 10.1 amd64 | |
OpenBSD | ✅ Works | 2025年9月22日 | OpenBSD 7.7 amd64 | |
Others | WebAssembly | ✅ Works | 2025年9月22日 | Chrome |
Chromebook | ✅ Works | 2025年9月22日 | Chrome こちら | |
Unity | ✅ Works | 2025年9月22日 | Unity 6.2 Windows 11 x86_64 |
サンプル
マウスカーソルを追いかけて画像を表示する、シンプルな例です。
基本のライフサイクルは3つ:
- setup() ... ウィンドウ設定
- start() ... アセット読み込み
- update() ... 毎フレームのロジックとテクスチャのロード
- render() ... 毎フレームの描画
func setup() {
var config = {
title: "My Sample Game",
width: 640,
height: 480
};
return config;
}
func start() {
myTexture = Engine.loadTexture({file: "apple.png"});
}
func update() {
posX = Engine.mousePosX;
posY = Engine.mousePosY;
}
func frame() {
Engine.draw({
texture: myTexture
x: posX,
y: posY,
});
}
クイックスタート
Windows, macOS, Linux, Chromebook向けに、ビルド済みの実行ファイルを配布しています。
1. 最新版をダウンロード
- このページのトップから「全部入り」の ZIP ファイルをダウンロードします。
- ZIP ファイルを好きなフォルダに展開します
2. ゲームスクリプトを実行する
- Windows の場合
playfield.exe
をダブルクリックします- ゲームが開始します
- macOS の場合
misc
フォルダを開きますmacos
フォルダを開きまPlayfield.dmg
ファイルを開きます- dmg ファイルの中に入っている
Playfield
アプリをmain.pf
と同じフォルダにコピーします - コピーしたアプリをダブルクリックして起動します
- ゲームが開始します
- Linux の場合
misc
フォルダを開きますlinux
フォルダを開きますPlayfieldEngine-x86_64.AppImage
をmain.pf
と同じフォルダにコピーします- コピーしたアプリをダブルクリックして起動します
- ゲームが開始します
- Chromebook の場合
- このページ をブラウザで開きます
Open Folder
ボタンをクリックしますmain.pf
のあるフォルダを選択します- ゲームが開始します
3. ゲームスクリプトを編集する
- Playfield Editor を使う場合
playfield-editor.exe
をダブルクリックしてPlayfield Engine Editor
を起動しますmain.pf
をエディタから開いて、編集します- Ctrl+R で実行します (Ctrl キーを押しながら R キーを押す)
- お好きなエディタを使う場合
- あらかじめ、エンジンを
main.pf
のあるフォルダにコピーしておきます - お好きなエディタを起動して、
main.pf
ファイルを開きます - ファイルを編集して保存します
- エンジンを起動します
- あらかじめ、エンジンを
4. もっと知りたいときは
技術概要
Playfield Engine は、SDL とスクリプト言語をまとめただけのラッパーではありません。 独自のレンダリング&サウンドバックエンドを持ち、さらに独自言語まで備えた、独立したゲームエンジンです。
コアアーキテクチャ
+----------------------------------------------------------+
| ユーザスクリプト |
+----------------------------------------------------------+
||
+----------------------------------------------------------+
| Playfield Script Runtime |
+----------------------------------------------------------+
|| ||
+---------------------------------+ +---------------------+
|StratoHAL (グラフィック/サウンド)| | NoctLang VM (JIT) |
+---------------------------------+ +---------------------|
-
スクリプト: NoctLang を組み込み。 ゲーム用に設計された、コンパクトだけどパワフルな言語です。
-
グラフィック: DirectX 9/11/12, Metal, OpenGL, OpenGL ES, WebGL に対応し、幅広い環境で動作。
-
サウンド: DirectSound (Windows), Audio Unit (macOS/iOS), ALSA (Linux), OSS (BSD), その他、各プラットフォームのAPIに対応。
StratoHAL
StratoHAL は、2001 年から商用2Dゲームエンジンとして育てられたコードベースが元になっています。 長年の安定稼働実績があり、今では macOS, Linux, iOS, Android, WebAssembly, Unity まで対応。 スマートフォンで 10 年以上動いてきた実績もあります。
SDL3 という有名な OSS もありますが、StratoHAL は SDL3 と同じ主要プラットフォームをカバーしつつ、さらに NDA なしで Unity 経由でコンソールまでサポートできるのが特徴です。
対応プラットフォーム
種別 | OS / プラットフォーム | 備考 |
---|---|---|
Desktop | Windows | DirectX 12/11/9, DirectSound |
macOS | Metal, Audio Unit | |
ChromeOS | OpenGL, ALSA | |
Linux | OpenGL, ALSA | |
*BSD | OpenGL, OSS (/dev/dsp) | |
Qt | Qt OpenGL | |
Mobile | iOS | Metal, Audio Unit |
Android | OpenGL, OpenSL ES, NDK | |
Web | WebAssembly | WebGL, OpenAL, via Emscripten |
Console | Unity | Unity Plugin |
ゲーム機向け Unity Plugin について
Playfield Engine は、Windows 64bit および各種ゲーム機向けの Unity プラグインを配布しています。 バイナリはすべて OSS版 の LLVM/Clang ツールチェーンでビルドされており、プロプライエタリなSDKは使われていません。 実際にゲームを製品として出荷する場合は、各プラットフォーム事業者の利用規約に従ってください。
NoctLang
Playfield Script = NoctLang + Playfield API
NoctLang は Playfield Engine のために作られた軽量スクリプト言語です。 ゲームに向いた文法で、わかりやすさ・即起動・エンジンとの密な連携を重視しています。
内蔵の JIT コンパイラは、Intel / Arm / RISC-V / PowerPC / MIPS の32-bit / 64-bit を幅広くサポート。
JIT が制限されるモバイルやゲーム機では、インタプリタモードや C コード出力を利用した AOT コンパイルに切り替え可能。 このため、制限の強い環境でも完全動作します。
スクリプト実行モード
デスクトッププラットフォームではスクリプトが JIT 実行され、非常に高速に動作します。 その他のプラットフォームでは、高性能インタプリタで高速に実行されます。 もしインタプリタよりも速い実行速度が必要な場合は、AOT コンパイル(事前コンパイル)も利用可能です。
プラットフォーム | モード |
---|---|
Windows x86 | JIT |
Windows x64 | JIT |
Windows arm64 | JIT |
macOS x86_64 | JIT |
macOS arm64 | JIT |
Linux x86 | JIT |
Linux x86_64 | JIT |
Linux armv7 | JIT |
Linux arm64 | JIT |
FreeBSD x86_64 | JIT |
NetBSD x86_64 | JIT |
OpenBSD x86_64 | Interpreter or AOT |
iOS | Interpreter or AOT |
Android | Interpreter or AOT |
WebAssembly | Interpreter or AOT |
Unity Plugin | Interpreter or AOT |
ランタイムのフットプリント
プラットフォーム | バイナリサイズ | メモリ使用量 (GC) |
---|---|---|
全ターゲット | 〜 2 MB | 起動時に 256 MB を確保 (上限) |
補足:ガーベジコレクタは起動時に256MBを確保します。これは現在のヒープサイズの上限値です。
ガベージコレクション
Playfield Engine は、Java の HotSpot VM に似た高性能なガベージコレクタを実装しており、ガベージコレクションによる遅延を意識する必要はそれほどありません。
- ガベージコレクタは世代 GC を実装しており、オブジェクトを若い世代と古い世代に分けて管理します。
- 若い世代の GC は、コピー GC により非常に高速に実行されます。(semi-space copy GC)
- 古い世代の GC は、マークアンドスイープで実行され、必要に応じてデフラグされます。(mark-sweep-compact GC)
テスト環境
Playfield Engine は、開発中に主に以下の環境で動作確認を行っています。
種別 | OS | バージョン | アーキテクチャ |
---|---|---|---|
Desktop | Windows | 11 | x64 |
arm64 | |||
macOS | 15 | arm64 | |
12 | x86_64 | ||
Ubuntu | 24.04 | x86_64 | |
arm64 | |||
Kubuntu | 25.04 | x86_64 | |
Browser | Chrome | 139 | WebAssembly |
Safari | 18.6 | WebAssembly | |
Smartphone | iOS | 18 | Simulator |
Android | 16 | Simulator | |
Console | Unity | 6.2 | Windows x64 |
CMake プリセット
Playfield Engine には、さまざまなプラットフォームやビルド構成をカバーする CMake プリセット が用意されています。
プリセット名 | プラットフォーム | コンパイラ | ビルドディレクトリ | 出力ファイル | 種類 |
---|---|---|---|---|---|
windows-msvc-x86-debug | Windows | MSVC | out/build/windows-x86-debug | playfield.exe | 実行ファイル |
windows-msvc-x86-release | Windows | MSVC | out/build/windows-x86-release | playfield.exe | 実行ファイル |
windows-msvc-x64-debug | Windows | MSVC | out/build/windows-x64-debug | playfield.exe | 実行ファイル |
windows-msvc-x64-release | Windows | MSVC | out/build/windows-x64-release | playfield.exe | 実行ファイル |
windows-msvc-arm64-debug | Windows | MSVC | out/build/windows-arm64-debug | playfield.exe | 実行ファイル |
windows-msvc-arm64-release | Windows | MSVC | out/build/windows-arm64/release | playfield.exe | 実行ファイル |
windows-mingw-x86 | Windows | MinGW | build-mingw-x86 | playfield.exe | 実行ファイル |
windows-mingw-x86_64 | Windows | MinGW | build-mingw-x86_64 | playfield.exe | 実行ファイル |
windows-mingw-arm64 | Windows | MinGW-LLVM | build-mingw-arm64 | playfield.exe | 実行ファイル |
macos | macOS | Clang | build-macos | Playfield.app | アプリバンドル |
linux | Linux | GCC | build-linux | playfield | 実行ファイル |
freebsd | FreeBSD | Clang | build-freebsd | playfield | 実行ファイル |
netbsd | NetBSD | GCC | build-freebsd | playfield | 実行ファイル |
openbsd | OpenBSD | Clang | build-freebsd | playfield | 実行ファイル |
wasm | WebAssembly | Emscripten | build-wasm | index.html | HTML + Wasm |
wasm-local | Chromebook | Emscripten | build-wasm-local | index.html | HTML + Wasm |
ios-device | iOS Device | Clang | build-ios-device | libplayfield.a | 静的ライブラリ |
ios-simulator | iOS Simulator | Clang | build-ios-simulator | libplayfield.a | 静的ライブラリ |
android-x86 | Android x86 | Clang | build-android-x86 | libplayfield.so | 共有ライブラリ |
android-x86_64 | Android x86_64 | Clang | build-android-x86_64 | libplayfield.so | 共有ライブラリ |
android-armv7 | Android armv7 | Clang | build-android-armv7 | libplayfield.so | 共有ライブラリ |
android-arm64 | Android arm64 | Clang | build-android-arm64 | libplayfield.so | 共有ライブラリ |
unity-win64 | Unity Plugin | Clang-CL | build-unity-win64 | libplayfield.dll | DLL プラグイン |
unity-switch | Unity Plugin | Clang | build-unity-switch | libplayfield.a | 静的ライブラリ |
unity-ps5 | Unity Plugin | Clang | build-unity-ps5 | libplayfield.a | 静的ライブラリ |
unity-xbox | Unity Plugin | Clang | build-unity-xbox | libplayfield.a | 静的ライブラリ |
サンプルゲーム一覧
サンプルゲームは順次追加されています。
名前 | ディレクトリ | 説明 |
---|---|---|
bouncer | samples/bouncer | ブロックが跳ねるデモ |
rush | samples/rush | ジャンプアクション |
heartbeatclock | samples/hearbeatclock | 時計 |
shoot | samples/shoot | ミニシューティング |
ChatGPT サポート
ChatGPT を使ってゲームのテンプレートを自動生成することができます。 その際は以下のリファレンスを読み込ませてください:
これで ChatGPT が、実際に Playfield Engine で動かせるゲームを直接作れるようになります。
注意: ChatGPT を使うときは、左下の 「+」ボタン をクリックして 「Web検索」 を有効にしてください。そうすれば上記リファレンスを参照できます。
ローカライズ / 国際化
Playfield Engine は、UI メッセージに以下の言語をサポートしています。
言語 | ロケールコード | 翻訳の種類 | 翻訳範囲 |
---|---|---|---|
英語 | en-US |
オリジナル | UI / ドキュメント / サンプル |
スペイン語 | es-ES |
機械翻訳 | UI |
フランス語 | fr-FR |
機械翻訳 | UI |
イタリア語 | it-IT |
機械翻訳 | UI |
ドイツ語 | de-DE |
機械翻訳 | UI |
ギリシャ語 | el-GR |
機械翻訳 | UI |
ロシア語 | ru-RU |
機械翻訳 | UI |
中国語 (簡体字) | zh-CN |
機械翻訳 | UI |
中国語 (繁体字) | zh-TW |
機械翻訳 | UI |
日本語 | ja-JP |
プロ翻訳 | UI / ドキュメント |
言語を切り替える方法: Playfield Engine はシステムのロケールを使います。 言語を切り替える場合は、システムのロケール設定を変更してください。
翻訳への貢献:
翻訳ファイルは 3 つの i18n/
ディレクトリ (main, HAL, NoctLang) にあります。
新しい翻訳を追加したい、または既存の翻訳を修正したい場合は、Issue を立てるか Pull Request を送ってください。
外部ライブラリ
Playfield Engine では以下のライブラリを利用しています。 それぞれのソースコードの tarball は、このリポジトリに同梱されています。
- zlib
- libpng
- libogg
- libvorbis
- JPEG9
- libwebp
- brotli
- bzip2
- FreeType2
互換性リスト
Windows:
OS | Version | Patch | CPU | Runtimes | 32-bit Binary | 64-bit Binary | Direct3D |
---|---|---|---|---|---|---|---|
Windows | XP | SP3 | x86 | DirectX End-User Runtimes (June 2010) | ✅ | - | 9.0 |
Windows | XP | SP3 | x64 | DirectX End-User Runtimes (June 2010) | ✅ | ❌ | 9.0 |
Windows | Vista | x86 | DirectX End-User Runtimes (June 2010) | ✅ | - | 9.0 | |
Windows | Vista | x64 | DirectX End-User Runtimes (June 2010) | ✅ | ❌ | 9.0 | |
Windows | Vista | SP1 | x86 | DirectX End-User Runtimes (June 2010) | ✅ | - | 9.0 |
Windows | Vista | SP1 | x64 | DirectX End-User Runtimes (June 2010), Microsoft Visual C++ Redistributable 2015 | ✅ | ✅ | 9.0 |
Windows | Vista | SP2 | x86 | DirectX 11 Platform Update | ✅ | - | 11.0 |
Windows | Vista | SP2 | x64 | DirectX 11 Platform Update, Microsoft Visual C++ Redistributable 2015 | ✅ | ✅ | 11.0 |
Windows | 7 | x86 | ✅ | - | 11.0 | ||
Windows | 7 | x64 | Microsoft Visual C++ Redistributable 2015 | ✅ | ✅ | 11.0 | |
Windows | 7 | SP1 | x86 | ✅ | - | 11.0 | |
Windows | 7 | SP1 | x64 | Microsoft Visual C++ Redistributable 2015 | ✅ | ✅ | 11.0 |
Windows | 8 | x86 | ✅ | - | 11.0 | ||
Windows | 8 | x64 | Microsoft Visual C++ Redistributable 2015 | ✅ | ✅ | 11.0 | |
Windows | 8.1 | x86 | ✅ | - | 11.0 | ||
Windows | 8.1 | x64 | ✅ | ✅ | 11.0 | ||
Windows | 10 | x86 | ✅ | - | 12.0 | ||
Windows | 10 | x64 | ✅ | ✅ | 12.0 | ||
Windows | 10 | arm64 | ✅ | ✅ | 12.0 | ||
Windows | 11 | x64 | ✅ | ✅ | 12.0 | ||
Windows | 11 | arm64 | ✅ | ✅ | 12.0 |
注意: playfield.exe は 64 ビットバイナリで、playfield32.exe は 32 ビットバイナリです。
macOS:
OS | Version | CPU | Status |
---|---|---|---|
OS X El Capitan | 10.11 | x86_64 | ✅ |
macOS Sierra | 10.12 | x86_64 | ✅ |
macOS High Sierra | 10.13 | x86_64 | ✅ |
macOS Mojave | 10.14 | x86_64 | ✅ |
macOS Catalina | 10.15 | x86_64 | ✅ |
macOS Big Sur | 11.0 | arm64 | ✅ |
macOS Big Sur | 11.0 | x86_64 | ✅ |
macOS Monterey | 12.0 | arm64 | ✅ |
macOS Monterey | 12.0 | x86_64 | ✅ |
macOS Ventura | 13.0 | arm64 | ✅ |
macOS Ventura | 13.0 | x86_64 | ✅ |
macOS Sonoma | 14.0 | arm64 | ✅ |
macOS Sonoma | 14.0 | x86_64 | ✅ |
macOS Sequoia | 15.0 | arm64 | ✅ |
macOS Sequoia | 15.0 | x86_64 | ✅ |
macOS Tahoe | 26.0 | arm64 | ✅ |
macOS Tahoe | 26.0 | x86_64 | ✅ |
Linux:
- Kernel 2.6+
- X.org or XWayland
- OpenGL (Mesa or NVIDIA)
iOS:
OS | Status |
---|---|
iOS 11 | ✅ |
iOS 12 | ✅ |
iOS 13 | ✅ |
iOS 14 | ✅ |
iOS 15 | ✅ |
iOS 16 | ✅ |
iOS 17 | ✅ |
iOS 18 | ✅ |
iOS 26 | ✅ |
Android:
OS | Status |
---|---|
Android 6 | ✅ |
Android 7 | ✅ |
Android 8 | ✅ |
Android 9 | ✅ |
Android 10 | ✅ |
Android 11 | ✅ |
Android 12 | ✅ |
Android 13 | ✅ |
Android 14 | ✅ |
Android 15 | ✅ |
Android 16 | ✅ |
ギャラリー
Playfield Engine running on Windows 11:
Playfield Engine running on macOS:
Playfield Engine running on Linux:
Playfield Engine running on iOS simulator:
Playfield Engine running on Android emulator:
Playfield Engine running on Windows XP:
Playfield Engine running on NetBSD:
NoctVM エコシステム
Playfield Engine は、NoctVM エコシステムの一部です。
- NoctLang — ポータブルなスクリプト言語 (このプロジェクトで使用)
- Playfield Engine — どこでも動く 2D ゲームエンジン (このプロジェクト)
- NoctUI — 宣言的 UI ライブラリ (このプロジェクトでは未使用)
これらが揃って、Noct エコシステムの基盤を形作っています。 NoctLang 自体は複雑なランタイムを持たない、シンプルな言語エンジンです。 Playfield Engine は、その NoctLang コアを組み込み、さらに拡張したランタイムのひとつです。
ライセンス
Playfield Engine
© 2025 Awe Morris
Playfield Engine は MITライセンス のもとで公開されているオープンソースソフトウェアです。 商用プロジェクトを含め、自由に利用改変再配布できます。
一緒に作ろう!
Playfield Engine はまだ発展の途中にあります。 でも、そのぶん丁寧に育てていて、世界中のクリエイターを勇気づけられる存在になりたいと願っています。
コードでも、ドキュメントでも、テストでも、アイデアでも。 もし関わってみたいと思ったら、ぜひ参加してみてください。
小さな一歩が、Playfield Engine の未来を形づくります。 この旅に加わっていただけたら嬉しいです。