Pyxelで、プログラミングを遊ぼう!

「楽しく作る」をデザインする

Let’s Play Programming with Pyxel! — Designing the Fun of Making

Pyxel

北尾 崇Takashi Kitao

@kitaotakashi.kitao@gmail.com

今日は、Pyxelの話をします

Today I’d Like to Talk About Pyxel

INTRODUCTION

奇妙なアルバイト

A Strange Job Offer

こんなアルバイト、いかがですか?

How About a Part-Time Job Like This?

アルバイト募集 PART-TIME POSITION AVAILABLE
業務内容 Duties画面を見ながら、レバーを右に倒し続けてください Watch the screen and keep pushing the lever to the right
図形が表示されたら、ボタンを1回押してください When a shape appears, press the button once
押し遅れると、最初からやり直しです If you press too late, you start over from the beginning
その作業を、延々と繰り返してください Repeat that, over and over, without end
勤務時間 Hours30時間 30 hours
報 酬 Pay
4,900円4,900 yen

こんなアルバイト、いかがですか?

How About a Part-Time Job Like This?

アルバイト募集 PART-TIME POSITION AVAILABLE
業務内容 Duties画面を見ながら、レバーを右に倒し続けてください Watch the screen and keep pushing the lever to the right
図形が表示されたら、ボタンを1回押してください When a shape appears, press the button once
押し遅れると、最初からやり直しです If you press too late, you start over from the beginning
その作業を、延々と繰り返してください Repeat that, over and over, without end
勤務時間 Hours30時間 30 hours
報 酬 Pay
4,900円4,900 yen
受け取る額ではなく、支払う額Not what you earn — what you pay

そのアルバイト、体験済みかも?

Have You Already Worked This Job?

#4の求人票
スーパーマリオブラザーズ 1-1

Super Mario Bros. © 1985 Nintendo

「作業」と「遊び」は紙一重。違いは、楽しくする工夫があるかどうかWork and play are a hair apart. The difference is whether someone designed the fun

ゲームデザインとは

What Is Game Design?

プレイヤーに「楽しい」「面白い」と感じさせる仕組みThe workings that make players find it fun and interesting

目指す体験:The experience to aim for
やりたいことができる You can do what you want
達成感が得られる You get a sense of achievement
実現手段:How it is done
世界の構築 Building a world
計算 Math ルール Rules 物語 Story
フィードバック Feedback
映像 Visuals Sound 言葉 Words
試行錯誤の後押し Encouraging trial and error
目標 Objectives ヒント Hints 補正 Assists

「達成感」は錯覚でも良い

An Illusion of Achievement Is Fine

スーパーマリオブラザーズ 8-1
8-1
スーパーマリオブラザーズ 8-3
8-3

Super Mario Bros. © 1985 Nintendo

難易度は同じ。見え方が違うだけThe difficulty is the same. Only the look differs

自己紹介

About Me

北尾 崇きたお たかしTakashi Kitao

過去Past
元ゲーム開発者Former game developer『METAL GEAR SOLID』企画 / ムービー制作Planner / Cutscene Production『ZONE OF THE ENDERS』シリーズメインプログラマ / ゲームデザインユニットディレクターLead Programmer / Game Design Unit Director
現在Now
ソニー株式会社 技術開発研究所 XRシステム技術開発部 統括部長General Manager, XR Systems Technology Development Dept., Technology Development Laboratories, SonyXR(拡張現実・仮想現実・複合現実)とAIの研究開発R&D in XR (AR/VR/MR) and AI
個人開発Personal project
2018年からレトロゲームエンジンPyxelを開発Developing the retro game engine Pyxel since 2018
著書Book
『ゲームで学ぶPython! Pyxelではじめるレトロゲームプログラミング』Learn Python Through Games: Retro Game Programming with Pyxel2025年1月 技術評論社刊January 2025, published by Gijutsu-Hyoron Co., Ltd.
『ゲームで学ぶPython! Pyxelではじめるレトロゲームプログラミング』の表紙

自己紹介

About Me

北尾 崇きたお たかしTakashi Kitao

過去Past
元ゲーム開発者Former game developer『METAL GEAR SOLID』企画 / ムービー制作Planner / Cutscene Production『ZONE OF THE ENDERS』シリーズメインプログラマ / ゲームデザインユニットディレクターLead Programmer / Game Design Unit Director
現在Now
ソニー株式会社 技術開発研究所 XRシステム技術開発部 統括部長General Manager, XR Systems Technology Development Dept., Technology Development Laboratories, SonyXR(拡張現実・仮想現実・複合現実)とAIの研究開発R&D in XR (AR/VR/MR) and AI
個人開発Personal project
2018年からレトロゲームエンジンPyxelを開発Developing the retro game engine Pyxel since 2018
著書Book
『ゲームで学ぶPython! Pyxelではじめるレトロゲームプログラミング』Learn Python Through Games: Retro Game Programming with Pyxel2025年1月 技術評論社刊January 2025, published by Gijutsu-Hyoron Co., Ltd.
『ゲームで学ぶPython! Pyxelではじめるレトロゲームプログラミング』の表紙

レトロゲームエンジンPyxel(ピクセル)

Pyxel (/ˈpɪksəl/), a Retro Game Engine

レトロゲーム風のゲームを簡単に作るための、Pythonモジュール&ツールA Python module and tools for easily making retro-style games

コンセプトConcept
気軽に楽しくプログラミングEasy and fun programming
動作環境Platforms
Windows・Mac・Linux・WebブラウザWindows, Mac, Linux, and web browsersChrome OS、Raspberry Pi、中華ゲーム機でも動作Also runs on Chrome OS, Raspberry Pi, and Chinese handhelds
同梱ツールBundled tools
イメージエディタ/サウンドエディタImage editor and sound editor
ライセンスLicense
MITライセンスMIT License商用利用も含め、無料で自由に使えるFree to use, including commercially
採用実績Adoption
世界中の教育機関やプログラミング教室で採用Schools, coding classes, and more, worldwide慶應義塾大学、大阪大学、TentoなどKeio University, Osaka University, Tento, and more
公式サイトWebsite
https://github.com/kitao/pyxelDocumentation, examples, and source

ユーザー作品のモザイクと、これまでの数

現代版「レトロゲーム」

Retro Games Made Today

Pyxel書籍付属サンプル『Cursed Caverns』Cursed Caverns, a sample game from the Pyxel book

Music © Maki Kirioka

Pyxel製の商用タイトル『Dungeon Antiqua』Dungeon Antiqua, a commercial title made with Pyxel

© Shiromofu Factory

Pyxelで、プログラミングを遊ぼう!──「楽しく作る」をデザインする

Let’s Play Programming with Pyxel! — Designing the Fun of Making

本日は、Pyxelがどのようにプログラミングを「遊び」に変えているのか、
その仕組みや考え方、そこに込めた想いについてお話ししますHow Pyxel turns programming into play — the mechanisms, the thinking, and the wish behind them

CHAPTER 1
アイデアを形にできると、うれしい Bringing Your Ideas to Life Feels Great
CHAPTER 2
みんなと作るのって、面白い Making Things Together Is Fun
CHAPTER 3
これからのPyxelは、もっと楽しい! Pyxel’s Future Is Even More Exciting!

CHAPTER 1

アイデアを形にできると、うれしい

Bringing Your Ideas to Life Feels Great

Pyxelを作った理由

Why I Made Pyxel

自分のためにFor myself
好きなものを作りたかったI wanted to build something I loved
やるならやはり好きなゲーム、
題材は思春期を過ごしたレトロゲームThen it had to be games —
the retro ones I grew up with
息子のためにFor my son
手軽なプログラミング環境が欲しかったI wanted an easy programming environment
既存のゲームエンジンは複雑すぎ、
レトロゲーム向けのものはLuaが主流だったThe existing engines were too complex,
and the retro ones mostly used Lua

レトロゲームを題材にしたゲームエンジンを自分で作ることにしたI decided to build a retro-game engine of my own

ゲームエンジンの中でのPyxelの位置づけ

Where Pyxel Sits Among Game Engines

広く使える言語(Python等)General-purpose language (Python, etc.)
ゲーム向け言語(Lua等)Game-oriented language (Lua, etc.)
高機能(複雑さ大)Powerful
(but complex)
シンプル(制約大)Simple
(but limited)
欲しかったものWhat I wanted Unreal Engine Unity Godot Pygame LÖVE TIC-80 PICO-8

ゲームエンジンの中でのPyxelの位置づけ

Where Pyxel Sits Among Game Engines

広く使える言語(Python等)General-purpose language (Python, etc.)
ゲーム向け言語(Lua等)Game-oriented language (Lua, etc.)
高機能(複雑さ大)Powerful
(but complex)
シンプル(制約大)Simple
(but limited)
Pyxel Unreal Engine Unity Godot Pygame LÖVE TIC-80 PICO-8

「これならできそう」と思わせる仕掛け

Making It Feel Doable

1
シンプルで学びやすいPythonでプログラムを書けるWrite your program in Python — simple and easy to learnPythonは文法が素直で読みやすく、解説記事や入門書も多いPlain syntax, readable code, and plenty of tutorials and books
2
気軽にインストールして、すぐに使い始められるInstall it without fuss and start using it right awayMITライセンスで無料。どの環境でもpip installだけで導入できるMIT-licensed and free; pip install alone works on any platform
3
必要ツールが同梱されており、絵や音が簡単に作れるThe tools come with it, so art and sound are easy to make外部ツールの購入・習得が不要。簡単な操作でゲーム素材を作成できるNothing to buy or learn; simple controls make your game assets
4
あえて「レトロゲーム」らしい制約を入れているAnd it deliberately keeps retro-game-style limits
ドット絵のエディタ 音のエディタ

どちらも「すごい」。では「作れそう」なのは?

Both Are Impressive. So Which One Feels Doable?

ZBrushで作られたドラゴンのスカルプト
3Dモデリングツール3D modeling tool

Dragon phantom beast © Keita Okada / Villard Inc.

マインクラフトで再現されたモン・サン=ミシェル
マインクラフトMinecraft

Mont-Saint-Michel © milk猫 (@milk94698164)

どちらも「すごい」。では「作れそう」なのは?

Both Are Impressive. So Which One Feels Doable?

野口登志夫「未開の地」のイラスト
フルカラーのキャラクターイラストA full-color character illustration

© Toshio Noguchi

Pyxelで描かれたドット絵のイラスト

ドット絵のキャラクターイラストA pixel-art character illustration

© Toshio Noguchi © @helpcomputer0

Pyxelの「レトロゲーム」制約

Pyxel’s Retro-Game Limits

一般的なゲームエンジン A typical game engine Pyxel A retro game engine
Color フルカラー ── 約1,677万色 About 16.77 million colors 16色・半透明なし 16 colors, no translucencyPyxel の16色パレット
Sound 同時発音数も音色も実質無制限 Effectively unlimited voices and timbres 同時発音数は4音/音色は4種類 4 voices, 4 waveforms
画像Images サイズも枚数も自由 Any size, any number 256×256サイズの画像が3枚 3 banks of 256×256
描画命令Drawing commands 用途ごとに膨大なAPI A vast API for every purpose 基本の描画命令は10種類 10 basic drawing commands

Pyxelの描画命令

Pyxel’s Drawing Commands

同梱サンプル 03_draw_api.py の実行画面 ── 命令名と、その命令が実際に描いた絵が、1対1で並んでいる

画面をクリアするClear the screen

点を描画するDraw a pixel

四角形を描画するDraw a filled rectangle

円を描画するDraw a filled circle

画像を描画するCopy from an image bank

文字を描画するDraw a string

直線を描画するDraw a line

四角形の枠線を描画するDraw a rectangle outline

円の枠線を描画するDraw a circle outline

タイルを並べて描画するCopy from a tilemap

ゲームを作ってみよう① 図形を描く

Making a Game 1 — Drawing Shapes

描画命令で、キャラクターを描く Draw the characters with drawing commands

import pyxelpyxel.init(160, 120)pyxel.cls(1)pyxel.line(0, 112, 159, 112, 3)pyxel.rect(76, 104, 8, 8, 10)pyxel.rect(40, 20, 8, 8, 8)pyxel.show()
実行画面。地面の線の上に自機の四角、上のほうに敵の四角が1つ。止まったまま

ゲームを作ってみよう② 図形を動かす

Making a Game 2 — Moving the Shapes

座標を変えながら描画を繰り返すと、アニメーションになる Repeat the drawing while shifting the coordinates, and it becomes animation

import pyxelpyxel.init(160, 120)enemies = [[pyxel.rndi(0, 152), -i * 16] for i in range(16)]while True:    pyxel.cls(1)    pyxel.line(0, 112, 159, 112, 3)    for enemy in enemies:        enemy[1] += 2        if enemy[1] > 120:            enemy[0], enemy[1] = pyxel.rndi(0, 152), -8        pyxel.rect(enemy[0], enemy[1], 8, 8, 8)    pyxel.rect(76, 104, 8, 8, 10)    pyxel.flip()
実行画面。敵の四角が8つ、上から次々に降ってくる。自機は動かない

ゲームを作ってみよう③ キーで操作する

Making a Game 3 — Controlling It With Keys

