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
ブラウザで遊ぶ自作シューティングゲームの紹介
Search
Takahashi Masaya
December 20, 2023
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ブラウザで遊ぶ 自作シューティングゲームの紹介
Takahashi Masaya
December 20, 2023
More Decks by Takahashi Masaya
See All by Takahashi Masaya
昔のゲームをJavascriptとCANVASで実装した拙作紹介
takahashimasaya
0
210
Other Decks in Programming
See All in Programming
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
100
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.5k
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
140
SREの越境 / SRE Collaboration
y0hgi
2
300
phperだってパンチカードでコーディングしたい
o0h
PRO
0
210
自サークルのIdPからログアウトできるようになるまで
taiseiue
0
110
Workers Cache を知る
syumai
0
340
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
750
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
530
すこし踏み込む CancellationToken
htkym
2
1.6k
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
110
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
190
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
260
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
930
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
700
Faster Mobile Websites
deanohume
310
32k
WCS-LA-2024
lcolladotor
0
850
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
250
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
620
Art, The Web, and Tiny UX
lynnandtonic
304
22k
The Language of Interfaces
destraynor
162
27k
Transcript
ブラウザで遊ぶ ⾃作シューティングゲームの紹介 2023.12.20 TAKAHASHI MASAYA
a. ブラウザゲームの紹介 b. ステージ編集ツールを紹介 テーマ
⾃⼰紹介 • 名前:⾼橋雅也 @ma_taka https://github.com/TakahashiMasaya/ • 業務:Web開発 ⾃社開発設計・制作 • 開発:Nuxt3,
React • 趣味:ピアノ, サイクリング
a. ブラウザゲームの紹介 DEMO
動作確認 # Device Release CPU OS Version 1 iPhone 14Pro
Max 2022 A16 Bionic 17.1 2 iPhone 14 Plus 2022 A15 Bionic 17.1 3 iPad Pro(2022) 2022 Apple M2 17.1 4 iPad Air 4 2020 A14 Bionic 17.1 5 iPad mini 6 2021 A15 Bionic 17.1 Reference • iPhone:https://ja.wikipedia.org/wiki/IPhone • iPad:https://ja.wikipedia.org/wiki/IPad
動作確認 iPhone + RAZER KISHI V2 FOR IPHONE iPad +
Xbox Elite ワイ ヤレス コントローラー シリーズ 2 Windows PC + 8Bitdo Bluetooth アーケード スティック
→JavaScriptとCanvasで実装する⼿段があった 実装経緯 ⾃分が⼤好きだったシューティングゲームを PC・スマホで(それもブラウザで)楽しみたい フロントエンドのスキルアップ →実務や⾃作ツールを利⽤し、実際に⼿を動かして経験を増やす • フレームワーク • テストツール
• ソースコード整形ツール
開発ヒストリー 2017 2018 2019 2020 2021 2022 2023 4 12
ゲームを 作りたい React TypeScriptを 学習したい 1 ?
開発環境 # パッケージ バージョン 1 Vite 5.0.4 webpackからの移⾏ 2 Vitest
0.34.6 単体テスト 3 TypeScript 5.3.2 4 Biome 1.4.1 lintチェック、コードフィックス(.ts) 5 stylelint 15.11.0 lintチェック、コードフィックス(.scss) ※2023/12/1時点
作成ツール # アプリ 1 MediBang Paint iPad Proでイラスト作成 2 GarageBand
MacBookで曲、効果⾳作成
実装概要 • 描画 • Canvas API • サウンド • WebAudio
API • ゲームパッド • Gamepad API
実装の流れ (1) 敵を倒す (2) 障害物を作成 (3) ステージ構成を確⽴(空中戦→メイン→ボス) 1. ステージ作成
実装の流れ 2. ウェポン作成 (1) パターン選択 (2) 個別選択
実装の流れ 3. シーン作成 スタート画面 ステージ選択 ウェポン選択 ゲーム準備 ゲームオーバー ゲーム ステージクリア成功時
ステージクリア失敗時
テスト(ランタイム) http://localhost:8081/?debug=true&stage=0&ignoreplayercollision=true&stag estartposition=2000&stagescrollspeed=1&loop=2&ignoreboss=false&playerlife =0 →パラメータを使ってランタイムデバッグ debug=trueで有効
テスト(ランタイム) http://localhost:8081/?debug=true&stage=0&ignoreplayercollision=true&stag estartposition=2000&stagescrollspeed=1&loop=2&ignoreboss=false&playerlife =0 # キー 機能 1 stage ステージを選択
2 ignoreplayercollision ⾃機衝突判定の無効化 3 stagestartposition ステージの開始位置 4 loop 周回(難易度確認)
b.ステージ編集ツールの紹介
→キャラクター配置をjsonで更新するのは⾯倒・・・。 →UIでステージを編集したい 実装経緯 [{ "recoveryPositionX": [1600, 4100, 6250], .... "map":
[ "00B00000000A00000000B00000000A……00000B00", "000000000000000000000000000000……00000000", "000000m00G000000000L00m00G0000……0j0L0000", "000000000000000000000000000000……00000000", "000000000000000000000000000000……00000000", "000000000000000000000000000000……00000000", "000000000000000c0000000000c000……00000000", …… "000000000000000000000000000000……00000000" ], .... }], ステージにあるキャラクターを 文字列ビットとして配置
開発環境 # パッケージ バージョン 1 Nuxt 3.8.2 2 Vitest 0.34.6
コンポーネント、storeテスト確認 3 eslint 8.55.0 lintチェック、コードフィックス(.ts, .vue) 4 prettier 3.1.0 コードフォーマット、コードフィックス (.scss, .json, .yml, md) 5 stylelint 15.11.0 lintチェック、コードフィックス(.vue .scss) ※2023/12/1時点
作成ツール # アプリ 1 Adobe XD 画⾯デザイン作成
開発ヒストリー 2017 2018 2019 2020 2021 2022 2023 ステージ編集 ツール
9 8 start ? ステージ編集が 欲しい Vueを 学習したい Nuxtを 学習したい 12 ブラウザ ゲーム 4 12 start ゲームを 作りたい React TypeScriptを 学習したい 1 ? ? ?
GAME EDIT update score ranking 概要 update stage(s) authentication fetch
stages stages score ranking stages score ranking stages score ranking
まとめ・課題 1) シーティングゲームの実装・ステージ編集ツールを紹介しました 2) 今後 • フロントエンドの動向をみて何かしら着⼿ • シューティングゲーム •
新しいフレームワークの実験など • ステージ編集ツール • AWSへのデプロイしたい・・・