Java-Gaming.org    
Featured games (78)
games approved by the League of Dukes
Games in Showcase (427)
Games in Android Showcase (89)
games submitted by our members
Games in WIP (466)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 13
1  Game Development / Newbie & Debugging Questions / Re: Looking for a good book/guide to 3D on: 2008-05-10 23:04:42
Check out the table of contents on this one, if you are looking to learn the stuff rather than to just find a solution to that particular problem. http://www.amazon.com/Mathematics-Programming-Computer-Graphics-Development/dp/1584502770/ref=pd_sim_b_img_3
2  Java Game APIs & Engines / Java 2D / Re: Please try the new Direct3D 9 pipeline in 6uN EA on: 2008-05-10 03:13:56
I know this is an old topic, but I just tried 6u10 and am pretty excited about the results Smiley I'd been working on some visualizations for a media player I'm writing for class (I'm doing gui, system architecture, and.. yep, anything visual - others are doing playback and xml library representation). So, the most cpu intensive visualization I was working on used something like 30% cpu before u10 and something like 5% after. I'm drawing lots of translucent BufferedImages to a VolatileImage and then drawing that to the screen. Some screens for fun, 'cause it's kinda perty (the numbers are a countdown btw, not fps - and the crappy image quality is because I only have Paint here Sad ):<br>
3  Game Development / Shared Code / Re: zShapes - Resolution Independent Curve Rendering on: 2006-09-02 18:10:47
That's really cool - works on my java 5.0.
4  Discussions / Miscellaneous Topics / Re: Pictures of Cas! on: 2006-08-30 17:18:36
Everyone think's I'm 26 Smiley There's hope yet!

Cas Smiley

haha.. 26 is the exact age I had guessed based on that picture..
5  Games Center / Showcase / Re: Super Mario Whee on: 2006-08-21 07:33:37
That's an amazing remake... I've played a LOT of Super Mario World and this feels very loyal to the original - I see the dust getting kicked up when Mario makes a quick direction reverse Smiley
6  Java Game APIs & Engines / Java 2D / Re: Images in JInternalFrame on: 2006-05-21 03:35:50
Try creating a class like 'DrawingPanel' or similar that subclasses JPanel. Do your drawing from within this class (in the paintComponent method still) and either set an instance of it as your JInternalFrame's content pane or add it to the content pane. The other thing you may try is adding a println to the paintComponent method where you are drawing now to see if it's even being called so that you can narrow down the origins of the problem a bit. If it's not getting called you could look in the Java api to find out what causes a JInternalFrame's paintComponent method to be called.
7  Discussions / Business and Project Discussions / Re: A New 3d Modelling Tool on: 2006-05-20 09:00:48
One other thing you might consider doing, if it's at all an option, is improving the look of the site a bit. No offense, but I can honestly say that I don't think I'd explore the site if I came across it just because it doesn't look professional enough. At a minimum, lose the embedded scroller, fix the 'special offer' graphic (edges are cut off), and maybe do something with your navigation. Check out the website for this free modeling program: http://www.blender.org/cms/Home.2.0.html - That may be a bit much to strive for, but that's sort of the competition I think.
8  Games Center / Showcase / Re: Growth Spurt on: 2005-12-12 08:45:38
very cool, good job Smiley Its actually a bit much for my geforce2 mx to handle though.
9  Games Center / 4K Game Competition - 2006 / Re: fuzetsu on: 2005-12-08 21:07:25
Cool idea. Its so tempting to get close and watch those tons of bullets fly out, but I know it will kill me! I think lots of good games have that balance though. I remember trying to run through the levels in super mario bros. really fast and dying over and over, but it was cool to go through the levels so fast.
10  Games Center / 4K Game Competition - 2006 / Re: Roll 4k on: 2005-12-02 00:31:33
great stuff kev  Smiley
11  Games Center / Archived Projects / Re: JAVAsteroids on: 2005-11-18 18:07:34
yeah I guess that could be sort of annoying... the game was only made for opengl practice though, my first opengl app Smiley

I know about javagamesfactory.org I even have a game on there, Fatman in Strangeland. I was thinking of fixing up my asteroids and sticking it on there but I'm sort of not coding right now so if I do it will be later.
12  Games Center / Archived Projects / Re: Tempest on: 2005-10-26 07:34:45
I've always been horrible at this game, nothings changed. At least I can go out with style in this version Cheesy
13  Game Development / Newbie & Debugging Questions / Re: Timer or new Thread? on: 2005-10-21 16:15:29
Well there are lots of ways you can do that, a simple scheme would be to measure how much time passed while you were updating/rendering (i.e. during the current frame) and subtract it from your usual pause time. You could probably find something more advanced if you looked around (or came up with your own Smiley).
14  Game Development / Newbie & Debugging Questions / Re: Timer or new Thread? on: 2005-10-21 02:46:47
just stick it in a new Thread this way you can change the way you want to pause the loop or skip frames and that sort of thing since your not reliant on the swing timer.

...
Thread myThread = new Thread(this);
myThread.start();
}

