Circuit Swamp

News Projects Techniques

Java 4k 2006

Java 4k 2006

The current Java 4K is running from December 1st, 2005 - March 1st, 2006. Here are my entries.

About Java 4K

Java 4k is a contest at www.javagaming.org. The objective is to write a Java game in no more than 4096 bytes.

If the games do not run, you may need to install Java.

Frag!Frag4k

You find yourself in an infernal 3D maze, inhabited by bug-eyed monsters.  Explore the maze and kill the monsters.  There are ten per level.  The maze is different on each level and the monsters move faster at higher levels.

Play Frag4k

Controls

Move Player:    Cursor Keys
Fire Weapon:    Space Bar
Start Game:     Enter Key

SpeedSpeed4k

Achieve 10 laps in the best possible time, whilst avoiding the other innocent road users.

Play Speed4k

Controls

Move Player:    Cursor Keys
Start Game:     Enter Key

SpeedKana Invaders 4k

Traditional gameplay with an educational twist. Each alien is a japanese hiragana, which can only be destroyed by a matching bullet. Select the bullet type by typing the romaji equivalent.

Play Kana Invaders 4k

Controls

Move Player:    Cursor Keys
Fire Weapon:    Space Bar
Select Weapon:  Type Romaji
Start Game:     Enter Key

Source Code

Source

The source for each game consists of a single class called 'G'. Kana Invaders additionally has a data file 'd', which is actually a PNG file. As well as the source, the archive contains an executable jar for each game, which has been compressed with proguard and packed with with 7-zip or kzip, so as to keep within the required 4096 bytes.

License

Copyright © 2005, Alan Waddington
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.