Results 1 to 9 of 9

Thread: A bit of color!

  1. #1
    tim's Avatar
    tim
    tim is offline Senior Member
    Join Date
    Dec 2007
    Posts
    435
    Rep Power
    7

    Talking 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 - Tim
    Last 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.

  2. #2
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    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)

  3. #3
    tim's Avatar
    tim
    tim is offline Senior Member
    Join Date
    Dec 2007
    Posts
    435
    Rep Power
    7

    Default

    Thank you CaptainMorgan :D
    Eyes dwelling into the past are blind to what lies in the future. Step carefully.

  4. #4
    tim's Avatar
    tim
    tim is offline Senior Member
    Join Date
    Dec 2007
    Posts
    435
    Rep Power
    7

    Default 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. :D
    Eyes dwelling into the past are blind to what lies in the future. Step carefully.

  5. #5
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    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.

  6. #6
    tim's Avatar
    tim
    tim is offline Senior Member
    Join Date
    Dec 2007
    Posts
    435
    Rep Power
    7

    Default

    Thank you. :D
    Eyes dwelling into the past are blind to what lies in the future. Step carefully.

  7. #7
    tim's Avatar
    tim
    tim is offline Senior Member
    Join Date
    Dec 2007
    Posts
    435
    Rep Power
    7

    Default 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. :D
    Last 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.

  8. #8
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    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)

  9. #9
    dc2acgsr99's Avatar
    dc2acgsr99 is offline Member
    Join Date
    Jan 2008
    Location
    Pittsburgh
    Posts
    26
    Rep Power
    0

    Default

    Tim.. your an animal with it, and I second the Captain on that :)
    Hey I'm still learning... Thats my story and I'm sticking to it :)

Similar Threads

  1. Help with switch color
    By Daniel in forum AWT / Swing
    Replies: 2
    Last Post: 09-18-2008, 07:54 AM
  2. Color coded code
    By tim in forum Suggestions & Feedback
    Replies: 11
    Last Post: 06-29-2008, 09:35 AM
  3. Color objects
    By CyberFrog in forum New To Java
    Replies: 4
    Last Post: 04-01-2008, 12:41 AM
  4. Color a button in Gnome
    By waka in forum New To Java
    Replies: 0
    Last Post: 02-13-2008, 12:52 AM
  5. window background color?
    By javan00b in forum New To Java
    Replies: 3
    Last Post: 01-29-2008, 10:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •