TripleNumber
If you are not into programming, and just want to play the game. Click the “TripleNumber” button in the top menu, or install it to your Android device using the button to the right.
Background
The main goal of this small project was to get some experince with PhoneGap and TypeScript. I have already made a few Android applications,
Setting up the development enviroment
Android enviroment
I have been made a few Android application, so the Android development enviroment was already set up. I am using Eclipse, since this is the easies one to setup with the Android plugin. You can find guides about this if you do a search for it - a good start is to look af the Android Development site
Visual Studio and Typescript
I already had Visual Studio 2012 installed so the only thing need was installing the TypeScript plugin. You can get it on the TypeScript site
Phonegap
Native “Android” functionallity
Vibrator
Sound
Saving highscore
Problems
White blink when switching page
Tips
Copying files in post-build event
Debugging ts files
The TypeScript compiler can make map files, allowing you to debug directly in the ts files. You need to use the Chrome Javascript to do this. To generate the map files to add a “-sourcemap” option to the command line of the TypeScript compiler. I could not find a way to change the command line from within Visual Studio, so i edited the project manually:
<Target Name="BeforeBuild">
<Exec Command="&"$(PROGRAMFILES)\Microsoft SDKs\TypeScript\0.8.1.0\tsc&" -sourcemap @(TypeScriptCompile ->'&"%(fullpath)&"', ' ')" />
</Target>
If you want to try the game in your web brower you can do it here: Play the game in your browser