# GravT

**Controls****:**

X - Slow Down

Z - Speed Up

This is my first game jam game! Sure, it's not really a game as there is no goal, but it's fun to fly around. Here's the code if you want it (made in TIC-80):

x=0

y=0

o=0

p=0

z=0

c={0,0}s={}for i=0,10,1 do table.insert(s,{math.random(-300,300),math.random(-300,300)})end

for l,b in pairs(s) do circ(b[1],b[2],40,15)end

while pix(x,y)>0 do x=x+9 end

function TIC()cls(0)if btn(4)then o=o*1.02 p=p*1.02 end

c={c[1]+(x-c[1]-120)/10,c[2]+(y-c[2]-60)/10}rect(x-c[1],y-c[2],2,2,15)for l,b in pairs(s)do

k=b[1]-x

l=b[2]-y

function d()return math.sqrt(k*k+l*l)end

if d()<40 and z<1 then o=-o p=-p z=1 else z=0 end

circ(b[1]-c[1],b[2]-c[2],40,15)o=o+k/d()/d()p=p+l/d()/d()end

x=x+o y=y+p if btn(5)then o=o*0.94 p=p*0.94 end

end

**NOTE:** There's something wrong with the web version, it sends you flying when you hit a planet. Please download the cartridge or copy and paste the code!

**EDIT:** Fixed the problem, but something is wrong with TIC-80's exporter.

Status | Released |

Platforms | HTML5 |

Rating | |

Author | fuzzyastrocat |

Genre | Simulation |

Made with | TIC-80 |

Tags | Retro |

## Install instructions

Download the cartridge/copy the code, no graphics needed. This game is compatible with TIC-80 version 0.60.3. I have not tested it with any other version, but it might work.

## Download

**cart.tic**3 MB

## Leave a comment

Log in with itch.io to leave a comment.