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
using-play-cljc.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Niyarin
November 28, 2019
430
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
using-play-cljc.pdf
Niyarin
November 28, 2019
More Decks by Niyarin
See All by Niyarin
Scheme用nREPLの開発(エラー出力の改善)
niyarin
0
190
bel lispの紹介
niyarin
0
800
nanopass-compiler-frameworkを使ってみました
niyarin
0
510
Gorgos-parser-combinator-written-in-scheme
niyarin
0
430
outputting-beautiful-s-expression
niyarin
0
430
Serialisp
niyarin
1
750
Mongo DBとS式検索
niyarin
0
360
goodbye-python-repl
niyarin
0
410
SchemeのEphemeronとWeak Pairの説明
niyarin
0
1.1k
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
620
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
910
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
300
Test your architecture with Archunit
thirion
2
2.5k
Site-Speed That Sticks
csswizardry
13
1.6k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
780
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
320
Fireside Chat
paigeccino
43
4.1k
Typedesign – Prime Four
hannesfritz
42
3.2k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
810
Transcript
Clojureで昔のAndroid用ゲーム を 書き直そうとしている話 Niyarin
古いAndroid Appが動かなくなった(1) AndroidAppが流行りだった時代のプロダクトが動かなくなった ・動かないよという内容のメールをもらったことで知った。存在を忘れていた。
古いAndroid Appが動かなくなった(2) 流行りではなくなったのでライブラリは開発が止まっていた → ライブラリのWebページも消滅していた アプリのソースコードも紛失した(たぶん、SSDのフォーマットでこの世界から消えた) → Clojureで書き直そうと思った
Lispでゲームを書いて人気取りをしよう Land of Lisp (ConradBarski) Realm of Racket (Conrad Barski達)
Common LispでSTGを作りますがなにか? (usamimi.info) Clojureによる、初めての関数型プログラミング(gpsoft) カジュアルな言語入門系記事は初心者にうれしいかもれしれない 参考)
ゲーム/Android用のライブラリの選択 思ったほど選択肢があるわけではなかった。 Clojure on Android 現在開発されておらず、立ち上がりも遅い(らしい) play-clj :libGDXベース ◦ AndroidとDesktop用に出力できる
☓ 開発が終了している play-cljc :Webgl,Openglベース ◦ 開発が終わっていない ☓ Android用バイナリは直接出力できない
Play-cljcでAndroid ・js,htmlファイルを出力してくれる (初期状態でそのままビルドした結果↓) これをWebViewに貼れば目的は達成できそう
WebViewにそのまま貼るだけでよいのか ◦画像表示がローカル同一オリジンポリシーエラーで うまくいかない ・サーバーにおいたり、開発時だとブラウザの設定 変更が必要なやつ D/MyApplication: Uncaught SecurityError: Failed to
execute 'texImage2D' on 'WebGL2RenderingContext': The image element contains cross-origin data, and may not be loaded
WebViewにそのまま貼るだけでよいのか ・許可周りの設定を加えたりすることで動かすことはできた。 → このままいってもよさそうなのであとは実装するだけ。 webView.getSettings().setDomStorageEnabled(true); webView.getSettings().setAllowFileAccessFromFileURL s(true); webView.getSettings().setAllowUniversalAccessFromFil eURLs(true); webView.setWebViewClient(new WebViewClient());
ちょっとだけPlay-cljcに触れてみた ・ライブラリは標準的なゲームライブラリに近い ・2D 3Dの両対応 ・OpenGLの手続きが呼べる ・Clojureの要素でシェーダーが書ける機能もある
まとめなど ◦Play-cljcはjsを出力できるので、webviewに貼ればAndroidアプリとして出せそう ・js+htmlだと割と長いことメンテしなくても良さそう ◦みなさんも放置しているAndroidアプリがあれば、確認したほうが良いですよ ・Clojureで書き直そうとはいいませんが ◦Clojure Advent Calendar 2019で追加情報、進捗とか書けるとよいかなと思っている