キー入力で、キャラクターを操作できるようにする Take key input to make the character controllable

import pyxelpyxel.init(160, 120)x = 76enemies = [[pyxel.rndi(0, 152), -i * 16] for i in range(16)]while True:    pyxel.cls(1)    pyxel.line(0, 112, 159, 112, 3)    if pyxel.btn(pyxel.KEY_LEFT):        x -= 2    if pyxel.btn(pyxel.KEY_RIGHT):        x += 2    for enemy in enemies:        enemy[1] += 2        if enemy[1] > 120:            enemy[0], enemy[1] = pyxel.rndi(0, 152), -8        pyxel.rect(enemy[0], enemy[1], 8, 8, 8)    pyxel.rect(x, 104, 8, 8, 10)    pyxel.flip()
実行画面。左右キーで自機が左右に動き、降ってくる敵を避ける

ゲームを作ってみよう④ 絵と音を作る

Making a Game 4 — Making Art and Sound

同梱のPyxel Editorで、キャラクターと効果音を作る Make the character and the sound effect in the bundled Pyxel Editor

イメージエディタ画面The Image Editor screen
サウンドエディタ画面The Sound Editor screen

ゲームを作ってみよう⑤ 絵と音を入れる

Making a Game 5 — Adding the Art and Sound

import pyxelpyxel.init(160, 120)pyxel.load("game.pyxres")pyxel.gen_bgm(7, 0, 3, 0, play=True)x = 76enemies = [[pyxel.rndi(0, 152), -i * 16] for i in range(16)]game_over = Falsewhile True:    pyxel.blt(0, 0, 0, 0, 0, 160, 120)    if pyxel.btn(pyxel.KEY_LEFT) and not game_over:        x -= 2    if pyxel.btn(pyxel.KEY_RIGHT) and not game_over:        x += 2    for enemy in enemies:        if not game_over:            enemy[1] += 2            if enemy[1] > 120:                enemy[0], enemy[1] = pyxel.rndi(0, 152), -8            if abs(enemy[0] - x) < 8 and abs(enemy[1] - 104) < 8:                pyxel.play(3, 0)                game_over = True        pyxel.blt(enemy[0], enemy[1], 0, 8, 120, 8, 8, 0)    pyxel.blt(x, 104, 0, 0, 120, 8, 8, 0)    pyxel.flip()

制約は「学びの道具」でもあった

Limits Were Also a Tool for Learning

ないものは作り、できないことは工夫で越えた。Pyxelは「あの頃」の再現でもある You built what didn’t exist and improvised past what you couldn’t do. Pyxel is a recreation of those days

1986年プログラムを始めた年I started programming in 1986
調べたくてもネットは無い。雑誌やプロの作品から学び、BASICが遅ければマシン語で書いた No internet. You learned from magazines and the pros, and wrote machine code when BASIC lagged
1998年メタルギアソリッド(PS1)MGS shipped on PS1 in 1998
性能では、思い描いた3Dに届かない。ポリゴンを減らし、足りない分は見せ方で補った The hardware fell short of the 3D we wanted. We cut polygons and made up the rest in the look
2001年ゾーンオブエンダース(PS2)Z.O.E shipped on PS2 in 2001
開発キットは未成熟で、必要なものが揃わない。ゲームより先に、作るための道具から作った The dev kits were immature and nothing we needed was there. Before the game itself, we built the tools to build it

制約の外し方を遊びにする

Making the Way Around a Limit Into Play

Pyxelの存在意義は制約。その外し方を隠して、自由度と両立させている The limits are why Pyxel exists. Hiding the way around them lets limits and freedom coexist

① 制約の解除方法を裏技化 Turned the way around a limit into a cheat code
配列の要素数操作や、隠しクラスのインスタンス登録で、色数や同時発音数を書き換えられる Resize the arrays or register a hidden class instance, and the color and channel counts change
EXTRA_COLORS = [    0xFF004D, 0xFFA300, 0xFFEC27, 0x00E436,    0x29ADFF, 0x83769C, 0xFF77A8, 0xFFCCAA,    0x291814, 0x111D35, 0x422136, 0x125359,    0x742F29, 0x49333B, 0xA28879, 0xF3EF7D,]pyxel.colors[16:] = EXTRA_COLORSpyxel.channels.append(pyxel.Channel())

16色から32色に伸ばしたパレット

② 上級者向けAPIを分離 Split the advanced API off
データの直接操作など、専門知識が必要なAPIを通常時はリファレンスで非表示に。チェックを入れると表示される APIs needing specialized knowledge, like direct data access, are hidden in the reference until you tick the box

