|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
|||
|
|||
|
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.
|
|
#5
|
|||
|
|||
|
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. |
|
#6
|
||||
|
||||
|
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
|
|
#7
|
|||
|
|||
|
Sound
Quote:
Actually, I haven't looked into sound and background music for JAVA applets yet. Do you have any expertise in the subject? |
|
#8
|
||||
|
||||
|
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.
|
|
#9
|
|||
|
|||
|
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.
|
|
#10
|
||||
|
||||
|
Nice to have people posting these, keep them up.
__________________
Miscellaneous Software Viper_SB Developershed E-Support Anyone else play chess? Challenge me |
|
#11
|
||||
|
||||
|
Is this the same Zoltar from G.I.Joe?
![]()
__________________
http://tripredacus.net/ |
|
#12
|
|||
|
|||
|
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. |
|
#13
|
|||
|
|||
|
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 ) |
|
#14
|
|||
|