Submitted by , posted on 15 April 2002



Image Description, by


You are looking at a screenshot of a game project we just finished as a school project with team of two people. The game was made with pure Java (J2SE) utilizing Swing a little bit in the menus and to display some HTML in the help dialog. We didn't use any third-party libraries or extensions provided with JBuilder, which was the development environment we used. Using CVS for version control on a server accessible in the net gave us possibility to work independently so we could make parallel changes.

The game is a turn-based board game for 2 to 4 players playing with the same computer. The idea is to look for the treasure shown in the right column. For each turn the player is allowed to rotate the extra block and insert it into the labyrinth so that new extra block comes from the other side. Piece can be moved freely in the available path before and after the moving of the blocks. The game is finished when one of the player has collected the set amount of treasures which can be seen in the lower right corner.

Assuring that player has a route through the labyrinth was trickiest. Because game area is rather small, this was implemented with a pretty simple flood-fill algorithm although it's not most efficient way to search routes. Using Swing Timer for animating moving row or column of blocks was an easy choice but afterwards we found out that it has problems with the new J2SE SDK 1.4 - we developed the game using 1.3.x. The animation isn't smooth with the 1.4 so we may have to look a bit on that too if it can be fixed. Since this was a project for a school course, we were also required to make a design document beforehand as well as documenting the structure with class charts and so. Due to careful planning of the game logic it was easier to code the game itself.

Newer Java versions support also PNG images and it proved to be particularly handy to use alpha channeled PNG images, so adding soft edges and shadows was very easy. All in all Java was very good choice for making a game like this in the relatively short timeframe we had for the project.

Game is not available for downloading yet since we want to do some minor polishing and packaging for it although otherwise the game is ready. The game is also currently only in Finnish but we may consider doing a translated version in case you don't want to learn some Finnish. ;-)

We received a nice little statue with text "Java gurus" as a reward since our project was voted as the best one in the class. That felt good after we had just spent the last two nights working our asses off.

We two used about 120 hours in total to coding, not counting making graphics. I made the graphics and a bit over a half of the code (mostly the graphics handling and drawing). I have been making 2D and 3D graphics for some game and demo projects in the past but this is the first game project I have partly coded.

St Rana



[prev]
Image of the Day Gallery
www.flipcode.com

[next]


 


Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.