Omnimaga

General Discussion => Technology and Development => Computer Projects and Ideas => Topic started by: Munchor on September 05, 2011, 05:20:04 pm

Title: Java - Falling Blocks
Post by: Munchor on September 05, 2011, 05:20:04 pm
I decided to port the Falling Blocks game I made for the TI Nspire Game Contest to computers, and I made it in Java, with a screen of 852*600. The graphics are as simple as the ones of the original game. It's almost an exact port, I wanted to keep it fast and simple, like the original.

Here's a couple of screenshots of it running. Oh and it's open-source, the source is included.

(http://img.removedfromgame.com/imgs/FallingBlocksTitleScreen.png)
Blocks falling in the title screen

(http://img.removedfromgame.com/imgs/FallingBlocksRunning.png)
"Deathly" blocks are read, and the other are green

On the attached zip, "FallingBlocks.class" is the main class, so to run it, just do java FallingBlocks, or open FallingBlocks.class using the Java Runtime program, if you prefer to do it with the mouse.
Title: Re: Java - Falling Blocks
Post by: Jim Bauwens on September 06, 2011, 12:31:47 pm
Nice, good work!

Btw, if you improve your wx version (make it more pretty and stuff), you could try to push in the Ubuntu/Debian repo :)
Title: Re: Java - Falling Blocks
Post by: Wellen on September 06, 2011, 03:15:24 pm
I can't open it ???
I did [Windows+R]>cmd>java FallingBlocks
but FallingBlocks.class is not found..

Edit: I tried with the java Runtime, but the window opens, and closes immediately
Title: Re: Java - Falling Blocks
Post by: Munchor on September 06, 2011, 03:17:14 pm
I can't open it ???
I did [Windows+R]>cmd>java FallingBlocks
but FallingBlocks.class is not found..

Edit: I tried with the java Runtime, but the window opens, and closes immediately

You have to go to the directory of the download.

1. Unzip the attachment somewhere
2. Open the cmd
3. cd to that directory.
4. java FallingBlocks

If it doesn't work, please tell me the error it gives. Thanks!
Title: Re: Java - Falling Blocks
Post by: Wellen on September 06, 2011, 03:39:03 pm
No, it doesn't work..
Maybe a problem with my Java ? (v6)

Also, I don't program in java, so there might be a mistake I didn't see ^^
Title: Re: Java - Falling Blocks
Post by: calcdude84se on September 06, 2011, 05:01:32 pm
You capitalized it incorrectly ;) Use "FallingBlocks" instead of "Fallingblocks" and try again. :)
Title: Re: Java - Falling Blocks
Post by: Munchor on September 06, 2011, 05:07:55 pm
You capitalized it incorrectly ;) Use "FallingBlocks" instead of "Fallingblocks" and try again. :)

Calcdude is right, use "FallingBlocks" ;) And this game is Java 6 by the way.
Title: Re: Java - Falling Blocks
Post by: Wellen on September 06, 2011, 05:19:59 pm
Oh yeah, you're right.
It works now ^^
Nice game, btw
Title: Re: Java - Falling Blocks
Post by: Munchor on September 07, 2011, 04:37:04 am
Oh yeah, you're right.
It works now ^^
Nice game, btw

Thanks a lot!