Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
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
1  Java Game APIs & Engines / JOGL Development / Re: display lists and texture size: unexpectedly s on: 2005-05-26 11:57:59
I would recommend using vertex arrays or vertex buffer objects regardless as display lists can be hard to manage and vertex arrays support dynamic geometry.

Why this recommendation?

Displaylists are faster then buffers since the data is stored on the video card, and not re-sent on every frame.

A buffer is faster then sending each triangle via several OpenGL call, but cards which don't support display lists most likely aren't fast enough that buffers would make much of a difference.

Here is a question, which is off topic of textures:

What is the performance hit of the act of compiling a display list. Would it make sense to compile objects when they enter the view frustrum, and free the compiled list when the objects leave the frustrum. Only to have to re-compile them again later.

2  Java Game APIs & Engines / JOGL Development / Re: Proper documentation on: 2005-04-28 17:25:33

I want to see OpenGL documentation as part of the JOGL JavaDoc API.

Nothing more frustrating then watching the popups in NetBeans say "GL.glSomeMethod( int, int, int )" and you have no idea what the three parameters are.

I was going to write a Java program which would strip the OpenGL documentation from, and insert it into the JOGL as JavaDocs for each method.

Would anyone care if I did this?
3  Java Game APIs & Engines / JOGL Development / Re: Animator.stop doesn't block on AWT thread?? Wh on: 2005-04-22 12:50:05
Hi Ken,

Thanks once again for providing clear and understandable answers. Smiley

I think the problem is we're using the animator class out of context, and will write a new one. Which will leave the thread running, but give us the ability to pause the while loop that calls display.

Since calling start and stop causes the thread to be destroyed, and created. This is clearly not the correct solution.

If would make a nice feature for JOGL if the animator had a pause() method.
4  Java Game APIs & Engines / JOGL Development / Animator.stop doesn't block on AWT thread?? Why? on: 2005-04-20 15:58:31

The JavaDoc for JOGL says that Animation.stop will perform blocking until the animator is finished.

Um.. no it doesn't.

The animator.stop method returns if the current thread is the dispatch thread from AWT.

Look at the following case:


The second call will cause a JOGL exception saying that the animator is already running. Except, it won't be running for long. Cause the pending stop is still going to happen.

So in my application we stop the animator, clear the 3D scene, load some data from a file, and then call start. Except it doesn't start up again? Think's it's still running, but it's going to stop.

So I'm unable to start it again.
5  Java Game APIs & Engines / JOGL Development / Re: Soft shadows in StarWars Republic Commando on: 2005-04-19 13:53:38
Well, I had to rent it to try it  Grin

They are clearly using shadow maps, and the sample bias is giving the effect of soft edges.

When your playing the game you have a squad of troopers, and each trooper casts a shadow.

It appears that part of the level information contains the location of where shadows will come from. For example, one room may come from the corner, while the hall way connecting the room has it from above. This sometimes looks good, while other times it doesn't match the levels lighting.

For each trooper they render a small shadow map, and only use this map overtop of the background (i.e. the floors and walls).

So if other animated objects (i.e. bad guys) walk between the trooper and the light source. Then the shadows don't appear on them. The shadows are also not self-shadowing.

They also gave the shadows on the floors a fall off that blends them into the background. This looks really nice, and helps prevent the shadows from contrasting with the levels lighting.

Still, they get very good frame rate performance, and in the context of a video game people don't notice the small errors.

Except for one part when the shadows appear on the wall, with the feet of the troopers about 2 feet off the ground. OOPS!

6  Java Game APIs & Engines / JOGL Development / Re: Soft shadows in StarWars Republic Commando on: 2005-04-15 22:00:01
LOL!  Grin
7  Java Game APIs & Engines / JOGL Development / Soft shadows in StarWars Republic Commando on: 2005-04-15 19:30:52
In the new XBox game "StarWars Republic Commando" I noticed that some of the screen shots contain soft shadows.

Here are some pics;

Has anyone played this game, and can they tell me if these shadows are self-shadowing?

How did they do this? And get real-time performance?

Open for discussion! Smiley
8  Java Game APIs & Engines / JOGL Development / Re: glVertex2d EXCEPTION_ACCESS_VIOLATION on: 2005-04-15 16:57:47
What are you debugging with?
9  Java Game APIs & Engines / JOGL Development / Re: Java 5.0 experiences? on: 2005-04-15 12:23:14
If you are going to develop JOGL for Java 5 then I'd recommend you wait. You can not run Java 5 applications on the Mac. There is only support for JDK 1.4.2, and I don't know of a timeline for when Apple will come out with support for Java 5.
10  Game Development / Game Play & Game Design / Re: What makes a game ADDICTING? on: 2005-04-14 23:36:12
You asked the question of how to create addictive behavior in players, and then talk about difficulty in game play or level design. When you increase or decrease difficulty of game play you are affecting the players sense of goal achievement. For example; You may have a game designed were a player must reach the end of a maze, and as they approach the end of the maze an increase in traps makes this goal more difficult.

Creating realistic and obtainable goals for the player is a key to giving them a sense of purpose for playing the game. Meanwhile, creating difficulty in the game directly affects the player’s motivation to continue playing. People like to work towards realistic but challenging goals in life, and in play. If the goals in the game are too easy, then the player will loose interest, and if those goals are impossible then the player will quit. So a challenging and realistic goal is the key to motivating a player to continue playing.

To make a video game ADDICTIVE one should try the laws of operant condition from psychology. You should create a pairing of a conditioned stimulus with an unconditioned response.

For example; when you play on-line Poker you have an unconditioned response of an increased heart rate, and emotional arousal with the presentation of a reward (i.e. the pot of money). At the time that the player wins the hand the video game can present an auditory and visual queue that marks a conditioned stimulus. Now as the player plays Poker they develop a conditioned response of excitement when ever similar auditory or visual queues are presented.

So, to create an affective and addictive video game the use of auditory/visual stimulus is very important. You should present a stimulus prior to the presentation of a reward. For example; you could play same theme music just before a every level boss. You could flash eye popping large text on the screen when the player picks up a power up or scores points and this will help present to the players that a reward has been given for their efforts to play the game.

Pairing this conditioned stimulus with rewards in the game is the key to making it a successfully addictive video game. The better you can pair an unconditioned response with a conditioned stimulus will result in a stronger addiction for the player.
11  Java Game APIs & Engines / JOGL Development / Re: displayLists outside of init method? on: 2005-04-14 19:02:02
You have to destroy the old display list first before you can reuse the reference number for that list.
12  Java Game APIs & Engines / JOGL Development / Re: Render to texture/clouds on: 2005-04-14 14:54:29
How thick and big is this cloud of smoke?

If it's really thick, and big then you could just enable OpenGL fog while your close to the source of smoke.

The fog parameters could be a function of the camera's eye from the source of smoke.

Sort of a transition into the cloud?

Fog may work best, because if the person is walking they will be able to see the ground. But just for a few feet.
13  Java Game APIs & Engines / JOGL Development / Re: Render to texture/clouds on: 2005-04-14 14:37:00
I think your talking about creating billboards by rendering an object to a texture, and then replacing the far away high mesh object with a simple billboard.

This is often done when visualizing a large city. You render the far away buildings to a texture, and replace them with a billboard. As the person drives down a road and gets closer to the billboards, then they are replaced with meshs, and new far away buildings are introduced to the scene.

Clouds are normally done with a sky box. You render the sky box as a background in your scene, and it gives the impression of clouds in the sky.

If you want animated clouds, then you add a textured cloud plane that has drifting clouds (i.e. animate the UV coords). This is blended with the sky box.
14  Java Game APIs & Engines / JOGL Development / Re: problems around GL_POINT_SPRITE_ARB on: 2005-04-14 12:30:10
StarBuck would say "Frack!".

Can you post the entire source code?