public void run()
{
    running = true;

    while(running)
       //handle input
       //update game
       //render game
       //do pause
}
15  Java Game APIs & Engines / OpenGL Development / Re: Looking for more testers/feedback on: 2005-10-19 02:08:29
I played till game over with shadows off, then went to the menu, turned shadows on and started over. I died a couple times and then (right after dying I think), the game crashed. I was shown a dialog that said: Fatal Exception has occurred.

I get about 60fps without shadows, 20fps with. Geforcefx 5200 and an amd64 2800+ (this was in the version you originally posted).
16  Discussions / Miscellaneous Topics / Re: I've been accused of something horrendous on: 2005-10-17 08:25:32
yes.
17  Java Game APIs & Engines / JOGL Development / Re: newb - how to colorize selected vertexes on: 2005-10-17 03:05:44
try the tutorials at nehe: http://www.nehe.gamedev.net or you can find the 'red book' for free online (from opengl.org I think, but just search google).

I'm not sure what you mean when you say 'recreate the whole structure', but yes you will have to go through that loop you've shown in psuedocode again if the color changes. If the program is interactive than this should be happening > 20 times per second anyway, or maybe I misunderstand. One other thing, you won't be able to use the return value of a single method call to change the color. Once again I'm not exactly sure what your trying to do, but for example if you want the red component to change depending on the X value and Z maps to blue and maybe Y maps to green or something, then you could change your code to look like this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
 // incomplete pseudocode
