The Source for Java Technology Collaboration
User: Password:



Kirill Grouchnikov

Kirill Grouchnikov's Blog

Tetris Easter egg for Swing applications

Posted by kirillcool on June 30, 2006 at 10:51 AM | Comments (2)

The Matrix rain project that was refactored to the laf-widget layer was not the first one. Even before that i took my first (ever) game written in Java and ported it to a (kind of) Easter egg for Swing apps. The project itself is called trellis and contains a collection Tetris-like games with pluggable shapes and rules. Currently, there are three different kinds of games and four different kinds of shapes. My personal would be the tetris on hexagonal grid, but it takes quite some time to get used to.

As with the previous entry, here is the WebStart link. You'll have to either save it to your machine or run javaws http://weblogs.java.net/blog/kirillcool/archive/trellis/trellis.jnlp from the command prompt. When you hit Ctrl+Alt+T, you will see the following (quite ugly, since this was written back in 2001) selector screen:

choose.png

Choose the game kind and the tile kind and click "Start the game". Based on your choice, you will have one of the 12 available games, such as the regular lines with square tiles:

square-lines.png

A more exotic tetris on hexagonal grid:

hexa-tetris.png

Or even the esoteric piles with Mitsubishi grid:

mitsu-pile.png

The controls are:
  • Left arrow to move left
  • Right arrow to move right
  • r to rotate shape
  • Up arrow to rotate colors (not relevant for Tetris)
  • Down arrow to rotate colors (not relevant for Tetris)
  • Space to drop shape (depends on the game kind)

Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Hi!

    I've tried your game, but I think, that animation is not enought smooth. I've written teris like game risTroyka (from tetris and troyka games) in Swing, to show, how such game should be. It is in beta state and there is no WebStart.
    There is win installer, for others ZIP file. Here is link:

    http://www.riana.si/risTroykaPC.html

    Gorazd Praprotnik

    Posted by: gorazd_praprotn on July 03, 2006 at 11:34 AM

  • Gorazd,
    This was my first-ever Java app that was written for Java 1.1 (not 1.4) back in 2000. I'm happy for you that you have another Tetris game.

    Posted by: kirillcool on July 05, 2006 at 09:34 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds