FACTOR 
v0.5
Mar 19/2008

Trevor Bradley
trevor.bradley@shaw.ca

Well, this is my first attempt at coding a game for the GP2X.  
To be honest, I don't have all the bugs worked out, I'm still 
seeing a crash bug from time to time (Darn memory leaks, I 
thought I caught you all!), but I'm eager to find the bugs 
and squash them with a little help.

The idea of the game is that you need to factor a very large 
number which is a multiple of the first 8 primes: 2, 3, 5, 7, 
11, 13, 17, and 19.  So, for instance:

    12355467391260000000 = 2^8 * 3^7 * 5^7 * 7^10 
    
By pressing the left, right, up, down, A, B, X, and Y buttons, 
you can attempt to divide the large number by a prime.

By using the L and R buttons, you can increase the power of the divisor.
2 becomes 2^2 = 4, 7 becomes 7^2 = 49, and 19 becomes 19^2 = 361.

You can increase your power up to a factor of 6, where 19^6 = 47045881!

Be careful though.  If you make a mistake you'll be penalized 3 times
the amount of points you would have gained if you were correct.
Increasing the power is risky business!

The icon graph is a hypercube, a four dimensional object that could be
used to represent an easy puzzle (2^w*3^x*5^y*7^z).

The music is from Isaac Albniz's Suite Espaola, Op. 47 - Leyenda.  
The music is copyright free and in the public domain and is available 
for download at http://www.musopen.com/view.php?type=piece&id=224
I rather enjoyed the fast pace, and the Spanish guitar is perfect for
reading through the Fenix API (which is written in Spanish, of course).
The entire song is there, split up between the menu, gameplay, and high 
score screen.

HINTS

The easy mode eliminates the higher primes, leaving a number built only 
from 2s, 3s, 5s, and 7s.

If you get a positive score, you're doing good!

Fives and Twos are easy.  Just count the zeros at the end of the number,
increase the power to that number and hit 2 (up) and 5 (right).
These points are so easy to get that 2's and 5's aren't available at
the hard Level!

Testing a divisor to see if it is safe is easy at the first power;
you'll only lose 3 times the prime in points.  But if you test a prime
like this, you lose valuable points you could have gained at a higher power.

Try turning up your power first and risking a big score early when it's 
more likely to be possible.  

You can also eliminate a prime by a large number of low power moves, and 
then focusing on one prime.  This strategy works, but you won't get the 
highest score

It is possible to get a score so low (below 200 million) that the 
machine won't be very impressed with your performance.  

There are some interesting properties of 11's that make guessing how many powers
of 11 are left easier.  All powers of 11 end with the digit 1.  11^1 ends with 
the digits 11. 11^2 (121) ends with 21.  11^6 (1771561) ends with 61. 


v0.5 update

Thanks to those who liked this game.  I've upgraded the graphics as I've wanted
to do for some time.  I hope I've finally tackled the crash bugs as well.  
Really I wanted to wrap this project up so I could devote more time to my
next big thing. :)

v1.0 update

Sorry for my fast turnaround cycle.  There were a few bugs in 0.5 that I think 
I've ironed out.  This should be my last revision to the game.  I've added 
in simple touchscreen support.  However proper touchscreen support would take
a big UI interface rewrite, and I think it's time for me to move on to new games.

KNOWN BUGS

None! :)

REVISION HISTORY
v0.1    Feb 24/2008   First Release
v0.2    Feb 25/2008   Rewrite of arbitrary precision multiplication to avoid 
                      String s=1 issue with splash screen
v0.2a   Feb 25/2008   Removal of the splash screen because of crashes
v0.3    Feb 25/2008   Rewrite of arbitrary precision multiplication again.
                      Now with significantly fewer operations.
v0.5    Mar 19/2008   Complete graphics makeover.
                      Removed splash screen to eliminate crash bug.
                      High Scores now save.
v1.0rc1 Mar 19/2008   Removed Splash Screen entirely
                      Fixed Fenix 17^6, 19^6 computation bugs:  pow(17,6)=17^6-1;  pow(19,6)=19^6-1
                      Fixed High Scores (were not saving on all screens, or for all levels)
                      Made some changes to audio loading to avoid pops. 
                      Simple touchscreen support for gameplay (but not menu navigation, sorry!)
v1.0rc2 Mar 20/2008   Fixed scores for 17^6, 19^6.  Added game icon.
v1.0fin	Mar 21/2008   Added Main Menu touch screen support.  You can't change the difficulty, but
                      now you can tap through menus.  This should be the final revision of this game.