glBegin(GL.GL_QUADS)
for ( x = 0 ... 200 ) {
for (y = 0 .. 175 {
  // one square
 glColor3f(getRedValue(x), getGreenValue(y), getBlueValue(z))
  glVertex3f (x,y,z)
  glVertex3f (x+1,y,z)
  glVertex3f( x+1,y+1,z)
  glVertex3f( x,y+1,z)
}
}
glEnd
18  Games Center / Archived Projects / Re: Feedback request: Pacifica on: 2005-10-17 02:50:38
Fun game and it looks great. Being able to use the arrow keys would be nice, unless the mouse is going to do something else too.. Only other thing is artwork stuff, so no complaints really Smiley  Everything I tried worked as it should.
19  Java Game APIs & Engines / JOGL Development / Re: Culling Scene Geometry for Rendering on: 2005-10-14 05:58:40
SeskaPeel> Maybe you are confusing lines of code and operations.

I think he is basically right... or else you will have to redefine what you mean by operations. As far as the computer is concerned, the dot product itself is hardly a single operation, its 3 multiplications and 2 additions. Also, the if statement is not without cost and should not be ignored. The compare itself is equivalent to a subtraction, but there are reason why just having the if there can slow stuff down (branch penalties). Also, maybe I'm misunderstanding something in the code shown, but it looks like that will only loop through once ever since you are returning in the if and the in the else, so whats the point of the loop?
20  Games Center / Archived Projects / MD3 loader on: 2005-10-12 00:18:38
I've completed (I think) an md3 loader that will be part of a set of loaders, that I may or may not get around to writing Smiley I've written a generic api for dealing with 3d models, with the idea in mind that I could extend the api with a set of classes for each specific loader. The application then just uses generic 3d model objects and has no knowledge of what format the model was originally in. I will make the api open source when it is _complete_, but I was hoping I could get some feedback on the api and make some final changes before releasing it. I'll give an example of how the api is used to load a couple differerent md3 formats. Please let me know if you think it sounds awkward to use or if it wouldn't integrate well with other code for some reason.

On md3 formats: If you look for md3 models on the net, you are likely to come across a few different formats that a loader would need to deal with in different ways. The first format comes from the game Quake III, it consists of .skin files, an animation.cfg file, and three .md3 files making up the legs, head, and torso of the model (titled: upper.md3, lower.md3, and head.md3). Another format could be a mix of these pieces. For example the model parts may not follow the quake naming scheme and an animation.cfg or skin files may or may not be present. Another format could be a single md3 with a single texture that should be used with it, my guess is you'll come across these if the md3 has been converted from another format.

For these different formats I've provided several unique load methods to deal with them, they are as follows:

ModelPattern[] loadSkinnedModel(String modelDirectory, String[] modelPartNames, String[] skinNames, boolean useAnimConfig)
ModelPattern[] loadTexturedModel(String modelDirectory, String[] modelPartNames, String textureDirectory, String[] textureNames, boolean useAnimConfig)
ModelPattern[] loadSkinnedModel(String modelPath, String skinName, boolean useAnimConfig)
ModelPattern[] loadTexturedModel(String modelPath, String texturePath, boolean useAnimConfig)
ModelPattern[] loadQuakeModel(String modelDirectory)

loadSkinnedModel assumes the model uses some .skin files that are in the same directory as the model, it may or may not use an animation config file.
loadTexturedModel specifies the textures directly instead of through a .skin file. When you pass in an array of model parts and an array of texture names, the model piece and texture with the same index will be used together.
loadQuakeModel assumes you are pointing it to a directory that is set up similar fashion to one of the player directories in quake III. The directory should contain an upper.md3, lower.md3, head.md3, upper_default.skin, lower_default.skin, head_default.skin, and an animation.cfg file.

To construct an MD3Loader object, you need to pass in an object created from a class that implements the TextureLoader interface, which looks like this atm(it could change...):

public int getTexture(String relPath,
                          int filter,
                          int wrapStyle,
                          int destPixelFormat);

here is a simple example of loading a skinned model without animation (its the railgun model from quake III):
1  
2  
3  
        ModelPattern[] weaponModel = modelLoader.loadSkinnedModel("models/weapons/railgun/railgun.md3",       "railgun_default.skin", false);
        ModelPattern weaponPattern = weaponModel[0];
        ModelInstance weapon = weaponPattern.getModelInstance();


here is a more complex example of loading an md3 that was converted from mdx (warcraft 3 format), it doesn't use skin files or an animation config file:
1  
2  
3  
4  
5  
6  
7  
8  
        ModelPattern[] wcModelParts = modelLoader.loadTexturedModel("models/wc3/orc/orc_stand.md3", "models/wc3/orc/orc.tga", false);
        wcModelPattern = (AnimatedModelPattern)wcModelParts[0];
        wcModelPattern.calcVertexNormals();
        wcModel = (AnimatedModelInstance)wcModelPattern.getModelInstance();
        Animation[] wcAnimations = new Animation[]{new Animation(0, wcModelPattern.getNumFrames()-1, 22, wcModelPattern.getNumFrames())};
        String[] wcAnimationNames = new String[]{"WALK"};
        wcController = new AnimationController(wcModel, wcAnimations, wcAnimationNames);
        wcController.playAnimation(wcAnimationNames[0], true);


The last example shows how you would load in a quake III model. In this example I'm going to use some convenience classes from the md3 loader package, so I'm sorta breaking the rule of only using the generic 3d model classes. This isn't necessary and I could just use classes from the generic api (the convenience classes put them together for you), but this makes it so much more convenient if you know that you are using a multi-part md3 with an animation.cfg file.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
        ModelPattern[] modelParts = modelLoader.loadQuakeModel("models/players/sarge"); 
        quakeModelPattern = new MD3ModelGroupPattern((MD3Model[])modelParts);
        quakeModel = quakeModelPattern.getModelGroupInstance();

        legsController = quakeModel.getLegsController();
        torsoController = quakeModel.getTorsoController();
        legAnimations = quakeModel.getLegAnimationNames();
        torsoAnimations = quakeModel.getTorsoAnimationNames();

        torsoController.addAnimationListener(this);
        torsoController.playAnimation(torsoAnimations[0], true);        

        quakeModel.setWeapon((MD3ModelInstance)weapon);

This saves you from having to create a ModelGroup and add ModelGroupNodes and simplifies the AnimationController retrieval process, which looks like this (whenever you've used an animation.cfg that is):
1  
AnimationController legsController = legsPattern.createAnimationController(legsInstance);


Ok, one last piece to complete this quasi-tutorial: Once you've created these objects, there are two things you have to do to use them. The first is updating the animation controller (if the model is supposed to be animated). To do this you just need to call update on the controller and pass in the time passed in seconds since the last frame. The second part is rendering the model. If you are using a ModelGroup or just ModelInstances, you have the option of using the render() method which will render the model in immediate mode, or you can get an array of vertices/normals/tex coords from each model piece and do the rendering yourself. If you are using a ModelGroup (MD3ModelGroupInstance is a subclass of this), then you will need to call transformGroup() before rendering and reset() after. Here is the simple example, using the pre-written rendering method (immediate mode == slow):
1  
2  
3  
            model.transformGroup();
            model.render();
            model.reset();


here is a demo: http://www.cyntaks.com/projects/md3loader/webstart/md3loader.jnlp
Controls:
Left: play previous leg animation
Right: play next leg animation
Up: replay current leg animation
A: play previous torso animation
D: play next torso animation
O: uses the warcraft model in place of the railgun (quite funny)
T: toggles texturing
W: toggles wireframe
L: toggles lighting
R: toggles rotating

Let me know what you think of the demo/api and hopefully I can make changes and finish it to release the source soon.

21  Java Game APIs & Engines / Java 2D / Re: Best possible FPS achieved? on: 2005-10-11 12:51:59
JayTe, lwjgl works well on the big three: windows, mac, and linux. I personally haven't tested on any other OSs. I developed my current lwjgl app on windows xp and tested on mac, it worked fine without changing a single line of code. Haven't tested that particular app on linux, but you get the point Smiley
22  Java Game APIs & Engines / Java 2D / Re: Best possible FPS achieved? on: 2005-10-11 12:46:51
dunno if its true if the rect is 1x1, maybe someone else can answers that.
23  Java Game APIs & Engines / Java 2D / Re: Best possible FPS achieved? on: 2005-10-11 03:21:12
dunno about performance comparisons, I've never tried a similar benchmark.

For particles you will want to use a small graphics, not colored pixels, drawing lines and filling rectangles is quite a bit slower than drawing an image (how much faster will depend on the type of image you've created). Transparency you can do, bitmask transparency that is (1-bit). If you use 'translucent' images, its going to be damn slow. You won't be able to create effects that are too convincing with only bitmask transparency because a lot of effects rely on the the particles blending together, your best off animating a spritesheet of the effect if you don't have hardware accelerated blending.

Here is a somewhat limited example of what you can do with particle effects in java2d: http://www.cyntaks.com/projects/old_particle-effects.jar  It just uses bitmask transparency with the images and you can compare the performance of rendering ovals vs. images (filling rectangles would be nearly as slow I'd guess). Please note that this was written without knowledge of how to achieve good performance in j2d and as such it probably doesn't perform as well as it could/should Tongue
24  Game Development / Shared Code / Re: 2D & 3D Spline (think smooth curve through n points) function on: 2005-09-24 08:58:28
cool, thanks  Grin
25  Game Development / Shared Code / Re: 2D & 3D Spline (think smooth curve through n points) function on: 2005-09-24 00:53:18
sounds good, but your link doesn't work Smiley
26  Discussions / General Discussions / Re: Why makes games in Java ? on: 2005-09-23 17:56:40
err the ps3 is using OpenGL ES? isn't that opengl for mobile devices? Also, even if there was a wrapper for opengl es 2.0, how would that solve the problem of actually getting a jvm on the ps3... seems like it would just solve yet another problem (using the ps3's rendering system) if the ps3 already had a jvm.
27  Discussions / General Discussions / Re: Is ODE good for games ? on: 2005-09-23 17:39:22
I'd be interested in using this project Smiley
The less native code the better, it would be awesome if we had a good pure java physics engine.
28  Discussions / Miscellaneous Topics / Re: XBox 360 on: 2005-09-18 04:34:58
my latest console is a dreamcast and I only got that when the price was down to $50 Smiley I think I might invest in a console this time around since its been so long. So far I'm thinking the ps3 sounds nice, I liked ps1 titles a lot and it sounded like the ps2 had many good titles. I don't want to support microsoft, so if theres no real reason to get an x-box I won't. The nintendo's controller sounds interesting since it has motion sensors. I'd consider getting a new nintendo if there are some cool sword fighting games or something that works well with their motion detector controllers.
29  Java Game APIs & Engines / Java 2D / Re: minimizing image bit depth and resolution for better performance? on: 2005-09-06 10:06:23
not everything supported by opengl is supported by the opengl pipeline.
30  Game Development / Newbie & Debugging Questions / Re: Two really stupid questions.. on: 2005-09-05 20:17:08
I think you can only use vsync in fullscreen exclusive mode with swing, seems like it was enabled when I had the ogl pipeline enabled though... Also, will using a redraw rate less than the monitors refresh rate really solve the problem? Certainly the problem would be less, but you could get tearing at any refresh rate just as long as the screen contents is being changed in the middle of a refresh, right?
Pages: [1] 2 3 ... 13
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (75 views)
2014-04-15 18:08:23

BurntPizza (68 views)
2014-04-15 03:46:01

UprightPath (80 views)
2014-04-14 17:39:50

UprightPath (66 views)
2014-04-14 17:35:47

Porlus (81 views)
2014-04-14 15:48:38

tom_mai78101 (105 views)
2014-04-10 04:04:31

BurntPizza (165 views)
2014-04-08 23:06:04

tom_mai78101 (261 views)
2014-04-05 13:34:39

trollwarrior1 (210 views)
2014-04-04 12:06:45

CJLetsGame (220 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!