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


Submitted by nolan, posted on May 01, 2001




Image Description, by nolan



This is a shot of a java applet game I wrote a couple of years back. It evolved from an even older (1997 or so) wireframe pong applet. It uses AWT to draw the actual polygons, to get decent performance. On modern machines with modern JIT compilers, even if you get multiple "multi-ball" powerups, gameplay is still fluid (Multi-ball causes each ball on screen to explode into 8 seperate balls). The code is pretty ugly; to prevent stuttering caused by the garbage collector, I had to structure the engine and game so that no objects are created or destroyed during play. Hidden surface removal is hard coded. The sides and front of bricks are not drawn if they would be blocked by an adjacent brick.

Click here to play.

It features a server side high score list (which gets 'hacked' periodically by dorks decompiling the applet =). The current high score was from an actual game though.

I haven't done any Java development in years, but it was (and still is) a fun way to get back to the good old days of slow CPUs and no 3d acceleration.

First person to complain that the shot is 'too dark' gets a beatdown.

nolan


[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.
 
L.e.Denninger

May 02, 2001, 09:19 AM

Dantourin - There is no need for advanced collision-detection;
all you need is sphere vs. axis aligned bounding box detection (and possibly sphere-sphere for multiple balls).

Then just use the surface-normal at the point of impact and the direction-vector of the ball to calculate the new ball-direction-vector.

 
Punchey

May 02, 2001, 09:36 AM

You must have had some setting messed up or something because I never experienced any sort of overly dark thing. Especially since the demo is supposed to take place at mid-day. I don't know what that would be about... I've heard of some people who have a darkness problem only in certain games and it's not fixable with gamma correction. BTW, did you try the gamma correction in the game?

And you're right about the ChristianCoders site.

 
morgan

May 02, 2001, 11:14 AM

My own humble offering:



We wrote this in 1994, but it's still a blast to play.

-m




 
Dom Penfold

May 02, 2001, 12:00 PM

With dual monitor systems you'll find that d3d always draws on the primary card and then blt's this across to your secondary cards framebuffer hence the extreme slowdown.

The only way I've found round this is to run another Geforce (MX) as a secondary. Because that and the GF3/2 use the same driver it's possible for both to use d3d. Although I think the app still has to swap the adapter itself. Most d3d samples do that from the F2 menu.

 
Kijiki

May 02, 2001, 12:41 PM

interesting, but this applet uses Java's AWT, which in turn calls the GDI on windows.

It ran equally fast on both heads of my G450 with XFree86 4.0.3.

 
Kijiki

May 02, 2001, 12:46 PM

The collision detection was actually rather unorthodox.

First of all, the game is actually 2D, so collision with the walls and paddle are incredibly simple comparisions.

For the bricks, I transform the ball position from world space into "brick space" (this is just the grid made up by the bricks, floored). Then I check if there is a brick where the ball is, and if so, calculate where on the brick the ball hit (to do the bounce properly).

Its quite a bit faster than comparing against every single brick's 4 sides every frame.

 
Punchey

May 02, 2001, 01:57 PM

Woohoo! 20th!!!

 
Punchey

May 02, 2001, 02:07 PM

Okay, I have an idea, we should all have a huge beakout/arkanoid festival!!! Let's all create out own version in whatever language we want and make it 3D/2D/4D/whatever. Then we'll start a thread called "Breakout Festival" under General Game Dev and everyone can post URLs to their work. And we can see who is the Breakout writer of all time! Sound cool? Any takers?

 
Scott Velasquez

May 02, 2001, 02:48 PM

Nice, love the text power-ups! ;p

 
Dantourin

May 02, 2001, 03:17 PM

Punchey::

I'm in. If I ever get my clone of clone... finished.

.D.

 
Kijiki

May 02, 2001, 09:04 PM

OK, you've got my entry for the "Java" category. =)

 
Alex Taylor

May 02, 2001, 11:44 PM

The trick with this is you have one card driving both screens. This means the bus doesn't even have to get involved. I didn't realise that everything is done on the primary device. With your set-up, you only have one device - no expensive copy.

 
HHM

May 04, 2001, 10:38 AM

Errr.... I think that this post (mine) is a bit late, but anyway...

Cool work! That's a very funny game... I tried it yesterday (he he) and really enjoyed it.

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