stuff I'm doing

for those who are curious, here’s one of the projects I’m working on… a mario game (which started out as an experiment with 2D destructable terrain).

I’ve managed to pull off some decent websites, maybe I can create a decent game too? we’ll see. I’ve been documenting my most recent game development adventure: playing with destructable 2D terrain. although I haven’t gotten to the destructable part yet, you can read up on what I HAVE done so far here:

http://woogley.net/misc/Terrain/

its completely open sourced, so feel free to poke around in the code. maybe in the end it will help someone out… -shrug-

comments/suggestions strongly welcomed as I develop this game :slight_smile:

current progress screenshot:

http://woogley.net/misc/Terrain/build2/screen1.gif

Your project is kind of interesting, though I must admit that I’d be more interested in seeing how you make the terrain destructable.

Are you just going to modify the polygon somehow? It seems like a complicated way to do this. For a Lemmings-like game, I would expect to just have a 2D array of pixels. Using a polygon, you’ll have to find a position on the edge of the polygon and add a new vertex at the right place (or replace an existing vertex if the position is at a vertex).

nah, I’m not going to be modifying the polygon. that’s another reason I’m recording the terrain as a BufferedImage, not only for performance (I’m not rendering the Polygon more than once), but also for raster-based destruction :slight_smile:

how this will affect collision detection, I’m not so sure yet. but that’s the fun of it

Ah, cool. That reminds me of a Worms-clone I have been working on a few years ago. It is based on Java2D because I did not know about Java-OpenGL bindings at that time. :slight_smile: I dropped the project because the rendering loop became awfully slow (today I believe mainly due to inefficient code, because I mapped the huge buffered images all in one piece such that 90% was clipped anyway).

As for the destructable terrain, I used a buffer too. A 2D boolean array actually where I set all pixels that lie in the soil to true. All the drawing took place on a BufferedImage that was then simply displayed.

Here is a screenshot (full resolution):

http://user.cs.tu-berlin.de/~schabby/images/WormGameScreeny.jpg

Now you know where my avatar-worm comes from ;D

Johannes

Check out my post about destructable landscapes: http://www.java-gaming.org/forums/index.php?topic=14344.0

It has some interesting conjectures and things in it, although it seems like you already have a pretty good idea of what you’re doing.