Frage

I've made a simple, 3 frame, animation of a character walking to wherever you click on screen using Haxe+ Haxepunk... Well I copy/pasted code from online tutorials just to test Haxe out.

This runs great in flash, iOS simulator and on a Samsung Galaxy 3... But on my HTC desire it runs at less than 1 frame per second. While I know the desire is no spring chicken this is a massive performance gap, more so than I've seen on any app re: Galaxy vs. Desire...

Is this a Haxe problem or something I have done wrong (wrong NDK, wrong compile flags, OS too old, etc)?

War es hilfreich?

Lösung

Go into Engine.hx, the render() function, and comment out HXP.screen.refresh(). This line is absolutely killing performance on OUYA (an android gaming console) so it might be killing you too. Since you're not clearing the screen every frame anymore you'll want to draw a background every update by adding a Backdrop instance to your world. My game goes from 7 fps to 52 fps with these changes alone at 1080p resolution and ~80 entities.

Also try grabbing the latest HaxePunk from github and running ant to install it, the devs have been working on android performance lately and there's some good unreleased fixes which will be cream on top of the above fix.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top