Align all planets! Or don't. Just enjoy a nice pixelated simulation of a star system. More likely than not, the planets will align on their own sooner or later!

Need more planets? Check Align Q More!

## Controls

<Z> or <Button 1> - Slow down the planet.

<X> or <Button 2> - Reset.

## Credits

Created by Theogen Ratkin for the TweetTweetJam 4.

Palette used: Sweetie 16 by GrafxKid.

## Source

This is the complete source code of the game. It is 553 characters long if you strip all unnecessary whitespaces from it. See the submission page if you want to take a look at the stripped version.

```m=math
b=m.abs
r=m.random
p=m.pi*2
x,y=120,68
a={{t=r()*p,r=30,c=2},{t=0,r=52,c=6},{t=r()*p,r=64,c=10}}
e=.03
t=0
function TIC()
if btnp(5)then
reset()
end
cls()
circ(x,y,15,3)
line(170,y,174,y,1)
for i,o in pairs(a)do
k=m.cos(o.t)*o.r
j=m.sin(o.t)*o.r
if w then
o.t=a[3].t
else
o.t=o.t+(y-o.r)/1000/(i==2 and btn(4)and 2 or 1)
if i==2 and o.t>=p then t=t+1 end
o.t=o.t%p
end
circb(x,y,o.r,i==2 and 1 or 15)
circ(x+k,y+j,i+1,o.c)
end
if b(a[1].t-a[2].t)<e and b(a[1].t-a[3].t)<e then
w=1
line(x+k*2,y+j*2,x-k*2,y-j*2,4)
print("Success!",2,y)
end
print(t,196,y)
end
```

You can also obtain the Lua file on GitLab.

 Status Released Platforms Windows, macOS, Linux, HTML5 Rating (3) Author THE0R Genre Simulation, Action Made with TIC-80 Tags 8-Bit, Minimalist, peaceful, Pixel Art, Relaxing, Space, TIC-80 License GNU General Public License v3.0 (GPL) Average session A few seconds Languages English Inputs Keyboard, Gamepad (any) Accessibility One button, Textless Links Source code, Play on TIC-80 website

## Install instructions

The cartridge can be opened with TIC-80 on all major platforms.

There's also a standalone executable for Windows (works on both 32 and 64 bit).

Cartridge 903 bytes
Version 1.0 May 10, 2020
Windows 3 MB
Version 1.0 May 10, 2020

## Development log

Cool little game, actually it was more satisfying to just look at the system, spinning. I thought about making a version with customizable number of planets, random events like comets and meteorites that slowly pass by to make looking at this more satisfying.

Thanks so much for playing! You are right, this sim was more intended as a calming session rather than an actual game.

Cool idea about comets, I might add it to Align Q More! Did you play it by the way? It’s an extended version of Align Q created without the character limitation. You can switch between 4 and 3 planets in it!

And you are free to add your own stuff, since all my games are open source!

Actually, I didn't) Yeah, it's opensource and it's cool that there're so few lines of code.

I did it!

Solid game w/ great UI (and a win condition!). A win condition was the one thing I wish I was able to add to my submission.

Awesome! I’m so glad you liked it! I was tempted to remove UI many times to reduce that precious character count, but it just makes the game look much nicer and polished.

And your game doesn’t really need a win condition. Matching those colors is fun by itself. While my win condition is so easy that the game is meant to be replayed multiple times. To emphasize that, I invested a significant amount of characters to add the reset button, even though the reset option is already available in the TIC-80 menu.

So why not win the game again a couple more times if you didn’t get bored yet? :-)

(+1)

This is a really nice concept! It's also pretty cool that you made this in only a few lines of code. That's pretty legit.

Because of the limitations of the jam, outside of the it, there are a lot of things you can do that can further expand on this concept because it's a great idea.

Also, I got away with having only 0 revolutions ;) *Puts on shades*

WOW! Is that even legal?! :-O

I actually like the game as it is, just a casual spinner where you have to get the timing right. But maybe I could expand it in some way, by adding more planets for example. I’ll see about that. Thanks!