Also, are you running an ATI video card?
15  Java Game APIs & Engines / JOGL Development / Re: GL_POINT_SPRITE_ARB, but how? on: 2005-04-13 15:06:25
    public static int loadTGAImage( String path, boolean clamping ){
        int[] tmp = new int[1];
        gl.glGenTextures( 1, tmp );
        ExtendedTGATextureLoader loader = new ExtendedTGATextureLoader(gl, glu);
        loader.readTextureFromFile( path ); // tga loading
            gl.glBindTexture( GL.GL_TEXTURE_2D, tmp[0] );
            gl.glTexParameteri( GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
            if( clamping ){
                gl.glTexParameteri( GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP_TO_EDGE);
                gl.glTexParameteri( GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP_TO_EDGE);
                getCompressedType( loader.getGLFormat() ),
                loader.getImageWidth(), loader.getImageHeight(),
                loader.getTexture() );

        // check if the texture has been compressed
        int wasCompressed[] = new int[1];
        gl.glGetTexLevelParameteriv( GL.GL_TEXTURE_2D,
                                       wasCompressed );

        // Query for the compressed internal format */
        glInternalFormat = new int[1]; GL.GL_TEXTURE_2D,
                                       glInternalFormat );

        // check the amount of memory used by the compressed texture
        glCompressedSize = new int[1]; GL.GL_TEXTURE_2D,
                                       glCompressedSize );

        System.out.println("Texture Compression: ");
        System.out.println("     Was Compressed: " + wasCompressed[0] );
        System.out.println("             Before: " + (texture.width * texture.height * 4) + " After: " + glCompressedSize[0] );
        System.out.println("    Internal Format:" + glInternalFormat[0] );
        } else {
            System.out.println("Error loading tga image" ); System.exit(-1);

        return tmp[0];

What output do you get when you run this modified version?

I think the problem is the compressed format used when calling gluBuild2DMipMaps.

Try a test hard coding the values to GL.GL_COMPRESSED_RGBA_ARB, and GL.GL_RGBA.

That is if the alpha channel was loaded.

Try this as well, given the Width and Height of the texture, multiple that by 4. Does the result of this match the size of the buffer returned by loader.getTexture()?
16  Java Game APIs & Engines / JOGL Development / Re: using drag and drop on: 2005-04-13 12:50:33
Are you dragging and dropping from one window to another window, or are you dragging inside just one window?

The two methods are very different.

Read up in the JDK documentation the following classes:

For drag and drop to another window read about this:

For drag and drop inside the same window read about this:

17  Java Game APIs & Engines / JOGL Development / Re: GL_POINT_SPRITE_ARB, but how? on: 2005-04-13 11:55:12
Did you turn on textures?

gl.glEnable( GL.GL_TEXTURE_2D );

Did you create a texture ID?

gl.glGenTextures( 1, particlePic );

Did you load it to OpenGL

gl.glTexImage2D( ... );

18  Java Game APIs & Engines / JOGL Development / Re: Soft flat floor reflections? on: 2005-04-11 00:25:05
Would is be faster to render to a texture, and do the blur as a GLSL shader?
19  Java Game APIs & Engines / JOGL Development / Re: Soft flat floor reflections? on: 2005-04-10 18:00:21
Ok, I asked the question to quickly. I found the following OpenGL commands.


Anyone can tell me why I shouldn't use these methods to read the frame buffer, apply a blur, and then draw it back.

Is this going to be really slow?

Is there another way which is a lot faster?
20  Java Game APIs & Engines / JOGL Development / Soft flat floor reflections? on: 2005-04-10 17:51:06

My 3D engine currently supports flat mirror reflections. Such as floors or a mirror on the wall.

I would like to generate soft reflections (or blurry) for the floor.

Anyone have ideas on how to acheive this effect?

Is it possible to apply a blur filter to the current image buffer on the video card?
21  Java Game APIs & Engines / JOGL Development / Glass like in HalfLife 2 on: 2005-04-10 17:46:17

I'm looking for information on how glass wall effects are done in video games that make the glass look bumpy or textured.

I've seen special effects done with glass in both HalfLife 2, and Rainbow Six on the XBox.

In both cases there is a glass wall which you the player can walk up to, and see threw. You can see other characters behind the glass wall in great detail, except that the glass is bumpy like glass bricks or an office door.

How is this effect done?

From what I can tell. It sure does look like they render the scene, and then the glass is a second pass. They shader appears to be sampling the image buffer from the first pass.

Is it possible to sample the buffer from a shader? I thought this couldn't be done.

Anyone know how to do this, or know what I'm talking about?
22  Java Game APIs & Engines / JOGL Development / Re: Shadow Volume demo doesn't work for flat plane on: 2005-04-07 21:46:14
Thanks Spasi!

That document was perfect. I've made the changes to support the counting of the winding order of meshes, and now everything is working.

Still, I am not having luck doing the JOGL demo method of z test. But, if I use the zpass method in the NeHe tutorial the shadows are perfect.

I can't position the camera inside a shadow volume, but I should be able to fix that bug tomorrow.

Dude, thanks so much! How can I re-pay??
23  Java Game APIs & Engines / JOGL Development / Re: Shadow Volume demo doesn't work for flat plane on: 2005-04-07 20:06:23
Thanks Spasi!

Some easy reading for tonight.

I had another thought as well.

What if I kept additional copies of the meshes in memory to use as the shadow source, and when I load the models if they contain holes. I could try to cap them, and make the model solid.

Anyone see any reasons why this would be a bad idea?
24  Java Game APIs & Engines / JOGL Development / Re: Shadow Volume demo doesn't work for flat plane on: 2005-04-07 18:25:40
There is "nice to have" and then "reality".

Our 3D product contains over 10,000 models, and is already deployed across several customers.

So I'm stuck with the library of models. I am writting a new 3D engine to replace an older out dated one.

Also, if we get a contract from a new customer for example: ABC Toys and they provide 5,000 models in DXF format. Then we have to do the best with that we have. I can't go to the customer and say "our shadows don't work because your models aren't 2-manifold".

Then, on the other hand I have a boss who says "We need better shadows our scenes are full of artifacts".

What am I going to do???

I need a strong shadow solution for non-2-manifold models.

I will have to use the orginal zpass approach to shadow volumes, and see if I can figure out if the camera is inside the volume of an object, and disable the shadows for that object. Still the NeHe tutorial example introduces a few other problems.
25  Java Game APIs & Engines / JOGL Development / Re: Shadow Volume demo doesn't work for flat plane on: 2005-04-07 14:34:03
Thank you for your reply.

I have only found examples of shadow mapping techniques for spot lights, and my engine requires most of the shadows to come from omni lights.

I'm trying to shadow mostly room interiors such as kitchens, living rooms, and above views of houses.

So I need a solution which works well with light sources in different rooms.

Shadow maps don't work on all video cards, so I have to have a volume back up.

Does anyone have an example of shadow maps for Omni lights??

Please! That would help out a ton!
26  Java Game APIs & Engines / JOGL Development / Shadow Volume demo doesn't work for flat planes. on: 2005-04-06 18:14:38

I have noticed (with a little pain) that the shadow volume demo that comes with JOGL doesn't work with flat planes, or meshs with deleted triangles making holes in them.

A mesh could be said to have a hole if it has a face with an edge that is not shared by another face.

The demo appears to only work with objects that are solid objects, where as a plane of two triangles doesn't cast a correct shadow.

I think this is related to the methods for drawing the end caps of the shadow volume. Since a flat plane will only have one side facing the light source, then it doesn't have both caps on the shadow volume.

After doing all the work of including the shadow volume rendering in my engine. I find that I can't use it.

I'm thinking I will have to use NeHe's shadow solution, which doesn't work if the camera moves inside the shadow volume. Where as the JOGL demo works in this case.

Can anyone confirm my problem who understands what I might be talking about?

27  Java Game APIs & Engines / JOGL Development / Why glVertex4f for infinite Shadow Volumes? on: 2005-04-05 16:31:14

I'm working on an infinite shadow volumes approach for my 3D engine, and I've been using the as a guide. This is the shadow demo included with JOGL.

What I am confused about is how to use glVertex4f?

When the demo renders the edge silhouettes, and triangles for the caps the QUADS and TRIANGLES are defined using glVertex4f.

So for each point there is a XYZW, and I'm confused as to why W is sometimes 1 or 0

What effect does the W parameter have on glVertex4f in the context of triangles and quads, and why does the demo brake if I change it to glVertex3f?

I am guessing that this W can effect the normal of the triangle or quad? I think??

The OpenGL documentation explains Triangles and Vertex4, but not in the context of using them together.
28  Java Game APIs & Engines / JOGL Development / debug build of JOGL on: 2005-03-30 15:32:13

I'd like to make a request. Can you please include debug build versions of the JAR files for JOGL as part of the standard releases. So that we don't have to recompile the libraries.

I know that it runs slower, but I'd like the option of tracing into the JOGL calls and see the varaibles, but I don't want to have to recreate the build envoriment for JOGL.
29  Java Game APIs & Engines / JOGL Development / Re: Presenting: The JOGL demo box! on: 2005-03-23 13:38:34
ops, that might have been my fault.

Our project uses 1.5 and I copied the webstart file from there.

sorry about that.
30  Java Game APIs & Engines / JOGL Development / Re: Presenting: The JOGL demo box! on: 2005-03-22 12:45:31
Hi ozak buddy,

Nothing I love more then someone who gives to the public community in the form of help or source code.

If I can help I'll try, but I'm not very good at the webstart thing.

Here is a template that might get it working. Maybe this JNLP file will or someone else can mod it to work.

<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for JOGLBox Demo -->
<jnlp spec="1.0" codebase="">

    <title>JOGLBox Demo By Ozak</title>
    <vendor>Ozak Technology, Inc.</vendor>
    <homepage href=""/>
    <description>JOGLBox Demo By Ozak</description>
    <description kind="short">A demo of the capabilities of the JOGL.</description>


    <j2se version="1.5+" java-vm-args="-esa -Xnoclassgc"/>
    <property name="sun.java2d.noddraw" value="true"/>

    <jar href="JOGLBox.jar" main="true"/>
    <extension name="jogl" href="" />

  <application-desc main-class="????????I don't know????">

You will need to sign your Jar files.
Pages: [1] 2 3
DesertCoockie (20 views)
2018-05-13 18:23:11

nelsongames (68 views)
2018-04-24 18:15:36

nelsongames (65 views)
2018-04-24 18:14:32

ivj94 (749 views)
2018-03-24 14:47:39

ivj94 (79 views)
2018-03-24 14:46:31

ivj94 (595 views)
2018-03-24 14:43:53

Solater (95 views)
2018-03-17 05:04:08

nelsongames (168 views)
2018-03-05 17:56:34

Gornova (378 views)
2018-03-02 22:15:33

buddyBro (1038 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!