Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Sara Kapli, posted on April 15, 2002




Image Description, by Sara Kapli



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]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
hdmx

April 16, 2002, 02:58 AM

Most of its flaws are actually features. C++ people often miss multiple inheritance, operand overloading or virtual functions. In Java one is forced to do a well-engineered design to get arround these "flaws" but if one does then the result will be more stable and understandable. Java might not be the first choice for high speed computing (yet :)) but for very large projects with lots of programmers it certainly is.

hdmx

 
Octopussy

April 16, 2002, 03:12 AM

"it's possible to like computers and still be (somewhat) normal"

Really ? So, I may need some advices.. :-))))

Alexis.

 
mill

April 16, 2002, 03:56 AM

10-20 years in computer science is a LOOOOOOOOOOOOOOOOONG time, i'd bet you're wrong (me love Java)

 
jeti

April 16, 2002, 04:54 AM

I've been programming games in Java and I think it sucks.
Especially Applets. Java 1.4 now has good speed in 2D
blitting. Also WebStart looks pretty good.

But: Still no useable sound API. No unsigned byte values
-> bad for image manipulation. Totally shitty for anything
math - no operator overloading, custom types handled by
heap -> bad cache performance. I really hope Mono gets
good.

Example:

Java:
Vector2D a= new Vector2D(1, 2);
Vector2D b= new Vector2D(3, 4);
a.Add(b.Mul(3));

C++:
Vector2D a(1, 2), b(3, 4);
a+= b* 3;

 
Octopussy

April 16, 2002, 05:39 AM

Java is far from being similar to C. You're doing C++ ? So you know what OOP stands for ? ..but sadly, you are missing the point that Java is OOP and that C is not at all. Java do not have enums, structs, unions.. C do not have classes, packages, primitive types..

C is similar to Java as C is similar BASIC.

Even newbies are knowing that !! ( I'm feeding you :-)

Do you really have a computer ?

Alexis.

 
joke_dst

April 16, 2002, 06:53 AM

I know, I'm a troll for posting this but...

raiderr1, all you've said in this discussion is also insults, you know... (insulting MC BAXTON)


Oh no! I'm gonna get on that list for this!

 
hdmx

April 16, 2002, 07:01 AM

Actually Java is not cross-platform at all. It IS the platform.

There are some game genres were you do not need all the power of the cpu and Java is not slow if one knows how to use it. I think 10-20 years is way too much.

hdmx

 
hdmx

April 16, 2002, 07:06 AM

This is possible in Java as well. One class can implement multiple interfaces and one interface might extends multiple interfaces. However inheritance of implementations from diffenerent classes is not possible and I guess coda was refering to this.

hdmx

 
Ron Frazier

April 16, 2002, 07:38 AM

Do you really think its too much? C++ was created in 1980, but as of 5 years ago, C (not C++) was still the standard in the games industry. Only in the last 5 years has C++ really caught on.

With java, there is already talk of it starting to die. I definitely think its a good platform for server applications (it has some nice networking classes). However, for anything with a GUI I think Java sucks. From my experience, it is extremely buggy (even things like catching mouse clicks isnt reliable). Despite what people say, it isnt consistant from platform to platform. Even using the java native GUI stuff (the ones that draw their own UI instead of relying on the OS) things still look different from plaform to platform (controls align differently, spacing is off a pixel or 2 here and there, clipping rects dont always work right, painting methods dont always update correctly, etc).

 
Ron Frazier

April 16, 2002, 07:48 AM

I wouldnt say 2x120 hours is a lot for a school project. The teacher probably said on day 1 of the class "your final project, due on the last day of class, is .... and we are going to build it gradually along the way." Besides, it looks like Sara really took some pride in this project. Its not uncommon for the most dedicated students to put in even 10 times the work of the average student, just because they want to do the best. Sara didn't even mention what the assignment actually was. The assignment might have been "make a java program that does something useful", and she and her friend just decided to go all-out and make a game because they were interested. She did say that they won an award for best project, so they probably did put in the most work.

 
St Rana

April 16, 2002, 07:57 AM

There are no medals in my game as I never won one but I do collect old coins =)

Game is 3D, only shown from one perspective, rendered and projected to 2D. There are no other ways to bring third dimension in monitor's two dimensional glowing surface =)

Sounds are best of this game, don't we all just looove silence over few seldomly repeating hollow tinklings =)


 
St Rana

April 16, 2002, 08:12 AM

OK, got to hurry with translating and packaging the game =) Oh, name of the game is "Aarrelabyrintti" which translates to Treasure Labyrinth.

My school is Espoo-Vantaa Institute of Technology, EVITech, placed in Espoo, Finland

www.evitech.fi

and I'm studying mediatechnologies in there

 
Spoon

April 16, 2002, 09:15 AM

