Numpt Physics Port


manolis

Still Fresh
Joined
Jun 12, 2010
Messages
16
Age
36
Location
Berlin/Germany
Website
blog.manol.is
Hi,
I just succeeded in porting my first game and wanted to share my results. I patched and cross compiled Numpty Physics, a clone of Crayon Physics witch is a 2D Physics puzzle game. The game sometimes runs a bit slow when the amount of objects on the screen gets to high. Please let me know if there are any errors I made.
numptyphysics-b1.pnd

Greetings
Manolis

EDIT:
I just build the same code with all ARM NEON optimizations turned on. The difference is like day and night. Everything seems to run smooth. Check it out.
numptyphysics-b2.pnd
 
Seems pretty cool! What are the keys? I figured out that escape removes the objects on the title screen (but not all).

After that I can draw a shape, but it slows down then freezes up for a bit.

Really nice other than that :)

Oh:

stylus draw a new stroke
space or enter (d-pad centre) pause/unpause physics
esc (back arrow) undo last stroke
q quit
r or up reset level to initial state
n or right skip to next level
p or left go to previous level
e or fullscreen edit mode

Also, in the PXML could you maybe have it located under games->other? Keeps the menu from getting too big imo.
 
SomeGuy99 said:
Also, in the PXML could you maybe have it located under games->other? Keeps the menu from getting too big imo.
The subcategory currently is named "Puzzle". Mh did not try this under XFCE.

I also added a new version compiled with all ARM NEON optimizations turned on. The new version runs way smother.

For everyone interested in the CFLAGS i used for the optimizations:
-O3 -mcpu=cortex-a8 -mfloat-abi=softfp -mfpu=neon -ftree-vectorize

I'm not sure if this is optimal for the pandora, but its the best i could come up with and the result speaks for itself.

Greetings manolis
 
Last edited by a moderator:
Is this the first Pandora Game/Emulator that uses NEON? :)
Cool, it really works then. Sadly, I don't have a Pandora to test it yet. ^^"
 
Loading each level seems to take forever... :(

There's a huge lag when you complete a level, I mean. Pressing 'n' is instant.
 
Great I love these physics games.

It works real nice on the Pandora.

For those using minimenu you could just make an override file to put into the "Game" tab or where ever you want it.

Thanks for the great port :)
 
fusion_power said:
Is this the first Pandora Game/Emulator that uses NEON? :)
Cool, it really works then. Sadly, I don't have a Pandora to test it yet. ^^"
Nope... but maybe the first where it has been compared to NOT use neon compiler flags.
Those compile flags listed above are basically my default Pandora compile flags - PandoraPanic!, Beat2X, Spout and Thruster were all compiled with those flags. :)
 
Last edited by a moderator:
manolis said:
For everyone interested in the CFLAGS i used for the optimizations:
-O3 -mcpu=cortex-a8 -mfloat-abi=softfp -mfpu=neon -ftree-vectorize
PokeParadox said:
Those compile flags listed above are basically my default Pandora compile flags - PandoraPanic!, Beat2X, Spout and Thruster were all compiled with those flags. :)
I always use
Code:
-Os -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -ffast-math -fsingle-precision-constant
from the day I did various benchmarks on different p7zip builds, changing only from the above the "-Os" part from -00 to -03. [topic='55761']The post here[/topic] and the benchmarks comparisons at 500MHz & 800MHz if you're curious.

I'm thinking now I should've done one more without neon and another one without any optimization whatsoever, just for the sake of it.
 
Last edited by a moderator:
joseluisjazz said:
I always use
Code:
-Os -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -ffast-math -fsingle-precision-constant
sqllite have a #error against fast-math
Webkit (and derivative: chromium, qt), kde, large parts of gnome don't build with single-precision-constant

Sometime -ftree-vectorize can prouve it's usefullness too :)
 
Last edited by a moderator:
One should be cautious: there's not a single set of flags that works equally well for all projects. In particular -Os is *very* suspicious :)
 
Back
Top