Author Topic: Alien Runner W.I.P  (Read 35619 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Alien Runner W.I.P
« Reply #30 on: August 20, 2010, 07:18:49 am »
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...

Offline raft

  • quad
  • ******
  • Posts: 1971
    • View Profile
    • http://www.aptalkarga.com
Re: Alien Runner W.I.P
« Reply #31 on: August 20, 2010, 07:27:05 am »
i do acquire() and release() at onResume() and onPause() methods. but first check isHeld() and the opposite. no problem so far

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Alien Runner W.I.P
« Reply #32 on: August 20, 2010, 07:32:35 am »
Great, i'll do that too then. isHeld() sounds pretty stupid in german, because it means isHero()... ;)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Alien Runner W.I.P
« Reply #33 on: August 25, 2010, 09:36:52 pm »
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!?

Offline raft

  • quad
  • ******
  • Posts: 1971
    • View Profile
    • http://www.aptalkarga.com
Re: Alien Runner W.I.P
« Reply #34 on: August 25, 2010, 09:54:56 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Alien Runner W.I.P
« Reply #35 on: August 25, 2010, 11:21:02 pm »
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?

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: Alien Runner W.I.P
« Reply #36 on: August 26, 2010, 12:44:56 am »
please 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.

Offline raft

  • quad
  • ******
  • Posts: 1971
    • View Profile
    • http://www.aptalkarga.com
Re: Alien Runner W.I.P
« Reply #37 on: August 26, 2010, 01:01:02 am »
Quote
Your phone is still running 2.1?
yes, despite all its insistence to upgrade to 2.2 ;D

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Alien Runner W.I.P
« Reply #38 on: August 26, 2010, 07:46:17 pm »
on Galaxy S it is running about 30 with eco mode... without 56 ... phone is running on 2.1
« Last Edit: August 26, 2010, 07:56:47 pm by Thomas. »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Alien Runner W.I.P
« Reply #39 on: August 26, 2010, 08:06:12 pm »
Galaxy S is a real beast...

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Alien Runner W.I.P
« Reply #40 on: August 26, 2010, 08:19:58 pm »
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...
« Last Edit: August 26, 2010, 08:28:29 pm by Thomas. »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Alien Runner W.I.P
« Reply #41 on: August 26, 2010, 09:27:53 pm »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Alien Runner W.I.P
« Reply #42 on: August 26, 2010, 10:40:44 pm »
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.

Offline raft

  • quad
  • ******
  • Posts: 1971
    • View Profile
    • http://www.aptalkarga.com
Re: Alien Runner W.I.P
« Reply #43 on: August 26, 2010, 10:52:14 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Alien Runner W.I.P
« Reply #44 on: August 26, 2010, 11:01:02 pm »
There is a kind of dead spot around the current position, but it doesn't depend in screen resolution...maybe it should.