P#43743 2017-08-29 16:38 ( Edited 2018-09-10 00:26)
P#30420 2016-10-09 11:17 ( Edited 2016-10-10 14:17)
I saw a couple of articles earlier about the Fizzlefade effect from Wolfenstein 3D. It's a transition effect that draws over random pixels, but never draws over the same pixel twice.
I thought this was a cool trick, and I wanted to try it out and see it in action, so I implemented the Feistel network technique from antirez's article. Posting here in case anyone likes the effect and wants to recycle the code.
Sometimes, your game makes use of a randomly generated sequence, but it would be nice to smooth out some of the short-term variance in it (e.g. long stretches of not getting a long piece in Tetris). This cart showcases some algorithms you can use to generate smoother-feeling random sequences, and lets you visualize them for tetrominoes, digits, or dice rolls.
Thanks to TetrisConcept without whom I would never have learned about these techniques, and to the developers who invented them.
See the code comments for more on the implementation of each randomizer.
A little math puzzle for my first Pico-8 game.
Instructions (see also the in-game demo):
Pop pairs of numbers to gain points. When you pop numbers, you'll gain their units-digit of their sum, e.g:
3 + 5 = +8 points
7 + 7 = +4 points (because 7 + 7 is 14)
9 + 3 = +2 points (because 9 + 3 is 12)
after which, the popped pair is replaced with the result, and a new number is added onto the end. (It'll make sense after you've played.)
As a special bonus, if you would gain 0 points from a move (e.g. 0 + 0 or 8 + 2), you'll instead gain an extra turn.