Results 1 to 9 of 9
Thread: A bit of color!
- 01-07-2008, 06:52 PM #1
A bit of color!
Hello everyone!
I've noticed that there are many new members that are interested in Java gaming. I'm currently busy with a space game called "Eath's Belt". I think that some members on Java Forums might appreciate some pictures of what can be done with Java2D.
The game has the ability to generate and draw scenery for my game. The game has collision detection and a reasonable frame rate, on my PC so far. Anyway here are the pictures:

Picture 1: The planet is generated by the Java program. It uses BufferedImage objects and alpha blending. The spaceship is made out of polygons, loaded from a file. The polygons are shaded appropriately as the ship moves to simulate a “3D” effect. It also leaves a cyan trail of the engine for the spacey effect.

Picture 2: In the background is a nebula or dust cloud. It adds color to my game and gives a sense of position and motion to the player. The ship can shoot lasers and the lasers can hit (or miss closely) certain bodies defined in my game, like asteroid. Asteroids can bounce of the player’s ship and split into two smaller asteroids when shot - just like the original Asteroids game. Asteroids can also bounce off each other to make them behave more unpredictably. The player’s ship is smaller in this screenshot because I “zoomed” the camera out.

Picture 3: This is a birds-eye view of the entire solar system. It contains a star in the center, planets (indicated by the green icons) and asteroid clusters (indicated by the blue icons).

Picture 4: Here the player is shooting rapidly and rotating.
Thank you for reading this monster. I would be glad if any one can give their opinions and tips where I can make improvements.
Thanks - TimLast edited by tim; 01-17-2008 at 11:30 AM.
Eyes dwelling into the past are blind to what lies in the future. Step carefully.
- 01-07-2008, 07:09 PM #2
Tim - Fantastic display of only a portion of what can be accomplished with Java2D. Impressive. ;)
Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice? Vote now!
Got a little Capt'n in you? (drink responsibly)
- 01-07-2008, 07:36 PM #3
Thank you CaptainMorgan :D
Eyes dwelling into the past are blind to what lies in the future. Step carefully.
- 01-17-2008, 08:06 PM #4
Java3D
Hello every one.
Sorry for the double post, but I could not find a better place for this post. I enjoy programming graphics programs like the one above, but the whole 2D thing is boring me. :( I want to do 3D stuff, but my knowledge on this subject is very limited. I wrote a few 3D programs in other languages, but none uses acceleration or API.
I have downloaded the java3D package from Sun's website and it does not appear to have any Javadoc. (a separate download perhaps?) It would be nice if someone could refer any good books or tutorials on the subject. I have been using Java for about a month now, so if you think this is a bit early for this, please tell me.
Thank you. :DEyes dwelling into the past are blind to what lies in the future. Step carefully.
- 01-17-2008, 08:39 PM #5
Hello Tim.
First of all, congratulation with your game. It looks really attractive.
Related to your Java 3D question. You should be aware of some facts related to Java3D. It is an old API which is not open source previously. I think it is a great API and valuable for Java but it does not have any active community and it is not improved as far as i know. Only some bugfixes performed rarely by one person as far as i know. So, you might consider learning better 3D APIs for Java. I am not an expert on graphics but community is very important for open source projects. And as far as i know, jME has a better community and much more actively developed. You can search for other ones too.
Regarding Java3D javadoc, yes it had one and it should be on java.net. Please check java.net project page again and PM me if you still can not find it.
For further Java3D documentation, please check following urls:
Java 3D API Tutorial
http://www.freebooksource.com/JAVA/O...rogramming.htm (You can download this book from rapidshare link there.)
Pro Java 6 3D Game Development: Java 3D, JOGL, JInput and JOAL APIs - IT-Guru (Another rapidshare link for a book)
You can try searching amazon. There should be a few more related books.
- 01-17-2008, 08:55 PM #6
Thank you. :D
Eyes dwelling into the past are blind to what lies in the future. Step carefully.
- 02-01-2008, 07:02 PM #7
Progress
Hello every one
I've made some progress since I last posted here. This will probably be my last post on this subject. Anyway, here it is:
I have completed the interface and its got a round feeling to it, since I wanted to move away from a blocky interface. I have added aliens in the game that will hunt you down. I gave the alien ships AI and two types of weapons: lasers and homing missiles. To get the aliens to hit a moving target using lasers was a bit tricky, but I works 100% now, assuming that the target does not accelerate or dodge. :D Here are a few screen shots of how it looks now:

In this scene, the alien is attacking some asteroids. (Very destructive little things ;)) Note that it aims for a moving target so that it collides with the projectile after some time interval. Also, see the patterns that the spaceship makes as it moves. The red, green and blue icons are power ups to make the game a bit easier.

Here a missile just missed me as I turned my ship. :eek:

And lastly, I have added some documentation about the game. The document is created by an XML document that I defined. The document is parsed and then formatted appropriately.
So that's it. Thank you for your interest. :DLast edited by tim; 02-01-2008 at 07:07 PM.
Eyes dwelling into the past are blind to what lies in the future. Step carefully.
- 02-02-2008, 09:14 AM #8
Tim, you continue to showcase your elegant solutions to members' issues and here provide us with yet another display of fantastic Java at work. I'm happy you're a member of this forum and I mean that sincerely.
Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice? Vote now!
Got a little Capt'n in you? (drink responsibly)
- 02-11-2008, 11:57 PM #9
Similar Threads
-
Help with switch color
By Daniel in forum AWT / SwingReplies: 2Last Post: 09-18-2008, 07:54 AM -
Color coded code
By tim in forum Suggestions & FeedbackReplies: 11Last Post: 06-29-2008, 09:35 AM -
Color objects
By CyberFrog in forum New To JavaReplies: 4Last Post: 04-01-2008, 12:41 AM -
Color a button in Gnome
By waka in forum New To JavaReplies: 0Last Post: 02-13-2008, 12:52 AM -
window background color?
By javan00b in forum New To JavaReplies: 3Last Post: 01-29-2008, 10:43 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks