2. Motivation
こういうのをさっくりAndroid上に実装したい
I hope to rapidly implement such a game on Android
##########################################################
#........................................................#
#.###.#########.###############.########.###.#####.#####.#
#.###.#########.###############.########.###.#####.#####.#
#.....#########....J.............J.......###.............#
#####.###.......#######.#######.########.###.#######.#####
#####.###.#####J#######.#######.########.###.## ##.#####
#####.###L#####.## ##L## ##.## ##.###.## ##.#####
#####.###..H###.## ##.## ##.########.###.#######J#####
#####.#########.## ##L## ##.########.###.###V....#####
#####.#########.#######.#######..........###.#######.#####
#####.#########.#######.#######.########.###.#######.#####
#.....................L.........########..........R......#
#L####.##########.##.##########....##....#########.#####.#
#.####.##########.##.##########.##.##.##.#########.#####.#
#.................##............##..@.##...............R.#
##########################################################
2010/8/29 RejectKaigi2010 2
3. Development environment of
Android applications
基本は、Eclipseベースのクロス開発環境+
Androidエミュレータ/実機
– コードを書く→実行のサイクルに手間がかかる
→スクリプトで開発のサイクルを速めたい
Basically, Eclipsed-based cross development
environent with Android emulator or real
machine
– It takes time to execute code after write it
→Shorten development cycle with scripting
2010/8/29 RejectKaigi2010 3
4. Ruby on Android
• JRubyのjarファイルをDalvikバイトコードに変換することで、Android上
で動作可能
– "Ruboto Is Your Friend", Charles Nutter
http://blog.headius.com/2009/02/ruboto-is-your-friend.html
• Androidアプリとしてインストール可能な配布がいくつか存在
• ここではAndroid Marketに登録されている「Ruboto IRB」を取り上げ
る
• JRuby's jar file can be converted into Dalvik bytecode
runnable on Android
• There are a number of JRuby distributions installable as
Android applications
• Here I pick up "Ruboto IRB", registered on Android Market
2010/8/29 RejectKaigi2010 4
8. Problems
• ソフトキーボードでスクリプトを入力するのはかった
るい
• 画面が狭すぎてスクリプト編集が難しい
• Androidエミュレータで実行すると、内蔵エディタが
シャレにならないくらい遅い
• Software keyboard is not suitable to write scripts
• Andoid phone's screen is too small
• Embedded editor is too slow on Android emulator
2010/8/29 RejectKaigi2010 8
9. (My) Ideal Solution
スクリプトを編集
JRuby実行結果を表示
Input/modify JRuby scripts
Show results of JRuby execution
JRuby Script editor
同期 Synchronization
script
file
Android
phone USB cable
PC/Mac
現状ではそのまま実現する手段はないみたい
There does not seem to be actual products for such a solution
2010/8/29 RejectKaigi2010 9
10. Alternative solutions
• 実機+ハードウェアキーボード (USB/Bluetooth)
– 小さい画面の問題は解決しない
• androidscreencast
– Android機上の画面をPCに表示/PCのキーボードから実機を
操作するためのソフトウェア
– 画面の粗さとレスポンスが遅いことから、この目的には適さない
• Android real machine+hardware keyboard (USB/Bluetooth)
– Screen size is not improved
• androidscreencast
– A software to show an Android phone's screen on PC and
send keybord input on PC to the phone
– It is not suitable because screen is low quality and
keyboard response is slow
2010/8/29 RejectKaigi2010 10
11. Alternative solutions (2)
• PCからAndroid機のSDカードをマウント
– PC側で編集したRubyスクリプトをAndroid機側のSD
カードにコピー
– PCからマウント中はAndroid側からはSDカードが見えな
いので面倒
• Mount SD card from PC
– Copy your Ruby code to SD card in the Android phone
– An SD card cannot be mounted from PC and Android at
the same time
2010/8/29 RejectKaigi2010 11
12. 未完
ご清聴ありがとうございました
何か良い方法があれば教えてください
Please tell me if you have a good solution
2010/8/29 RejectKaigi2010 12