Retrospective on making Orbital Tetris
So, I made no-one-asked-for version of the Tetris this time :) How it was? Well...
Coming up with the idea
I wanted to make a game around orbital mechanics for a while :) So the first thing I done after I knew the theme was this:

(thanks this article for algorithm, I would never come up with this by myself)
Looks kinda cool, but no gameplay yet.
Well, Tetris was another game I wanted to make for a while, so... Yeah.

Making Tetris part
As I started to make Tetris, I learned that each piece has its own center of rotation:

So it was actually easier to hardcode four versions of each piece for each possible rotation. Then I learned that Tetris has its own Wiki, where I found comprehensive info on each piece and some other tetris mechanics. I also took a chance to paint pieces according to classic version of Tetris.
Next challenge was placing the pieces. In classic Tetris you have 10 columns, and blocks can slide along those columns ONLY. Here was a different story. Each piece can travel in any direction relative to placed blocks, so sliding I-block into 1-block wide slot was problematic if not impossible.
I decided to work-around this by making pieces "slide" towards the center of gravity after they being placed:

Sometimes it looks unnatural, but more often than not it works as intended.
Next up was scoring. I looked up Tetris scoring system in the same Tetris Wiki. 1 line gives you 40 points, 2 lines - 100, etc. Fun part of my version is that you can destroy both rows and columns. So for a moment I thought - is it possible to destroy more then 4 lines at once here? I even commented my question in the code:
c
switch (hits)
{
case 1:
gamePoints += 40;
break;
case 2:
gamePoints += 100;
break;
case 3:
gamePoints += 300;
break;
case 4:
gamePoints += 1200;
break;
default:
if (hits > 4) {
// Is it even possible??
gamePoints += 2400;
}
break;
}
And, turns out, it is! I couldn't do it in-game to show you, so, here is my hand-drawn depiction of this rare event:

As you can see, with properly placed L-block, you can destroy 2 columns and 3 rows at the same time! My code carefully scores 2400 points for any number of destroyed lines > 4, but I think 5 is a maximum.
Next up were small bugfixes. For example, to put a piece in place, I was checking whether it collided with already placed blocks. But what if game field is empty? I had to come up with a workaround: If piece is closer to the center than the size of the block, than we just... Put in in the center.
One more fun bug: it is possible to accelerate piece so much that it leaves the "sphere of influence" of the game field. Just as in real orbital mechanics. So I have to make another workaround. You can try for yourself and see what happens :)
After everything was done, I had just enough time to work on visuals. I added camera, buncha stars, intro sequence and some effects, and my game was more or less done!

Orbital mechanics is fun, but at the same time it is unfirgivingly hard and counter-intuitive. So as a result I had pretty niche game. I guess, it is less fun than classic Tetris, unless you are really into orbital mechanics.
Things I wanted to make, but had no time left
- Game starts as normal Tetris, and THEN turns into THIS
- Random orbit for each new piece
- Some nice visuals (particles etc)
- Fullscreen mode is kinda weird
- In-game tutorial, etc
You can check out my game here: https://ldjam.com/events/ludum-dare/49/orbitris