0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

RPGツクールMZ を TypeScript + Vite + Electron で動かす【はじめに】

0
Last updated at Posted at 2026-06-06

はじめに

普段は個人でゲーム開発をしたり、プログラミングしてます。
最近、ゲーム制作をはじめましてRPGツクールMZを購入しました。

しかし、触ってみると実行環境となるNW.jsのバージョンが古く色々不満が…

  • Typescriptが使えない
    • 型安全にバグの少ないプラグイン開発したい
  • ビルドツールが使えない
    • ソースコードのminify化や画像圧縮などをViteをベースとしたビルドパイプラインでやりたい
  • CI/CD運用の壁
    • ゲーム制作以外の作業をCLI操作したい
    • GitHub ActionsなどでLinux環境でビルドやデプロイができない
  • アセット(素材)関連の問題
    • デプロイ前に手作業で画像圧縮が必要
    • デプロイ時に細かい設定をしないと未使用のアセットをいい感じに除外してくれない
  • 実行環境の問題
    • NW.jsよりElectronの方が色々都合がいい
    • Electronの方が安定性が高く、Viteとの相性が良い
    • Electronが内蔵する最新のChromium(V8エンジン)は、近年の最新CPUやApple Silicon(Mシリーズ)等にも最適化されているので使いたい

そんな不満を解消して理想の開発環境を構築すべく、RPGツクールMZの標準環境(NW.js)を使わず、自前でTypeScript + Vite + Electronでビルドやプラグイン開発できるよう試行錯誤しました。

最終的には以下のようにElectronでの起動に成功しました。
navigator.userAgentElectron/42.3.0 が含まれているので無事起動できました。

electron_startup.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?