Alien Runner W.I.P

Started by EgonOlsen, July 18, 2010, 10:16:26 PM

Previous topic - Next topic

EgonOlsen

I'm releasing the wake-lock in onStop(), because otherwise, i got errors that i haven't before stopping the application. Looks like as if somebody was a bit exception happy and decided to throw one if you release an already released lock...now that makes sense.
I'm going to put a try-catch around it and swallow it...

raft

i do acquire() and release() at onResume() and onPause() methods. but first check isHeld() and the opposite. no problem so far

EgonOlsen

Great, i'll do that too then. isHeld() sounds pretty stupid in german, because it means isHero()... ;)

EgonOlsen

Uploaded a new version with some fixes, a simple level selection and a (really) short second level. The options menu can now be accessed by pressing the options buttons. Controls have been unified so that touch screen and dpad act in the same way.

Can somebody with a fast device please try to disable "eco mode" in the options menu and report the frame rate!?

raft

with eco mode disabled, it runs @31-32 fps.

some observations:
* at landscape orientation back button is at lower right. so we sometimes accidentally touch it. this brings up level selector and from there, there is no way to continue level. a resume button or similar may help. i pause the game when back button is touched and resume again with second touch
* when options view is visible, returning the game with back button may again help
* at the moment, game somehow caches back button touch when options activity is visible and when we return to game level selector pops up

EgonOlsen

Thanks for the feedback. On my phone, back button is on the upper left when in landscape orientation and it's impossible to touch it by accident...i guess the layouts differ... ;) I'll make the back button pause the game and bring up the level selector and make it resume a paused game after release, just as you suggested. I'm always lazy with such tedious stuff...

Your phone is still running 2.1?

paulscode

Quote from: EgonOlsen on August 25, 2010, 09:36:52 PMplease try to disable "eco mode" in the options menu and report the frame rate
It runs 47-49 fps on my Droid X with eco mode disabled.

raft

QuoteYour phone is still running 2.1?
yes, despite all its insistence to upgrade to 2.2 ;D

Thomas.

#38
on Galaxy S it is running about 30 with eco mode... without 56 ... phone is running on 2.1

EgonOlsen

Galaxy S is a real beast...

Thomas.

#40
56 frames per second are limited by screen, not GPU  :) ... Are you planning support openGL 2.0? mainly shadows and reflections :)
And please, how can I do free spotlight? if I can...

EgonOlsen

You can place infinite light sources and you can use specular lighting on Objects (Object3D.setSpecularLighting(<boolean>)), but no real (as far as OpenGL permits "real spot lights" anyway) spot lights. That's mainly because desktop jPCT doesn't support them either and that vertex lighting on Android is pretty much broken. Even attenuation doesn't work neither in the emulator nor on my phone...all you get is a wrongly lit polygon mess.

I'm glad that you mentioned OpenGL ES 2.0, because that gives me the chance to do a little rant on this topic:

<rant>
What the hell were they thinking when they designed ES 2.0? It's incompatible with 1.0/1.1! Unlike in "real" OpenGL, where you can still use all features down to 1.0 even in a 4.1 context (unless you create a "pure" context, which makes no sense at all), they decided to make ES 2.0 completely shader based and dropped everything fixed function based.

That has several drawbacks:

  • Current phone's GPU are still weak! They have a fill rate of around 1/5 of a Voodoo 1 and that's true even for a power horse like the Galaxy S. The time isn't ripe for this IMHO.
  • You have to maintain two completely different renderers. One for 1.0/1.1. and one for 2.0.
  • You have to write one big or several small shaders to mimic the fixed function pipeline of 1.1, or otherwise, no lighting, no fogging....will show any effect.

Shader are a great thing! They give you a flexibility that you don't have with the fixed function pipeline. However, the design of ES 2.0 forces you to do everything in a shader, which is just plain stupid IMHO, because it stresses the hardware with no need, is much harder to maintain and creates a gaint hurdle to people who want to start programming OpenGL ES.
</rant>

However, support for ES 2.0 will eventually come in the future. But i need hardware that supports it to add it (the emulator just sucks) and i currently don't have any.

EgonOlsen

And another version that implements most (all?) of the control/button changes that raft suggested as well as some different, still more or less random, level selection graphics.

raft

cool, much better now ;)

there is one more thing i've noticed: i tend to keep my finger on screen and move it as required. this makes the character vibrate. i believe this happens because of continuous touch events around touch point. you may want to filter those events. i dont know how, maybe a threshold may help

EgonOlsen

There is a kind of dead spot around the current position, but it doesn't depend in screen resolution...maybe it should.