hypersurge / awe6

awe6, the inverted game framework (Haxe)
http://awe6.org
MIT License
79 stars 11 forks source link

awe6 demo on Blackberry Playbook very slow #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. generate the nme blackberry code (c++) of the demo
2. transfer and start it on the playbook

What is the expected output? What do you see instead?

Expected: Game running at least at maybe 30fps.
Instead: In the menu and "static" scenes it's running smooth 50-60 fps, when 
game starts it regularly (twice a second) drops to 1 fps, average maybe 
10-15fps. It's unplayable.

What version of the product are you using? On what operating system?

Latest awe6 trunk, HXCPP/NME latest trunk. Blackberry Tablet OS.

Original issue reported on code.google.com by tobias.r...@gmail.com on 7 Jun 2012 at 6:06

GoogleCodeExporter commented 9 years ago
Thanks for report. I don't have access to a Playbook anymore so "gut feel fix" 
coming up ...

Try commenting out line 85 from demo.entities.Sphere (the view priority).  Then 
compile and retest.  Does the problem persist?

This is a hunch based on your encountered frequency of slow down.

Original comment by robert.f...@hypersurge.com on 7 Jun 2012 at 4:34

GoogleCodeExporter commented 9 years ago
No the view priority doesn't change anything.
But I think I found the problem, as soon as I comment out Game.hx Line #87
 _timer.text = _tools.convertAgeToFormattedTime( _age );
it's running at at least 40fps, sometimes even up to 55fps.

That convertAgeToFormattedTime seems to really slow down things. Are is it 
changing the text-value?

Original comment by tobias.r...@gmail.com on 7 Jun 2012 at 5:05

GoogleCodeExporter commented 9 years ago
Probably nothing to do with convertAgeToFormattedTime, and more to do with the 
_timer.text (a TextField) being redrawn.  Please verify by assigning:

_timer.text = Std.string( Std.random( 1000 ) );

Original comment by robert.f...@hypersurge.com on 7 Jun 2012 at 5:37

GoogleCodeExporter commented 9 years ago
Yes that's the problem. I've tested it before, but with a static string. Then 
the TextField seems not to be redrawn, but now with the random number it drops 
to 1fps again.

Original comment by tobias.r...@gmail.com on 7 Jun 2012 at 5:41

GoogleCodeExporter commented 9 years ago
Try commenting out cacheAsBitmap line 84 of awe6.extras.gui.Text.

Original comment by robert.f...@hypersurge.com on 7 Jun 2012 at 6:14

GoogleCodeExporter commented 9 years ago
Yes, that helps. It's now nearly constant at 35 fps. Just dropped to 1fps once 
during the 30sec game.
Thank you!

Original comment by tobias.r...@gmail.com on 9 Jun 2012 at 5:56

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r441.

Original comment by robert.f...@hypersurge.com on 9 Jun 2012 at 6:06