Collect the prime factors of the target number and avoid all other numbers. When you have collected all unique factors of the target, the target increases by one and new factors warp in. If you collect a number that is not a factor of the target, it’s game over!

E.g.

  • For target 23: 23 is a prime number, so collect 23 only
  • For target 24: 24 = 2x2x2x2x3, so collect 2 and 3
  • For target 25: 25 = 5x5, so collect 5 only

The target starts at two. Can you reach 100?

Controls

Use the arrow keys to move.

Your current target is shown at the top-left of the screen.

Limitations

Due to the constraints of being written in 500 characters of code, the game has had to cut some corners:

  • No sound effects or music.
  • When you win or lose, the game just stops. If you have won, the number in the top-left corner will be 100. If you have lost, you will be shown next to the wrong number you tried to collect. To play again, reload the web page.
  • The input logic interprets the arrow keys correctly but will do strange things when you press other keys. Don’t do that!
  • The player and number movement wraps around the play area horizontally  and vertically. You can use this to your advantage, but it makes the number movement a bit confusing.
  • Numbers can start at the same location as the player. This doesn't kill you and you can move away safely.

Source Code

u=mget i=mset b=mid h=rnd f=15l={}d=1a=0p=1e=4n=4repeat if a<1do d+=1reload()i(e,n,1)for e=2,d do if(ord("て(⌂き ⌂ (☉🐱⁸²²",e\8+1)&1<<e%8>0)o=h(f)\1r=h(f)\1i(o,r,e)l[e]={x=o,y=r}a+=max(1-d%e)
end end cls(d%2)?d,9
?"웃",e*8,n*8
for n,e in next,l do?n,e.x*8,e.y*8,3
end flip()s=btnp()*12\5/4if s>0do i(e,n)e=f&e+cos(s)n=f&n+sin(s)i(e,n,1)for n,e in next,l do if(u(e.x,e.y)==1)p=max(1-d%n)l[n*p]=c a-=p else o=f&e.x+h(3)\1-1r=f&e.y+h(3)\1-1if(u(o,r)<1)i(e.x,e.y)i(o,r,n)e.x=o e.y=r
end end until p<1or d>99
StatusReleased
PlatformsHTML5
Authordredds
GenrePuzzle
Made withPICO-8
TagsMath, No AI, PICO-8

Development log

Comments

Log in with itch.io to leave a comment.

(2 edits)

I realised that it was too easy to miss that you have completed a level and then die by catching a wrong prime.

While commenting the code I found an opportunity to save three more characters. I’ve used two of those to change the background colour whenever you complete a level, so that it is now obvious when you have a new objective.

(1 edit) (+1)

I found space for another four (count them!) characters. Enough to add colour. New version coming up…

(+1)

got up to 24. suprisingly challenging