polytope - Dave's Blog

Search
My timeline on Mastodon

Tetris Guideline - Tetris Wiki

2010 Jan 20, 8:56I had no idea of the amount of variation: "The Tetris Guideline is the current specification that The Tetris Company enforces for making all new (2001 and later) Tetris game products alike in form." Covers things like piece color, vocabulary, speeds, rotation system etc etc etc. I'll be adopting some of this in Polytope Tetris...PermalinkCommentstetris wiki reference game videogame

Generating N-D Tetris Pieces

2008 Jun 1, 7:27

When I woke up this morning for some reason I was thinking about Polytope Tetris, my N-D Tetris game, and specifically generating Tetris pieces in various number of dimensions. When I first wrote PTT I thought that as the number of dimensions increased you could end up with an infinite number of non-equivalent crazy Tetris pieces. However this morning I realized that because you only get four blocks per piece there are only a possible three joints in a single Tetris piece which means that you only need three dimensions to represent all possible distinct N-D Tetris pieces.

Below is the table of the various possible pieces per number of dimensions and sorted by the number of joints in the piece. Notice that the 'J' and 'L' become equivalent in 3D because you can rotate the 'J' through the third dimension to make it an 'L'. The same happens for 'S' and 'Z' in 3D, and 'S+' and 'Z+' in 4D.

Joints Name 1D 2D 3D +
1 I I I I I
2 J J J J
L L
3 O O O O
T T T T
S S S S
Z Z
T+ T+ T+
S+ S+ S+
Z+ Z+
Total 1 7 8 7

As a consequence of not realizing there's a finite and small number of N-D Tetris pieces, I wrote code that would randomly generate pieces for a specified number of dimensions by wandering through Tetris space. This consists of first marking the current spot, then randomly picking a direction (a dimension and either forward or backward), going in that direction until hitting a previously unvisited spot and repeating until four spots are marked, forming a Tetris piece. However this morning I realized that continuing in the same direction until reaching am unvisited spot means I can't generate the 'T+' piece. I think the better way to go is keep the list of all possible pieces, pick one randomly, and rotate it randomly through the available dimensions. Doing this will also allow me to give distinct pieces their own specific color (like the classic Tetris games do) rather than picking the color randomly like I do now.

PermalinkCommentspolytope tetris tetris

Wiimote wiissues

2007 Jun 7, 5:29The other day I had the best idea for my Wii remote. Clearly I should use it to control the rotation of Tetris pieces in my N-dimensional Tetris game Polytope Tetris. One of the issues I described with Polytope Tetris is user input. Given a Wii remote the user could rotate a piece through 3 dimensions in a manner that's much easier to adjust to than particular keys on the keyboard.

Anyway, I did a little research into how this might work. I knew that the Wii remote used infrared for absolute positioning and Bluetooth for everything else (LEDs, speaker, accels.) I bought a Bluetooth adapter for my PC after realizing that none of my computers had one already. I used GlovePIE to ensure that my Wii remote could connect and successfully communicate with my computer. GlovePIE is actually pretty cool -- it provides a simple script layer over the Wii remote to control things like your mouse.

Since Polytope Tetris is in Java I looked for and found a Java library for operating with the Wii remote and a long forum thread discussing its use. I then read up on Bluetooth in Java. Apparently JSR 82 is the name of the standard that describes the API a Bluetooth stack should expose in Java. That is, to get Bluetooth working in Java one needs an additional package for Java that actually implements the Bluetooth Java API. This package would depend on the system so I suppose I can't fault Sun for not including it... Where to find such a package? I found a comparison list of implementations and tried the ones that support javax.bluetooth. None of them worked for me because none can address USB devices it seems or they cost money and I couldn't get the trial version working. I also tried bluesock (not listed on the previous list) which seemed promising and could produce an address for my Wii remote as a connected device but couldn't use that address.

And I thought that after I found the Wii remote Java library it would be easy... Oh well...PermalinkCommentsjava bluetooth wii technical remote jsr82 tetris polytopetetris wiimote

Thoughts on Polytope Tetris

2006 Nov 19, 9:25I've had a few thoughts recently on Polytope Tetris. Constructive thoughts: Deconstructive thoughts: PermalinkCommentsproject polytopetetris

What Went Wrong With Polytope Tetris

2006 Oct 6, 4:05In progress article. Note to self: continue writing this.PermalinkCommentsarticle software tetris game

Polytope Tetris

2005 Mar 27, 6:24Open Source N-Dimensional Tetris Game I madePermalinkCommentsgame tetris open-source projects me personal java

Worry Beads

2003 Mar 1, 5:22Today will produce the Mardi Gras parade in my town. I haven't been the previous two years, but I'm considering it this time around. San Luis Obispo, as a college town, contains many teens and young adults who enjoy occasional festivities accompanied with inebriation. San Luis Obispo, as relatively cheap beach front or at least near beach property, contains many vacationing elderly. As we all know, voting increases proportionally with age and, as such, any person under the age of thirty in public after dark is arrested. Mardi Gras is yet another of the bouts in the battle between the Youngsters and the Old-timers in the SLO ring. I will be very happy when this quarter is over. Chemistry may yet have a happy ending, but I don't know that Technical Writing can. I don't believe any grade in that class would make me think, "I'm glad I spent all those weekends working on that report". The quarter's end will also mean I can devote some time to my attention starved Polytope Tetris project. As a side note, I was tempted to, yet again, not write in the journal on account of my poor attitude tonight. However, a journal of one entry does seems a bit slim.PermalinkComments
Older Entries Creative Commons License Some rights reserved.