11 ms·
The Sinusoidal Tetris
- JaceLightning 3y agoWould be nice to play on mobile
- lern_too_spel 3y agoI looked at it on mobile, so I couldn't actually play it, but can't you just fix a period and amplitude and alternate the phase forever or just set the amplitude to 0?
- nomemory 3y agoHello, I've added some buttons so you can look on it on mobile.
- orthoxerox 3y agoYes, same frequency + smallest amplitude + phase adjustment is the optimal strategy
- MauranKilom 3y agoArguably, minimal frequency + phase adjusted so the falling sinusoid has only negative values in the playing area is "more optimal" (more room for error).
- orthoxerox 3y agoHa, clever. I guess the frequency should be limited so that the period can't be longer than the playing area.
- mnky9800n 3y agoThis is wonderful. I think, ultimately it doesn't end up being a game as much as it is a wonderful way of looking at waveforms, simply because there is no goal except minimize. There should be an api so you can write code to pick the optimum changes for each drop.
- nomemory 3y agoHello, this game is part of an article I am currently writing. I will add there the "optimal" sinusoid :). Thank you for the idea.
- mckeed 3y agoThe goal is the same as Tetris – to last as long as possible before overflowing. This just doesn't have the mechanic of gradually getting faster.
- nomemory 3y agoI've added the feature so you can see the first 4 optimal sinusoids.
- dmonitor 3y agoSeems like you can just increase the period arbitrarily large and then shift it in time such that the graph is entirely occupied by the values of the sinusoid less than zero.
- ant6n 3y agoThe text says something about how you shouldn't make the waveform blow up outside the canvas, but I am not sure whether its measured or shown.
- klyrs 3y agoSlow it down, call it Fourierdle.
- tantalor 3y agoFun but hard to control. Suggestions to improve: 1. Make it so two hands can be used. If have to keep repositioning my fingers then I can't remember what each key does. Perhaps WADS and IJKL. 2. Phase: should not bottom out, it should allow for unlimited movement in either direction (wrap around). Should have same spatial/screen movement regardless the frequency, so scale up the phase shift as frequency drops. 3. Frequency: Fix the curve at center of the screen when adjusting frequency, instead of the left edge. Currently imbalanced: the right side move a lot and the left is fixed. Hard to do fine adjustments. And please make it go slower.
- hyoogle 3y agoDefinitely agree on the slower bit. I would love to play a much slower version of this at least to learn the controls better and also think through some strategy. If it sped up over the course of the game that would be great.
- TimTheTinker 3y agoTapping quickly on iOS causes the page to zoom in... makes it hard to play.
- wanderingstan 3y agoFor me as well. I think making the controls into actual button elements would fix this. (Suspecting they are divs with onclick handlers now.)
- nomemory 3y agoThey are rectangular shapes on the canvas.
- jolmg 3y ago> Perhaps WADS and IJKL. I don't think 2 hands are needed, but WASD might be more intuitive. W/S to increase/decrease amplitude, A/D to decrease/increase frequency, Q/E to increase/decrease the phase.
- 3y ago
- dcl 3y agoThis is really good
- ants_everywhere 3y agoThis is one of the coolest things I've seen in a long time!
- dataangel 3y agoDo you always advance to the next stage? If so I appear to win by just clicking "drop" every time.
- downboots 3y agoIt returns to first stage after the wave hits the bounds
- massinstall 3y agoVery cool and creative!
- great_psy 3y agoCool idea, but pretty much impossible on iPhone safari. Clicking the controls too fast just zooms in and out
- nomemory 3y agoAuthor here, I am not a webdev, and I have no idea how to fix that. Do you have any suggestions?
- YetAnotherNick 3y agoAdd this to head: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
- srott 3y agotested, meta is not enough <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum scale=1.0, user-scalable=0"> <style> body { touch-action: none; } <style>
- nomemory 3y agoIf I put touch-action: none, the screen is frozen on my Galaxy, and I cannot zoom out to see the canvas. I've tried touch-action manipulation instead. Is it working better now?
- skaushik92 3y agoYou can disable default touch actions on buttons like this: https://stackoverflow.com/questions/10614481/disable-double-tap-zoom-option-in-browser-on-touch-devices https://stackoverflow.com/questions/10614481/disable-double-...
- wanderingstan 3y agoI think making the controls into actual button elements would fix this. (Suspecting they are divs with onclick handlers now.)
- charcircuit 3y agoThis is too boring as you can drop a straight line every time that minimally changes anything. The game is extremely repetitive and doesn't require any thinking. It's like tetris but you always get the line piece and the speed ramps very slowly.
- owl57 3y ago> you can drop a straight line every time The unreasonable effectiveness of linear regression...
- nomemory 3y agoCongratulations, you've beaten Fourier Tetris.
- bowsamic 3y agoI agree, it needs scoring based on how much you actually manage to reduce the sinusoid. Currently you aren't punished for a null change. Also the general game design is broken in a few other ways: - no clear indication when a loss occurs. I played for a while and didn't realise a loss had occurred half way through my playing - you quickly reach a single dominant frequency since you instinctively try to match the frequency of the current sinusoid - you can control every parameter of the incoming wave, which means this isn't much like tetris, where you can't change one of the parameters of the incoming block (its shape). I would suggest locking some aspect of the incoming wave, which would also fix the next issue - there are too many controls and they are also not easy to change quickly
- nomemory 3y agoGame has changed, no it's possible to actually win, if you reduce the signal very close to 0. There's an indication for a loss and for a win. There's a turn based mode implemented. You can get hints for the best sinusoids.
- bberkgaut 3y agoReminds me of quantum soccer [1] from a short story by Greg Egan [1] https://gregegan.net/BORDER/Soccer/Soccer.html https://gregegan.net/BORDER/Soccer/Soccer.html
- isoprophlex 3y ago> The pairs of modes involved depend on the player’s velocity; the exact rules are spelt out in the mathematical details, but it’s easy to experiment using trial and error. Easy. This guy is truly in league of his own.
- actionfromafar 3y agoThe quantum soccer league.
- willyt 3y agoReminded me of a question from my A-level maths exam at high school; it also managed to install the same sense of panic!
- willyt 3y agoI meant instil...
- bgoated01 3y agoMy first playthrough I quickly got it to where the amplitude was minimal, so then I just dropped low frequency low amplitude sinusoids for a while until I got bored. The following tries didn't go so well, but I guess even if I don't get the amplitude low I could still use the low frequency sines trick. I think this could be nice as a potential teaching tool for how sinusoids and waves combine. Sort of along the lines of this small game I made when I was a TA for an intro to acoustics class in college: https://goatesheard.com/ncg https://goatesheard.com/ncg
- Chubak-PDP11 3y ago[dead]
- stronglikedan 3y agox closes my tab on both FF and Chrome EDIT: never mind, it was due to my Vimium extension