Pyxel APIリファレンスの検索欄。右に Advanced のチェックボックスがある

APIリファレンスの一覧。title() には ADV の印が付いている

Pythonならではの広がり

What Python Opened Up

日常のPythonに、出来心で import pyxel。そこから愉快な作品が生まれている An idle import pyxel in everyday Python — and delightful works keep appearing

ESP32のセキュリティ基板の操作画面。スキャンのメニューとフード姿のドット絵
Watch Dogs Go© LOCOSP
ESP32の基板をつなぎ、周りのWi-FiBluetoothを拾う。操作画面はPyxel An ESP32 board picks up nearby Wi-Fi and Bluetooth. The control screen is Pyxel
小型PCのホーム画面。WEB・TERM・FILESなどのアイコンが並ぶ
GPD Pocket POS© moto
7インチのPCで、デスクトップの代わりに起動。ブラウザも端末もここから開く It boots on a 7-inch PC in place of the desktop. The browser and terminal open from here
Pen Apple© RuneBlaze
カードの効果は文章で書くだけ。それをLLMがゲームのルールにする Cards are just sentences — an LLM turns them into the game’s rules

アイデアを形にできると、うれしい

Bringing Your Ideas to Life Feels Great

みんなのアイデアも形になり、Pyxel User Examplesに集結 Other people’s ideas took shape and gathered in Pyxel User Examples

CHAPTER 2

みんなと作るのって、面白い

Making Things Together Is Fun

遊んでもらう楽しさ

The Fun of Having People Play

作って終わりにせず、共有することで、次の展開が始まる Making it is not the end — share it, and the next chapter begins

好きなものを作る 見せて、 遊んでもらう 感想が返ってくる もっと 作りたくなる You make what you like You show it, someone plays it A reaction comes back You want to make more

Pyxelの「共有の仕組み」 How Pyxel makes sharing work

スクリーンショット機能 Screenshot & screencast Alt1画面を画像で保存 Screenshot Alt3直近10秒をGIFで保存 Last 10s as a GIF
作品共有の場Pyxel User Examples A place to share your work — Pyxel User Examples
配布用形式Pyxelアプリケーションファイル A distribution format — the Pyxel application file

Pyxelアプリケーションファイル

Pyxel Application File

必要なファイルを1つに詰めたPyxel専用のファイル形式。コマンド1つで作成・実行できる A Pyxel-specific file format that packs everything into one file — one command to build, one to run

1必要なファイルを揃える Gather everything it needs
Pythonのコード Python files
絵と音(.pyxres) Art and sound
その他のファイル Whatever else it needs
2pyxel package1つにまとめる bundles it into one
Pyxelアプリケーション
ファイル Pyxel application file
(.pyxapp)
3pyxel play実行する runs it
4OSを選ばず動く It works on any OS
Windows・Mac・Linux対応 Windows, Mac, and Linux
展開も配置も不要 No unpacking, no placing
SNS・ゲームジャムで共有 Share it online or at a game jam

残る課題Still unsolvedPythonPyxelがインストールされた環境でないと、渡しても動かせない Unless Python and Pyxel are installed, handing it over gets them nowhere

WebPyxelへの道のり

The Road to Pyxel on the Web

コミュニティと周辺プロジェクトを巻き込んだ「みんなと作る」総力戦になった It became an all-out effort — making things together with the community and nearby projects

2018年10月
jahodfra氏が「Brythonで動かせないか」とissueに書き込み jahodfra asks in an issue: could Brython run it?
2021年12月
13ヶ月かけて、コアエンジンのC++からRustへの移行が完了する After 13 months, the core engine finishes moving from C++ to Rust
2022年5月
km19809氏が数ヶ月かけて、コアエンジンのWASM化に成功する km19809 spends several months and compiles the core engine to WASM
2022年8月
maturinmessense氏と共に、Python側もWASM化する With messense of maturin, we compile the Python side too
2022年9月
SDL向けに改造したPyodideを同梱して、Web版を公開開始 Pyxel ships for the web with a Pyodide we modified for SDL
2023年4月
PyodideChoi氏がSDL対応を実装。改造版の同梱が不要になる Choi of Pyodide lands SDL support, and the modified build is no longer bundled
BrythonPythonJavaScriptに変換して動かす実装 Runs Python by translating it to JavaScript
RustWeb等の各種環境向けにコンパイルできる言語 Compiles to many targets, including the web
WASMブラウザが直接実行できる、機械語に近い形式 A near-machine-code format browsers run directly
PyodidePython本体をWASMにコンパイルした実装 CPython itself, compiled to WASM
maturinRust製のPython拡張をパッケージにするツール Packages Rust-built Python extensions
SDL画面・音・入力を扱うライブラリ A library for screen, sound, and input

