Skip to content

Commit

Permalink
+ Fixed lots of bugs. Most notably a divide-by-zero case in the colli…
Browse files Browse the repository at this point in the history
…sion system.

+ Add fades to all activity transitions (seems unreliable, though; race condition?)
+ Add Extras Menu, unlockable Linear Mode and Level Select
+ Add difficulty settings: Baby, Kids, and Adult
+ Add on-screen control interface; add support for muli-touch input events
+ Add debug mode frame rate readout (game thread only)
+ Changed most broken game play elements: enemy spawner and shadow slime
+ Added post-game statistics screen
+ Added fist-run control setup dialog
+ Fixed unescaped single quote characters (sorry!)
  • Loading branch information
chrispruett committed Jan 16, 2011
1 parent f756e2c commit e2725db
Show file tree
Hide file tree
Showing 78 changed files with 3,058 additions and 417 deletions.
27 changes: 23 additions & 4 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.replica.replicaisland" android:versionName="1.3" android:versionCode="13">
package="com.replica.replicaisland"
android:versionName="1.4"
android:versionCode="14"
android:installLocation="preferExternal">

<application android:icon="@drawable/icon"
android:label="@string/app_name"
android:debuggable="false"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
<activity android:name=".MainMenuActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"
Expand Down Expand Up @@ -41,18 +45,33 @@
<activity android:name="AnimationPlayerActivity"
android:screenOrientation="landscape"
android:configChanges="keyboardHidden|orientation" />


<activity android:name="ExtrasMenuActivity"
android:screenOrientation="landscape"
android:configChanges="keyboardHidden|orientation" />

<activity android:name="DifficultyMenuActivity"
android:screenOrientation="landscape"
android:configChanges="keyboardHidden|orientation" />

<activity android:name="GameOverActivity"
android:screenOrientation="landscape"
android:configChanges="keyboardHidden|orientation"/>

</application>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission xmlns:android="http://schemas.android.com/apk/res/android"
android:name="android.permission.INTERNET"/>
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="8"/>

<!-- Actually, this game works fine on small screens, but the only one out
right now has no 3D acceleration, so it's slow and unplayable. -->
<supports-screens android:largeScreens="true"
android:smallScreens="false"
android:anyDensity="true"
android:normalScreens="true"/>
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission> -->


</manifest>

2 changes: 1 addition & 1 deletion default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

apk-configurations=
# Project target.
target=android-4
target=android-8
# Indicates whether an apk should be generated for each density.
split.density=false
6 changes: 6 additions & 0 deletions res/anim/activity_fade_in.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator"
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="500" />
8 changes: 8 additions & 0 deletions res/anim/activity_fade_out.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator"
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:duration="500"
android:zAdjustment="top"
/>
33 changes: 5 additions & 28 deletions res/anim/button_slide.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">

<translate
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromYDelta="200"
android:toYDelta="-10"
android:duration="600"
android:fillAfter="false"/>


<translate
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromYDelta="-10"
android:toYDelta="10"
android:duration="150"
android:fillAfter="false"
android:startOffset="600"/>

<translate
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromYDelta="10"
android:toYDelta="0"
android:duration="200"
android:fillAfter="false"
android:startOffset="750"/>
</set>

<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="1000" />
8 changes: 8 additions & 0 deletions res/anim/fade_in_out.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:duration="500"
android:repeatCount="-1"
android:repeatMode="reverse"
android:fillAfter="true"/>
7 changes: 7 additions & 0 deletions res/anim/menu_hide_left.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromXDelta="0"
android:toXDelta="-960"
android:duration="700"
android:fillAfter="true"/>
7 changes: 7 additions & 0 deletions res/anim/menu_hide_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromXDelta="0"
android:toXDelta="960"
android:duration="700"
android:fillAfter="true"/>
7 changes: 7 additions & 0 deletions res/anim/menu_show_left.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromXDelta="960"
android:toXDelta="0"
android:duration="700"
android:fillAfter="true"/>
7 changes: 7 additions & 0 deletions res/anim/menu_show_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromXDelta="-960"
android:toXDelta="0"
android:duration="700"
android:fillAfter="true"/>
Binary file added res/drawable/object_sign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ui_button_adults.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ui_button_baby.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ui_button_controls.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ui_button_extras.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ui_button_kids.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ui_button_level_select.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ui_button_linear_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable/ui_button_options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ui_locked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ui_movement_slider_base.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ui_movement_slider_button_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ui_movement_slider_button_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ui_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions res/layout/difficulty_menu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView
android:id="@+id/mainMenuBackground"
android:src="@drawable/title_background"
android:adjustViewBounds="true"
android:gravity="center_vertical"
android:scaleType="fitXY"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>

<LinearLayout
android:background="@drawable/custom_toast_border"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:padding="10dp">

<ImageView
android:id="@+id/babyButton"
android:src="@drawable/ui_button_baby"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:clickable="true" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor= "#FFFFFF"
android:textSize="14sp"
android:focusable="false"
android:layout_gravity="center_horizontal"
android:text="@string/baby_description"
android:id="@+id/babyText"/>

<ImageView
android:id="@+id/kidsButton"
android:src="@drawable/ui_button_kids"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:clickable="true"
android:layout_marginTop="15dp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor= "#FFFFFF"
android:textSize="14sp"
android:focusable="false"
android:layout_gravity="center_horizontal"
android:text="@string/kids_description"
android:id="@+id/kidsText"/>

<ImageView
android:id="@+id/adultsButton"
android:src="@drawable/ui_button_adults"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:clickable="true"
android:layout_marginTop="15dp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor= "#FFFFFF"
android:textSize="14sp"
android:focusable="false"
android:layout_gravity="center_horizontal"
android:text="@string/adults_description"
android:id="@+id/adultsText"/>

</LinearLayout>
</FrameLayout>
79 changes: 79 additions & 0 deletions res/layout/extras_menu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView
android:id="@+id/mainMenuBackground"
android:src="@drawable/title_background"
android:adjustViewBounds="true"
android:gravity="center_vertical"
android:scaleType="fitXY"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>

<ImageView
android:id="@+id/mainMenuTitle"
android:src="@drawable/title"
android:adjustViewBounds="true"
android:layout_width="336dp"
android:layout_height="153dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"/>

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="bottom" android:layout_gravity="bottom|center_horizontal" android:layout_height="wrap_content" android:layout_width="wrap_content" android:orientation="vertical">

<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:layout_gravity="center_horizontal">
<ImageView
android:id="@+id/linearModeButton"
android:src="@drawable/ui_button_linear_mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true" />
<ImageView
android:id="@+id/linearModeLocked"
android:src="@drawable/ui_locked"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
</FrameLayout>

<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:layout_gravity="center_horizontal">
<ImageView
android:id="@+id/levelSelectButton"
android:src="@drawable/ui_button_level_select"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true" />
<ImageView
android:id="@+id/levelSelectLocked"
android:src="@drawable/ui_locked"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
/>
</FrameLayout>


<ImageView
android:id="@+id/controlsButton"
android:src="@drawable/ui_button_controls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:clickable="true"
android:layout_gravity="center_horizontal"/>
</LinearLayout>

</FrameLayout>
61 changes: 61 additions & 0 deletions res/layout/game_over.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android" android:background="#FFFFFF">
<ImageView
android:id="@+id/mainMenuBackground"
android:src="@drawable/title_background"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:gravity="right" android:tint="#88FFFFFF"/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5sp">
<TextView android:text="@string/game_results_title" android:layout_height="wrap_content" android:textSize="40sp" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:textColor="#000000" android:textStyle="bold" android:typeface="serif"/>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:text="@string/game_results_pearls_collected" android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="#000000" android:textStyle="bold" android:typeface="serif" android:textSize="20sp"/>
<view
class = "com.replica.replicaisland.GameOverActivity$IncrementingTextView"
android:id ="@+id/pearl_percent"
android:text="100%"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:textSize="20sp"
android:layout_gravity="right|center_vertical"
android:textColor="#000000" android:textStyle="bold"
android:typeface="serif" android:gravity="right"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:text="@string/game_results_robots_destroyed" android:layout_height="wrap_content" android:layout_width="wrap_content" android:textSize="20sp" android:textColor="#000000" android:textStyle="bold" android:typeface="serif"/>
<view
class = "com.replica.replicaisland.GameOverActivity$IncrementingTextView"
android:id ="@+id/enemy_percent"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_gravity="right|center_vertical"
android:textColor="#000000" android:textStyle="bold"
android:typeface="serif" android:gravity="right" android:text="0" android:textSize="20sp"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:text="@string/game_results_total_play_time" android:layout_height="wrap_content" android:layout_width="wrap_content" android:textSize="20sp" android:textColor="#000000" android:textStyle="bold" android:typeface="serif"/>
<view
class = "com.replica.replicaisland.GameOverActivity$IncrementingTextView"
android:id ="@+id/total_play_time"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:textSize="20sp"
android:layout_gravity="right|center_vertical"
android:textColor="#000000" android:textStyle="bold"
android:typeface="serif" android:gravity="right" android:text="3:21:34"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:text="@string/game_results_ending" android:layout_height="wrap_content" android:layout_width="wrap_content" android:textSize="20sp" android:textColor="#000000" android:textStyle="bold" android:typeface="serif"/>
<TextView android:id ="@+id/ending" android:text="@string/game_results_kabocha_ending" android:layout_height="wrap_content" android:layout_width="fill_parent" android:textColor="#000000" android:textStyle="bold" android:typeface="serif" android:gravity="right" android:textSize="15sp" android:layout_gravity="right|center_vertical"/>

</LinearLayout>
<TextView android:text="@string/game_results_unlocks_message" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:textColor="#000000" android:textStyle="bold" android:typeface="serif" android:textSize="16sp" android:gravity="center_horizontal" android:layout_gravity="top|center_horizontal"/>
<Button android:id ="@+id/ok" android:text="@string/game_results_ok_button" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="bottom|center_horizontal"/>
</LinearLayout>
</FrameLayout>

2 changes: 1 addition & 1 deletion res/layout/level_select.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
android:layout_height="fill_parent"
>
<ListView android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:dividerHeight = "0dp"
android:footerDividersEnabled = "false"
Expand Down
Loading

0 comments on commit e2725db

Please sign in to comment.