Pretty good for a girl?
I understand that there are less girls in computer programming, etc, but that doesn't make them any less capable then any of us. I think she deserves just as much respect as anyone else, instead of you saying, "Well, normally it would suck, but since it's YOU it's pretty good." That's not respect.
If you don't like it, then say so just like you would if it were made by a guy. I'm sure she came here for a little feed back and some constructive crticism (and, like all the other posters, to strut her stuff...) I personally don't think the game looks all that compelle, but having done some game programming in Java I can respect the ability of someone else to pull it all together. (The APIs can be confusing from time to time)
It may not be on the level we normally see here, but it's an achievement.

 
Spoon

April 16, 2002, 09:17 AM

Java has virtual functions...They're just on by default. You make a function non-overloadable in a subclass via final instead of making it overloadable in a subclass via virtual.

 
raiderr1

April 16, 2002, 10:31 AM

Joke dst, that's not true. All I'm doing is speaking the truth. It's true that all he's done is insult people. Obviously that's not a good thing, but by me saying that it's not really an insult. I'm just letting this person know it.I wouldn't want to be told that, but then again, I don't constantly insult IOTD's. It's a big difference to insult an IOTD than telling somebody that they are always insulting other people.

 
Jari Komppa

April 16, 2002, 11:43 AM

..and before anyone gets their hopes up, she's already happily married. =)

 
Mikademus

April 16, 2002, 12:26 PM

Female programmer + female game programmer = arrakaste sinoase!!! (sorry, I can pronounce it (?) but not spell it!)

 
AticAtac

April 16, 2002, 12:43 PM

No one is perfect ... ;)

 
mr furious

April 16, 2002, 12:59 PM

I disagree that this IOTD is 'not on the level' of previous IOTDs -- as it's been said in this discussion as well as many, many others, lots of IOTDs are quake clones and landscape engines that look remarkably similar given the differences quoted in the description. These things are incredibly difficult to code, or at least time-consuming it's true, but that doesn't make them good, necessarily.

A quake clone may be good practice or a good learning experience, and in some cases has turned out to be a pretty good game as well. But I have seen many quake clones that aren't worth the time it took to peruse them because they're tired. It's been done. It's an old idea now.

This IOTDs game is not a new idea: it's a game that exists in analog as well; still, I'VE NEVER SEEN IT IN CODE BEFORE. I like that about it.

What is the point of getting really good at impressive 3d graphics if all we do is make the same application over and over?
I admire this IOTD author's choice to post here, even though the atmosphere is at times elitest and hegemonic. Perhaps MC Baxton would like to explain what 'he' meant?

 
mr furious

April 16, 2002, 01:05 PM

wow, you sound so ethereal and wise.: "I felt hope" . Prithee, o wise one, dost you feel hope in my post as well? Tell me quickly! I can't bear to wait another moment!

 
mr furious

April 16, 2002, 01:11 PM



how do you know?

 
Jari Komppa

April 16, 2002, 01:20 PM

I know her, and her husband, was at their wedding, am in the same demogroup with them.. etc =)

 
Buster

April 16, 2002, 01:23 PM

Any possibility of implementing an ignore feature or an IP ban on the server? Think of the bandwidth we could save if I never had to see postings from MC BAXTON.

 
mr furious

April 16, 2002, 01:42 PM



cool. But what is a demogroup? Do you guys have a website up yet?

 
mr furious

April 16, 2002, 02:50 PM



woah, we'd better record this one quick. a girl, you say? I thought girls only liked pretty things, like rainbows, makeup and kittens. Oh, and ponies. certainly not computers! Or games!

Okay, I'll handle it. April 15, 2002: girl makes computer game.

Done! wow, the world will be shocked. I know I am.

 
sheijk

April 16, 2002, 03:04 PM

Thanks for this information :)
Until know, the lack of multiple inheritance was the thing I most disagreed in Java. But if you can implement more than one interface it might be not that bad.
Maybe now I should have a look at it...

 
MC BAXTON

April 16, 2002, 03:36 PM

It will not work... Simply. You can force me to change nick and IP. Nothing more. It was tested .. and It works.
But also .. I hope I am nice enough ;p Nobody wants to kill you now, so just be happy

 
MC BAXTON

April 16, 2002, 04:00 PM

Thanks for food but im not hungry


sorry missed ++ add if u like it

I have alexis in my home and its better than any pc

 
Spoon

April 17, 2002, 09:34 AM

You make a valid point.
Coding a 3D engine or landscape engine is probably a bit more impressive, from the standpoint of requiring strong mathematical skills and so on, but few people actually do anything with their engine except say "Here, look at my groovy engine."
This IOTD at least made what looks to be a fun and playable game. It's that old technology vs gameplay issue again.

My only major point, really, was that MC Braxton said it was bad, but then turned around and said it was good because she's a girl, and I think that's rediculous.

I do agree that there is alot of eliteism here. Alot of people don't even like the game just because it's written in java, which in an of itself is something of an elitist attitiude. If something works, and it's well done, and it works well, then it isn't really fair to just dismiss it because it was written in VB or Java or whatever.

 
This thread contains 89 messages.
First Previous ( To view more messages, select a page: 0 1 2 ... out of 2) Next Last
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.