WebPyxelの仕組み

How Pyxel Works on the Web

1
Pyxel本体をCDNサーバーに置き、インストールなしで実行Pyxel sits on a CDN — it runs with no installpyxel.jsスクリプトが、Python実行環境(Pyodide)とPyxel本体を読み込むThe pyxel.js script pulls in Pyodide (a Python runtime) and Pyxel itself
2
独自のHTMLタグを定義し、HTML内にPythonを直接記述A custom HTML tag lets Python live right inside the HTMLブラウザがタグを見つけると、中身のコードを取り出してPyxelに渡すWhen the browser finds the tag, it hands the code inside to Pyxel
3
pyxapppyxel app2htmlコマンドでHTMLに変換The pyxel app2html command turns a pyxapp into a standalone HTML filepyxappBase64エンコードし、復元コードとともにHTMLに書き込むThe pyxapp is Base64-encoded and written into the HTML with the code that restores it
<script src="https://cdn.jsdelivr.net/gh/kitao/pyxel/wasm/pyxel.js"></script><pyxel-run script="import pyxelpyxel.init(200, 150)pyxel.cls(8)pyxel.line(20, 20, 180, 130, 7)pyxel.show()"></pyxel-run>

HTMLファイルを開く Open the HTML file

URLだけで遊べる究極形へ

The Ultimate Form: Play From a URL Alone

Pyxel Web Launcher ── GitHubに置いたファイルを、URLで指定して起動する Pyxel Web Launcher — point a URL at a file on GitHub to launch it

https://kitao.github.io/pyxel/web/launcher/ランチャーの場所the launcher ?run=コマンドcommand taroユーザーuser / my_repoリポジトリrepo / mainブランチbranch / src/titleパスpath

URLを開くOpen the URL
ランチャーがリポジトリ名とファイル名をURLから読み取るThe launcher reads the repository and file names from the URL
CDNから取得Fetch from the CDN
Pyxel本体とGitHubのファイルをダウンロードするIt downloads Pyxel itself and the files from GitHub
ブラウザで実行Run in the browser
ダウンロードしたファイルをWebPyxelに渡して動かすIt hands the downloaded files to Pyxel for the web and runs them

共有の準備は必要なく、GitHubで公開されていれば、そのまま遊べるNo setup to share — if it is public on GitHub, it just playsこの講演のトレーラーを Web Launcher で開くQRコード

Web技術で広がる可能性

What Web Tech Opens Up

他の技術と繋がり、別の環境に組み込める。Webならではのアプリの形が見えた Wired to other tech, embedded elsewhere — a kind of app possible only on the web came into view

Pyxel Code MakerPyxel Code Maker
ブラウザ上で動く統合開発環境 An IDE that runs in the browser
Pyxel Code Maker の画面。左にPythonのコード、右で実行中
Pyxel VS Code拡張Pyxel VS Code extension
VS Code上で動く実行環境 A runtime that runs inside VS Code
VS Code の中で Pyxel Editor が動いている画面
Pyxel MML StudioPyxel MML Studio
Pyxel MMLの音楽制作ツール A music tool for Pyxel MML
Pyxel MML Studio の画面。4チャンネルぶんのMMLが入り、再生中

Web技術の応用① Pyxel Code Maker

Applying Web Tech 1 — Pyxel Code Maker

教室で最初につまずくのは、環境構築 ── ならIDEごとWebアプリにしよう The first wall in a classroom is setup — so make the IDE itself a web app

Pyxel Code Maker の画面。左にPythonのコード、右で実行中

Web技術の応用② Pyxel VS Code拡張

Applying Web Tech 2 — Pyxel VS Code Extension

VS Codeの中身はブラウザ ── じゃあ、Pyxelをそのまま動かせるはず VS Code is a browser inside — so Pyxel should just run there

VS Code の中で Pyxel の Mega Ball が動いている画面

Web技術の応用③ Pyxel MML Studio

Applying Web Tech 3 — Pyxel MML Studio

音楽が文字列で書けるなら ── 曲はQRコードに丸ごと入るのでは? If music is just text — then maybe a whole tune fits in a QR code?

