Page 1 of 5 123 ... Last
  • Jump to page:
    #1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50

    Thumbs up 3D Browser-based Game Development


    I am developing a video game in JAVA, called "Universe Storage". It is going to be a multi-player online browser-based 3D video game. You will control a character who has been accidentally thrown into the future by a company called "Universe Storage". A disgruntled robot will be your guide as you learn to construct your home, go to school, earn money, build and program robots and weapons, and fight in futuristic battles. I am planning to post progress here throughout development, and problems I encounter along the way. Anyone interested in getting involved, providing feedback, beta testing, or obtaining source code, just send me an email to paul@paulscode.com.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50

    Lightbulb 3D in a JAVA Applet, and adding 2D Overlay


    This is my progress on the game so far. Earlier this week, I did a little research on using OpenGL within a JAVA applet. I came across an interesting 3D browser based game called "Zoltar's Return" (I can't post the link, since I am a new member, so if you want to see more about it, just email me, or google it). It is launched from something called JOGLAppletLauncher. This applet launcher has a lot of features I really like, such as simplifying the whole digital signatures and JAVA sandbox thing. I decided to try it out, so I downloaded everything I need to use it. I made a simple test program which runs the famous JOGL gears demo as an applet. I know, there are plenty of intelligent folks out there who have done that before, but it was a learning process for me to figure it out for myself.
    The next thing I decided to look into was putting a 2D overlay on top of the rendered 3D scene (basically a "heads-up" style overlay). I googled around a bit, and came across an interesting program called "Photo Cube". The source code for the program has a really sweet class in it called CompositeGLJPanel, which simplifies the mixing of JOGL and Swing. I only had to alter the class a little bit to get it working in a test applet, which combines the gears demo with a 2D background and forground.
    Both these applets test important concepts I will need for my game. If you would like more information on them, you can post your questions here, or email me directly if you would like the source code.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50

    Robot Builder: Essential Elements of a Game


    There are several things that are essential to most games, like processing input, playing sounds, and the like. While I have made a few games in C++ before, I have not ever attempted one in JAVA. Therefore, I think the best way to pick up some of the basic skills I will need for Universe Storage, is to write a simple 2D game in JAVA first. Based on the applet-launcher and CompositeGLJPanel infrastructure I have now, I am going to create a 2D browser game. I decided that, since one of the things I want to have in Universe Storage is the ability to program robots, this test game will be a 2D robot builder game.
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50

    Basic Logic Gates


    This is a progress update on Robot Builder. The basic idea of the game is to create IC chips, then wire them up inside a robot to make it do stuff. It is a little like the concept of an old game I used to play called "Robot Odyssey" (This game was a great way for anyone to learn the basics of logic and electric engineering in a relaxed-pace, fun environment - one of my favorites back in the day. I recommend googling it). I created a class called "Part", which is managed in a class called "PartManager". From the "Part" template, I created the following logic gates: AND, NAND, OR, NOR, XOR, XNOR, and NOT. I also made TFlipflops and SRFlipflops. From my tests they all seem to be functioning correctly, and the PartManager works like a charm. I am now moving on to the graphical components. If you are interested in reading more about electric engineering, Wikipedia has some great information on the subject.
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50

    Animated Robot


    I have been making headway in the graphics for Robot Builder. I discovered two ways to load image files into BufferedImages (which can easily be put into Textures for use in 3D when I finish Robot Builder and work on Universe Storage). One way is (in NetBeans) to put the images into a package, and to get the image in the program, use:
    Code:
    BufferedImage img = ImageIO.read( new BufferedInputStream( 
        getClass().getClassLoader().getResourceAsStream( filename ) ) );
    This appears to make the image part of the compiled jar. The other way is to use:
    Code:
    String imagesPath = "blah";  // put the url to your images
    URL url = new URL( imagesPath + filename ); 
    BufferedImage img = ImageIO.read(url);
    This allows the program to pull the images off the web. I decided the best way for me is to use the URL method. That way it won't take as long to download the applet, and I could potentially display a message to the player while the images are loading. I created a simple template class for drawing animations. From this class I created a simple robot. It doesn't do anything yet, but it is animated.
  10. #6
  11. Kage Bunshin
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2005
    Location
    The Seven Seas Of Rhye
    Posts
    930
    Rep Power
    423
    Looks interesting. Anything you specifically need help with? Im bored working on my own game, so let me know if there is anything specific you need done(java-wise) =)
    "Java makes impossible things possible, but makes easy things difficult." - Somebody
  12. #7
  13. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50

    Sound


    Originally Posted by tagmanadvance
    Looks interesting. Anything you specifically need help with? Im bored working on my own game, so let me know if there is anything specific you need done(java-wise) =)
    Actually, I haven't looked into sound and background music for JAVA applets yet. Do you have any expertise in the subject?
  14. #8
  15. Kage Bunshin
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2005
    Location
    The Seven Seas Of Rhye
    Posts
    930
    Rep Power
    423
    Expertise, no; but I do have quite a bit of knowledge about it. I have actually wanted to dabble with sound streams in a game environment. Mostly it has been on-the-fly alerts and such, but this will be much more complicated and fun. When I get home Ill see what I can reuse and get started on anything that might be needed.
    "Java makes impossible things possible, but makes easy things difficult." - Somebody
  16. #9
  17. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50
    Awesome. I'd be happy to help you out with your game as well, if you run into any difficulties. I have made a few games before so I know a little about the subject. This is the first time I've done one in JAVA, though. It took a little getting used to at first, by I am really enjoying the language now.
  18. #10
  19. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Location
    Canada
    Posts
    4,846
    Rep Power
    635
    Nice to have people posting these, keep them up.
  20. #11
  21. K-Mart-ian Legend
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Location
    United States
    Posts
    299
    Rep Power
    50
    Is this the same Zoltar from G.I.Joe?
  22. #12
  23. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50
    Today I added a map to the Robot Builder game. It is a really simple 2-layer tile map, with tiles being either solid or not (I'm not going for awesome looks just yet).



    If I ever decided to take Robot Builder to the next level: a real, distributable game, I could easily add in a foreground layer, draw a collection of really nice-looking tiles, and expand on the basic functionality I have in place now.
    I also completed the code for object movement on the screen and hit-detection to prevent an object from passing through solid tiles. I've run several tests, and everything seems to be in order. I am now ready to move on to the wiring and IC chip creation parts of the game.
  24. #13
  25. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50

    Menu and Mouse Functions


    Today I created Robot Builder's tool menu, which has two buttons. The first one will open the IC Chip tool. The other will open and close the "Toolkit", which contains all the logic gates. I am also receiving and keeping track of mouse events from the two menu buttons and the robot.
    When these interfaces are complete, this is how the game will work:

    1) Open the Chip editor to create a new IC Chip
    2) Open the toolkit and pull logic gates out
    3) Hook them up inside the chip however you like.
    4) Save your chip.
    5) Click the robot to work on it.
    6) Pull the chip out of the toolkit
    7) Wire it up inside the robot.

    When you are done, sit back and watch the robot go (or not go, depending on how good your logic skills are )
  26. #14
  27. Kage Bunshin
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2005
    Location
    The Seven Seas Of Rhye
    Posts
    930
    Rep Power
    423
    What kind of robots are we talking about here? Like Robot Wars, or small humanoid mechs? I am trying to get a picture of how this is all going to look, but so far it sounds awesome!

    I am still working on the sound stuff. There is just so much involved, so I am trying to dumb it down to what you might see on a VCR. I also don't want to reinvent any wheels, so I am constantly looking for ways to play different file types. Just the other day I found a library that allows Java to play mp3s. When I get it all sorted out Ill post it, but it might be a week. Right now it isn't fit for human eyes xD
    "Java makes impossible things possible, but makes easy things difficult." - Somebody
  28. #15
  29. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50

    The Bot


    Here is an image of the robot:


    The link to run the game is:
    http://www.paulknows.com/Games/RobotBuilder/

    I will also be posting a lot of source code along the way, which will can be downloaded at:
    http://www.paulscode.com
Page 1 of 5 123 ... Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo