My game works perfectly on the PC and on the Web, but as soon as I demo it on an Android phone its running like a flip book. My Drawcalls are 375ps. All my code is in Javascript. There are only 4 main moving objects in the game. and about 36 static walls. 3 lights. Do the project files that are not being used in the game affect the speed? Its completely unacceptable. I’ve created a First person tunnel game so the FPC is always in foward motion. Does anybody have any ideas why the game play is like swimming in quicksand? Could it have anything to do with the way I loaded the JDK and the SDK? This is the first time I’ve run the game on the phone(Android)? Any suggestions? Thanx
Here is the forward motion script I’m using(its from the Tunnel Runner Demo)
var rotateSensitivity : float = 4.0;
var moveSpeed : float = 6.0;
var controlCurve : ControlCurve;
private var rotationCurve : AnimationCurve = AnimationCurve.Linear (0,0,1,1);
private var acc : Vector3 = Vector3.zero;
function Awake (){
// In order to make the feel of the player controls
// consistent in all levels, we set this property in awake.
// This way, each level's instance of the camera can inherit response
// curve that has been set up in the Prefab called "Control Curve"
// Note: To edit the master response curve, select the
// "ControlCurve" Prefab in the Resources folder, and
// select GameObject->Edit Response Curves from the menubar
rotationCurve = controlCurve.controlCurve;
// Set Phone to widescreen mode
Screen.orientation = ScreenOrientation.LandscapeLeft;
}
function Update (){
// Move the camera and children forward
transform.Translate (0,0, Time.deltaTime * moveSpeed);
}
function FixedUpdate (){
// Smooth out the value coming from the device
acc = Vector3.Lerp(acc, Input.acceleration, 0.65);
// Determine the final value of rotation based on the response curve
var filteredRotation : float = rotationCurve.Evaluate (Mathf.Abs (acc.y));
// Invert the evaluated rotation value if we're rotating left instead of right
if (acc.y> 0){
filteredRotation = -filteredRotation;
}
// Apply the final rotation
transform.Rotate (0,0, filteredRotation * rotateSensitivity);
}