MML(Music Macro Language)音楽を文字列で書く記法A notation for writing music as textT120 O4 L8 CDEFGAB>Cテンポ120・オクターブ4・8分音符で、ドレミファソラシドTempo 120, octave 4, eighth notes — then the scale
Pyxel MML Studio の画面。3チャンネルぶんのMMLが入り、再生中

みんなと作るのって、面白い

Making Things Together Is Fun

教育機関への展開Into schools and universitiesフランスの高校情報科(NSI) ── 国の公式教材に採用Official course material for French high-school CS大学の授業 ── 慶應SFC・大阪大学・スペインUC3M・ニュージーランドUnitecKeio SFC, Osaka Univ., UC3M (Spain), Unitec (NZ)
ゲームジャムへの展開Into game jamsNuit du Code ── 61か国・609校が参加する6時間のプログラミングイベントA 6-hour coding event — 609 schools in 61 countriesScientific Game Jam ── 科学をテーマにしたゲームジャム。高校生チームがPyxelで制作A game jam on science — a high-school team used Pyxel
Nuit du Code 公式サイト。参加数と、Python側の「préparer et faire la NDC avec Pyxel Studio」が読める
Scientific Game Jam Tokyo 2025 のポスター。科学をゲームにしよう、48時間で制作

CHAPTER 3

これからのPyxelは、もっと楽しい!

Pyxel’s Future Is Even More Exciting!

AI時代に「楽しく作る」は必要か?

Does the Joy of Making Still Matter in the Age of AI?

AIが書くコードの割合は年々上昇中The share of AI-written code climbs year after year
AI生成・支援の
コードの割合Share of AI-generated or assisted code
Sonar「State of Code」2026
2026年以降は見通しSonar State of Code 2026.
2026 onward is an outlook.
6% 19% 42% 55% 65% 80 40 0 2023 2024 2025 2026 2027
プログラミングとの関わり方が変わるHow people take part in programming is changing
新たに開発者となる人も増加中And more and more people are becoming developers
GitHubに参加した
新規開発者数New developers per year on GitHub
GitHub Octoverse
2023・2024年は算出値GitHub Octoverse.
2023 and 2024 are derived.
2,050万 2,440万 2,600万 3,600万 4000 3000 2000 2022 2023 2024 2025
作りたい人は、実はたくさんいるThere are, in fact, plenty of people who want to make

何を作るか考え、方向づけるのは人の役割。「情熱を育てる」仕掛けがより重要にSetting the goal and giving direction is the human role — and devices that grow the passion matter more than ever

「楽しく作る」ためのAIの立ち位置

Where AI Stands in the Joy of Making

AIはやる気を奪うものではなく、「作る楽しさ」を広げるパートナーになれるAI does not take away the will to make — it can be a partner that widens the joy of making

1チームメンバーの一員としてAs one of the team members
人と同じように担当を持ち、一緒に作るAI holds a role just like the others, and builds together
ゲーム担当Game logicHuman
ここは任せてLeave it to me
ツール担当ToolsAI
グラフィック担当ArtHuman
いい音にするねI’ll make it sound good
効果音担当Sound effectsAI
音楽担当MusicHuman
アイデアを出すGenerate ideasコードを書くWrite code動かして試すRun and test改善するImprove
2チームメンバーをつなぐ役としてAs the one who connects the team
AIが橋渡しをして、国や言葉の違う人と一緒に作るAI bridges people across countries and languages
あなたYouHuman
つなぐConnect
つなぐ役ConnectorAI
見つけるFind
Bonjour
Hello
안녕하세요
まだ知らない仲間People you haven’t metHuman
仲間を見つけるFind people会話を翻訳するTranslate意図を伝えるConvey intent段取りを組むCoordinate

AI時代へのPyxelの対応

How Pyxel Is Meeting the Age of AI

人の使い方は変えずに、AIのための道具を新たに開発Without changing how people use it, new tools built for AI

