Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
phina.jsで弾幕シューティングを作る / Creating a bullet-hell ...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Hiroya-W / yuyukun
November 23, 2023
Technology
330
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
phina.jsで弾幕シューティングを作る / Creating a bullet-hell shooter with phina.js
Hiroya-W / yuyukun
November 23, 2023
More Decks by Hiroya-W / yuyukun
See All by Hiroya-W / yuyukun
PHPカンファレンス振り返りと プロポーザルについて話します / PHP Tech Talk Night ~ after phpcon 2026
hyuyukun
0
51
PSRにのっかってバックエンドサーバを書く / Write a backend server using PSR
hyuyukun
0
100
ピアノ経験ゼロからピアノを練習して弾いてみた / I practiced and played the piano from zero piano experience.
hyuyukun
1
170
Blenderに入門しました / I started to use Blender
hyuyukun
0
170
気軽にパソコンを吹き飛ばせるようにするために / To initialize your computer easily
hyuyukun
0
120
僕っぽいことを喋るBotをマストドンで育てています / I'm growing a bot on mastodon that talks like me.
hyuyukun
0
160
4年と半年かけてようやくフロントエンドを書けるようになった / It took me 4 years and 6 months to be able to write the frontend
hyuyukun
0
360
Neofetchライクな自己紹介ツールyuyufetchを作った / Created yuyufetch, a Neofetch-like self-introduction tool
hyuyukun
1
390
世界観を考察するのが好き?Sound Horizonはいいぞ / Introduction to Sound Horizon
hyuyukun
0
1.1k
Other Decks in Technology
See All in Technology
ビジネス部門からPOを迎えての半年間の進歩と課題
zozotech
PRO
0
170
Flutter Widget Previewerで始めるUIプレビューとVRTの自動化
sakusaku3939
0
180
AWSセキュリティで活用するAI機能
cmusudakeisuke
1
380
Devin プロモコードの受け取りと適用(2026.10.27)
kinopeee
1
730
データマネジメント × 法務で作りあげる、 freeeの新しいデータガバナンスへの軌跡
freee
PRO
2
580
Claude Codeから見る、エンジニアの世界の変容とその先
oikon48
7
4.9k
2拠点SRE活動始めてみた | sogaoh's LT @ ホンマでっかSRE勉強会 #3
sogaoh
PRO
0
210
日本AIベンチャーレポート2026
kentarofujii
0
260
AIテスト自動化と評価駆動開発EDD
happysamurai294
0
110
バイブコーディングの特徴と「コケて直す」ループ
happysamurai294
0
130
How we choose session proposals
kawaguti
PRO
1
190
AIエージェントに 権限と鍵をどこまで渡すか
nrinetcom
PRO
2
160
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
Navigating Weather and Climate Data
rabernat
0
570
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
510
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
780
Code Reviewing Like a Champion
maltzj
529
40k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
500
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
460
Building Adaptive Systems
keathley
44
3.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Transcript
QIJOBKTͰ ນγϡʔςΟϯάΛ ࡞Δʂ ゆゆ君(@Hyuyu_kun) in あくあたん工房 2023/11/23
2 phina.js: JavaScript で作られたゲームライブラリ https://phinajs.com
サンプル 3 https://phinajs.com
4 Runstant: ブラウザ上で動作するエディタ&プレビュー https://runstant.com
phina.jsでサクッと作って動かしてシェア! 5
6 弾幕シューティング 怒首領蜂 東方Project https://store-jp.nintendo.com/list/software/70010000046176.html https://www.youtube.com/watch?v=VL5VZuUcX74
7 弾幕シューティング 怒首領蜂 東方Project 自機 https://store-jp.nintendo.com/list/software/70010000046176.html https://www.youtube.com/watch?v=VL5VZuUcX74
8 弾幕シューティング 怒首領蜂 東方Project 敵 https://store-jp.nintendo.com/list/software/70010000046176.html https://www.youtube.com/watch?v=VL5VZuUcX74
9 弾幕シューティング 怒首領蜂 東方Project 弾幕 https://store-jp.nintendo.com/list/software/70010000046176.html https://www.youtube.com/watch?v=VL5VZuUcX74
弾幕を避けながら敵を倒していくゲーム 10 中には美しい弾幕もあって綺麗
phina.jsで弾幕シューティングを作ってみる 11
12 参考書 https://www.amazon.co.jp/dp/4797352299
phina.jsで弾幕を作ってみる n 今回作ってみた弾幕 • 方向弾 • 渦巻弾 • 多方向渦巻弾 •
両回転渦巻弾 • 旋回加速渦巻弾 • 両回転渦巻弾 + 旋回加速渦巻弾 • 洗濯機渦巻弾 13
14 弾の実装 // 初期位置 // 発射角度(0.0~1.0) // 弾の進行方向の変化量 // 弾の初速
// 弾の加速度 // 移動方向 // 弾の進行方向を変化 // 弾の速さを変化
方向弾 15 // 下方向 速さ20
16 渦巻弾(方向弾を回転させればOK) // 発射方向を変化させる
17 多方向渦巻弾 // 発射数を指定できるように
18 多方向渦巻弾 // 発射数分の弾を生成 // それぞれ方向を変えて this.shotCount == 4の時、 i
/ this.shotCountは0.0, 0.25, 0.5, 0.75と変化する 右, 下, 左, 上
19 多方向渦巻弾 弾の密度を変えられるようにしたい
20 多方向渦巻弾 // 増やした
21 多方向渦巻弾 // this.timeはthis.interval回に1回0になる == 間引く
22 両回転渦巻弾 回転方向を2つ取るようにする - 時計回り - 反時計回り
23 両回転渦巻弾 // 両回転 // それぞれ発射回数分 // それぞれの回転方向
24 両回転渦巻弾 ちなみに、両回転の変化量を揃えてしまうと 簡単な弾幕になってしまう
25 旋回加速渦巻弾 ←旋回 加速→
26 旋回加速渦巻弾
27 両回転渦巻弾 + 旋回加速渦巻弾 2種類の弾幕を発射してくる敵(CombinedSpiralShooter)として実装
28 洗濯機渦巻弾 右巻き 右巻き→左巻き 左巻き 左巻き→右巻き
29 洗濯機渦巻弾 -maxShotAngleRate ~ maxShotAngleRate // 発射角度 -maxBulletAngleRate ~ maxBulletAngleRate
// 旋回角度 の範囲で変化させて右巻きになったり、左巻きになったりする
30 洗濯機渦巻弾 // 右巻き→左巻き // の値の変化は // 250: 1 //
275: 0 // 300: -1
31 Runstantで公開しているので遊んでみてね https://runstant.com/Hiroya-W/projects/caa17791
おしまい 32