pyxel-mcpMCP準拠 / Built on MCP MCP AI Pyxel AIと道具をつなぐ共通の差込口A common plug between AI and tools
AIPyxel操作ツールキットA Pyxel toolkit for AI
超早送り実行Turbo run通常の300倍速で実行Runs at 300× normal speed 事前ミス検出Static checks動かす前に誤りを見つけるFinds errors before it runs 擬似コントローラーVirtual controllerキー操作を送り込むFeeds key presses in 画面の差分比較Frame diff1ドットの違いも見つけるCatches a one-pixel change ヘッドレス実行Headless runウィンドウを開かないNo window at all 画像・音声ファイル保存Image and audio export画面をPNG、音をWAVScreens as PNG, sound as WAV
pyxel-skillAgent Skill形式 / An Agent Skill AI SKILL 読ませると、作り方が分かるRead it, and it knows how to build
AIPyxel作業手順書A Pyxel working guide for AI
SKILL.md
## 作る手順Workflow 1. 遊べる最小の形を見きわめるFind the smallest playable scope 2. 入口・操作・目的・やり直しを作るBuild one complete slice 3. validate で誤りと警告を確かめるCheck errors and warnings 4. run でコマ0から動かし画面を撮るRun from frame 0 and capture 5. ログを読み、撮った画面を見るRead the log, look at the frame 6. 見つけた不具合だけを直すFix only observed defects 7. 操作方法と結果を報告するReport the controls and results

「新しいレトロ」への挑戦

Taking On a New Kind of Retro

PS2でさえ、もう26年前。Pyxelで「レトロ3Dゲーム」が作れてもいい頃 Even the PlayStation 2 is 26 years old — about time Pyxel let you make retro 3D games

1983
ファミコンFamily Computer / NES
1988
メガドライブMega Drive / Genesis
1990
スーパーファミコンSuper Famicom / SNES
1994
セガサターンSega Saturn
1994
プレイステーションPlayStation
1998
ドリームキャストDreamcast
2000
PlayStation 2
2006
PlayStation 3
2017
Nintendo Switch
2020
PlayStation 5
2025
Nintendo Switch 2
レトロ2D時代The retro 2D era

ドット絵・平面(従来のPyxel)Pixel art, flat plane (Pyxel so far)

悪魔城ドラキュラの画面がんばれゴエモンの画面

悪魔城ドラキュラ © 1986 KONAMI
がんばれゴエモン © 1991 KONAMI

レトロ3D時代The retro 3D era

ローポリゴン・立体空間Low poly, 3D space

メタルギアソリッドの画面ZONE OF THE ENDERS の画面

METAL GEAR SOLID © 1998 KONAMI
ZONE OF THE ENDERS © 2001 KONAMI

Console photos: Wikimedia Commons — PlayStation 5 by Gianlupisa1 (CC BY-SA 4.0), backgrounds removed

Pyxel Cubeの使い方

How to Use Pyxel Cube

ノードツリーで要素を配置。ノードの書き方は、2D版と同じ考え方 Arrange things with the node tree. Writing a node follows the same idea as in 2D

ノードツリーThe node tree
  • Scene場面全体The whole scene
    • FieldマップThe map
    • Player自機Your ship
      • Jetジェットエフェクト(自機に追従)The jet effect, follows the ship
    • Enemy敵キャラクターAn enemy character
      • Glare発光エフェクト(敵に追従)The glow effect, follows the enemy
Enemyノードの中身Inside the Enemy node
from pyxel.cube import Node, Vec3class Enemy(Node):    def on_update(self):        self.transform = self.transform.translate(            Vec3(0.05, 0, 0))    def on_draw(self):        self.circ(Vec3.ZERO, 0.5, 11)        self.text(Vec3(0, 0.8, 0), "enemy", 7)

Pyxel Cube動作画面

Pyxel Cube in Action

Pyxel Cube の基本形状のデモ
Pyxel Cube のロックオンレーザーのデモ

近日公開予定Coming soon

これからのPyxelは、もっと楽しい!

Pyxel’s Future Is Even More Exciting!

PyxelAIがもっと身近にAI feels closer with Pyxel
AIは新しい仲間になれるAI can be a new teammate
pyxel-mcppyxel-skill
AIPyxelが効率よく連携pyxel-mcp and pyxel-skill let an AI
and Pyxel work together efficiently
Pyxelは「新しいレトロ」へPyxel heads for a new kind of retro
3Dのゲーム機も、レトロの領域に3D consoles are entering retro territory too
Pyxel 3.0Pyxel Cubeを追加
2Dと同じ書き方で、3Dも作れるPyxel Cube arrives in Pyxel 3.0 —
written the same way as 2D, now in 3D

AI時代も、Pyxelで気軽に楽しくプログラミング!Even in the age of AI, easy and fun programming with Pyxel!

CLOSING

おわりに

In Closing

「楽しく作る」は、デザインできる

The Fun of Making Can Be Designed

これからも一緒に、PyxelPython
プログラミングを遊んでいきましょう!Let’s keep playing programming together — with Pyxel and Python!

この発表資料を開くQRコード発表資料Slides