Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (500)
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 4
1  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Benchmarks for 3D Scene Graph APIs on: 2012-04-15 21:40:21
The reason for the 21 second spike in the DynamicGeometry benchmark is because its hitting GC on the leaked VertexBuffers (which are generated when you do clearBuffer/setBuffer on the Mesh). GC'ing VertexBuffers deletes them from OpenGL, so that spike was probably a million VBs getting deleted from the driver ...

In any case, the latest version of jME3 has a limit placed upon number of GL objects deleted per frame at 100, which significantly reduces the spikes.
An additional fix can be implemented on the benchmark itself, simply by removing the "clearBuffer" statement from Jme3Sphere, that makes sure the buffer will be updated, rather than deleted and then recreated.
The final fix is here, in the Jme3Sphere class, which ensures that no VBs are created at runtime, and reduces the number of FBs created. In addition, it sets the "Stream" flag on the buffers which may help drivers organize memory better.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
// In Jme3Sphere.java:

protected void updateBuffer(Mesh mesh, Type type, float[] newData) {
      VertexBuffer vb = mesh.getBuffer(type);
      FloatBuffer vbData;
      if (vb == null) {
          vbData = BufferUtils.createFloatBuffer(newData.length);
          vb = new VertexBuffer(type);
          vb.setupData(Usage.Stream, 3, Format.Float, vbData);
          mesh.setBuffer(vb);
      } else {
          vbData = (FloatBuffer) vb.getData();
          vbData = BufferUtils.ensureLargeEnough(vbData, newData.length);
          vb.updateData(vbData);
      }
      vbData.clear();
      vbData.put(newData);
      vbData.flip();
  }
 
    protected void setData(float[] vertices, float[] normals, boolean useNormals) {
        Mesh mesh;
        if (shape != null) {
            mesh = shape.getMesh();
        } else {
            mesh = new Mesh();
            mesh.setMode(Mesh.Mode.TriangleStrip);
            shape = new Geometry();
            shape.setMesh(mesh);
        }

        updateBuffer(mesh, Type.Position, vertices);
        if (useNormals) {
            updateBuffer(mesh, Type.Normal, normals);
        }

        shape.updateModelBound();
    }


2  Java Game APIs & Engines / OpenGL Development / Re: LWJGL enabling point sprites crashing on: 2011-11-11 06:55:44
I believe there's a bug with certain versions of the ATI drivers that make point sprite crash when used to render lines or triangle meshes (e.g. non-point).
The solution is to enable point sprite only when rendering point meshes and disable it afterwards.
Reference:
http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/lwjgl-ogl/com/jme3/renderer/lwjgl/LwjglRenderer.java#2494
3  Games Center / Showcase / Re: ChessClockPro.com - Free Online Chess Clock (Pulpcore Applet) on: 2011-04-09 23:17:24
This is really strange .. It doesn't seem to work for me.
I am using chrome so when I try to run an applet (even pulpcore) it will show the little yellow bar asking me if I want to run it, but for your program it doesn't show anything, the little "loading" animation just keeps playing.
4  Discussions / General Discussions / Re: Early reports on JavaFX 2 are in. on: 2011-02-15 05:29:22
I hope JavaFX 2 works like Flash, but you can still run 3D on it Smiley
5  Discussions / General Discussions / Re: Hi! Is this real life? on: 2011-02-12 01:41:15
Capital! now if only i could find some good jME tutorials
No problem!
Just head straight for the Beginner Tutorials and start learning!
6  Discussions / General Discussions / Re: Hi! Is this real life? on: 2011-02-11 03:04:23
I have heard that JME has been a bit of a head ache for some of the people that use it. I have only heard good things about Ardor3D though. But I dont use the scene graphs myself, so hopefully other people will be able to help you more on the topic.
When did you hear those rumors? Was it before 2009?
Because since that time, jME is under very active development.
If any people are having "headaches", they are free to come and complain and it will be fixed Smiley
7  Discussions / General Discussions / Re: WebM decoder in Flash, yes someone was bold enough to try it on: 2011-01-14 18:22:43
Complex codecs like VP8 or H264 probably won't run in Java (or ActionScript) very well, since optimizations like SSE cannot be used.
Still less complex codecs like Theora or MPEG4, if done correctly and multithreaded, can be decoded in Java in half-HD resolution Smiley
8  Discussions / General Discussions / Re: Scene Graphs: The good, the bad and the ugly on: 2011-01-08 22:24:35
As an author of a scene graph based game engine, I think I might have something to say on the subject...

What most people seem to be saying here and everywhere else is that trying to make all your systems fit into the scene graph paradigm is a bad solution.
So instead you use several data structures to handle various tasks. If you wish to use a spatial partitioning scheme, for example, the engine shouldn't enforce you to use the scene graph structure to do so.

The way jMonkeyEngine is designed, is somewhat similar to this idea. You have a scene graph, and it is used mostly for just rendering and arranging scene elements into groups by their spatial location. In other words you can create a house node and place props inside the house node by attaching them to it. The transform of the house will be propagated to the underlying nodes and so the props in the house will have their location relative to the house's origin.
All the props in the house and the house itself have their own "appearance", this "appearance" is only set on the leaf level, so it doesn't propagate like the transforms do. Any state change optimizations will occur later (explained below).

When the scene graph is rendered, the culling is done by going down the graph, if a branch is deemed not visible, then all its child nodes will not be visible either. The entire tree is then flattened into several buckets. The opaque bucket is the most commonly used one, and is sorted by material ID, to reduce state changes for shaders and textures.

If you wish to add a spatial partitioning scheme on top of this scene graph, you can make an octree work quite easily with it. If you want to add skeletal animation with a bone hierarchy in the scene graph, you can do that as well. Detecting broadphase collisions for physics will also work. The GUI framework can also take advantage of the tree structure with its containers and panels.
Yet none of those are done like this in jME.
A scene graph node has many properties, but none of the mentioned algorithms really need these properties, so instead we have more efficient trees to work with these features.
Physics broadphase collisions are handled with a DBVT structure in JBullet. Skeletal animation uses a bone tree that is better suited for bone-weight animation and generating appropriate matrices for transforms. An octree uses a very lightweight node structure that doesn't even need storing transform or bound information since those can be derived just by going down the tree.  And Nifty GUI (the GUI library used by jME) also has its own tree with appropriate properties that are used for GUI like alignment, width and height, and so on that are more efficient for such uses.

Hopefully this will shed some light on how a real scene graph engine functions..
9  Java Game APIs & Engines / OpenGL Development / Re: shader-based engines and transformations on: 2010-12-18 19:34:03
A shader-oriented engine, does not use the predefined OpenGL uniforms such as gl_ModelViewProjectionMatrix, or the glPushMatrix/PopMatrix calls.

Instead the matrices are composed by the engine before the object is rendered and then those matrices are available through custom-defined uniforms to the shader.
E.g, a basic vertex shader:
1  
2  
3  
4  
5  
6  
uniform mat4 g_WorldViewProjectionMatrix;
attribute vec3 inPosition;

void main(){
    gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0);
}
10  Games Center / Showcase / Re: Phantasy Blade on: 2010-11-15 05:34:20
Ignoring the current state of graphics and UI (which are bad). The game is so-so, the run-with-sword move is a bit weird since it never ends.
It would be more interesting if the AI was smarter and fought back.
If this is supposed to be an RPG, there should be things like inventory, items, gold, cities, NPCs, minimap, etc
Also I got to the end boss in the level and thats where it ended I guess.
11  Games Center / Archived Projects / Re: Gunslinger 2 - sci-fi action top down shooter on: 2010-11-15 05:15:17
Yeah the latest version has lots of those errors and it gets stuck in "Generating map"
12  Game Development / Newbie & Debugging Questions / Re: How to Use Fanatech Steering Wheel With LWJGL on: 2010-11-13 00:42:40
JInput supports DirectInput/DirectX, so it should work fine there. LWJGL just uses JInput internally so you can use either one of them to access the wheel.
13  Games Center / Showcase / Re: Phantasy Blade on: 2010-11-08 04:35:36
Right at the beginning there's an exception thrown:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
java.lang.NullPointerException
   at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source)
   at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
   at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
   at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
   at java.io.ObjectInputStream.<init>(Unknown Source)
   at Game1.readLevel(Game1.java:466)
   at Game1.update(Game1.java:435)
   at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:657)
   at org.newdawn.slick.AppGameContainer.gameLoop(AppGameContainer.java:408)
   at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:318)
   at Game1.main(Game1.java:924)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


Also the sprites and UI look a bit messy, I am not sure if its because of the exception or not:
14  Discussions / Miscellaneous Topics / Re: I shouldn't hae done that... on: 2010-11-02 14:53:08
I don't get it. Where's the punch line?
15  Java Game APIs & Engines / Android / Re: 3d (game) engine? on: 2010-10-30 22:43:09
Problem with Android is that doing skinning for bone animated models is very expensive. This is really an issue with the Delvik VM and since they introduced a JIT in Android 2.2 it might be less of an issue now. Still it stands for all devices with Android versions 2.1 and below.
If you really want to have bone animated models, you will have to do it natively (e.g manually in C++), or animate a single model at 10 fps.
Really the best solution is to just use vertex/mesh animation instead of bone animation.
16  Game Development / Newbie & Debugging Questions / Re: jMonkeyEngine or LWJGL? on: 2010-10-30 22:42:41
i really need some answers too! Like who is easier to work on? new to java btw hi! Wink
Which is easier to work on?  This sedan or these wheels, engine, and transmission?
See Eli Delventhal's post for more info  Cool
17  Game Development / Newbie & Debugging Questions / Re: Any Java libraries like packjpg? on: 2010-10-22 06:06:56
It is possible to have loss-less JPG in Java as well, if you disable the chroma subsampling and set quality to 100%, you should get a lossless compressed image.
18  Games Center / Showcase / Re: rotate breakout on: 2010-10-14 00:43:04
I get an error:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
Exception in thread "Thread-2" javax.media.opengl.GLException: java.lang.ArrayIndexOutOfBoundsException: 2
        at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271)
        at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:410)
        at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
        at com.sun.opengl.util.Animator.display(Animator.java:144)
        at com.sun.opengl.util.Animator$MainLoop.run(Animator.java:181)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
        at engine.polygonMesh.obj.ObjParser.loadObjFromFile(ObjParser.java:139)
        at engine.polygonMesh.obj.ObjParser.<init>(ObjParser.java:68)
        at engine.polygonMesh.obj.ObjFactory.createObjParser(ObjFactory.java:40)
        at engine.polygonMesh.obj.ObjLoader.loadObjParser(ObjLoader.java:32)
        at engine.polygonMesh.MeshFactory.createPolygonMeshs(MeshFactory.java:59)
        at engine.sceneGraph.NodeFactory.createPolygonMeshLeaf(NodeFactory.java:196)
        at engine.sceneGraph.NodeFactory.createPolygonMeshLeafColred(NodeFactory.java:172)
        at test.breakout.Breakout.construct(Breakout.java:180)
        at test.breakout.Breakout.access$100(Breakout.java:21)
        at test.breakout.Breakout$1.run(Breakout.java:126)
        at engine.universe.Universe.render(Universe.java:199)
        at engine.utility.engineusage.EngineForm.display(EngineForm.java:124)
        at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)
        at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:435)
        at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)
        at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:452)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

And then its just a black screen with title bar saying 1000 fps  Huh

Also I had to use the command-line version of java instead of double clicking, cause I got an error message saying "Could not find the main class. Program will now exit".
19  Java Game APIs & Engines / Java Sound & OpenAL / Re: Simple Lossy Audio? on: 2010-10-09 02:39:43
jME3 has a class that uses J-Ogg to decode an audio file, no streaming, no extra layers, etc. The result is an InputStream that gives you data in signed short format.
See here: http://code.google.com/p/jmonkeyengine/source/browse/branches/jme3/src/jogg/com/jme3/audio/plugins/OGGLoader.java
So far any file I threw at it worked. I use mostly aoTuV and oggenc2 for encoding, as they have the best compression and speed.
20  Games Center / Archived Projects / Re: scanline road engine test on: 2010-10-04 02:17:40
Doesn't work well on my machine!
The screen blinks rapidly with white color, I see the road and then I see whitescreen, thats happening like every 30 ms.
Windows 7 Home Premium 64 bit. Java 1.6 u21. ATI Radeon HD 5770.
21  Java Game APIs & Engines / OpenGL Development / Re: LWJGL now supports OpenCL on: 2010-09-29 03:18:54
That's kinda interesting.. I was also prototyping with this sort of thing. But I did it in the bytecode level, which, by virtue of being low-level, doesn't have some of the odd limitations of this API. (e.g the a[i++] = b[i++] thing for example)
I guess that in the future there would be workarounds for various Java features to be converted into OpenCL code that had the same effect but used different ways of doing it.
22  Game Development / Performance Tuning / Re: Fastest way to set every pixel? on: 2010-09-29 03:12:43
Probably just getting the pixels from the BufferedImage, modifying it, then drawing the image should be fastest.
Or you can go overboard and write a GPU shader that does this with OpenGL/OpenCL, it would be extremely fast but also hard to write.
23  Java Game APIs & Engines / OpenGL Development / Re: LWJGL now supports OpenCL on: 2010-09-28 01:38:17
Can't say I agree with you guys. Having OpenCL in LWJGL means one less DLL I have to bundle with my engine. It will also integrate neatly into the already existing OpenGL renderer with buffer sharing and all.
Also this having the LWJGL brand I can trust them to have a good and clean API that works.
24  Games Center / WIP games, tools & toy projects / Re: Net Dash (WIP) on: 2010-09-25 05:48:25
Uh ...

Connecting to 98.210.146.214 on port 15678
Couldn't connect to server.
java.net.UnknownHostException: 98.210.146.214

25  Java Game APIs & Engines / JOGL Development / Re: more than 8 lights in jogl on: 2010-09-25 02:59:18
Or you can just use a 3D engine and save yourself a lot of time.
jMonkeyEngine 3 has both shader lighting and shadow maps, as well as tons of other features.
26  Discussions / General Discussions / Re: Oracle sues Google over use of Java in Android on: 2010-09-03 03:42:04
The Big G is right. It needs to be like Windows or iOS - ruled with an iron fist.

Cas Smiley
Big G already do that. They have certification/compatibility program for Android, and if your device doesn't pass it, its officially not an Android device.
27  Games Center / Archived Projects / Re: Gunslinger 2 - sci-fi action top down shooter on: 2010-08-25 05:44:24
I was clicking around the inventory menu and then exited it, and an exception happened:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
   at borb.engine.game.Screen.mouseReleasedFinal(Screen.java:296)
   at borb.engine.game.GameApplication.mouseReleased(GameApplication.java:151)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)

Also another bug I noticed is when your weapons runs out of ammo it just keeps trying to reload and reload (the red/blue bar keeps filling) but it doesn't stop until you switch the weapon.

Other than that, good game Smiley I got to the 3rd level without dying
28  Java Game APIs & Engines / Tools Discussion / Re: EXE Creation (with LWJGL) on: 2010-08-15 18:33:03
If you want something simpler and that works on Mac, try Launch4j.
29  Discussions / General Discussions / Re: Open Pandora on: 2010-08-14 03:56:04
Here's a picture from the website:


Btw, since it runs OpenGL2 on Linux, that means LWJGL will work on it too? LWJGL doesn't require AWT, so it should work.
It would be very cool if we could make some Java SDK for it that was easy to use. Right now it mostly has just basic 2D games and emulators, it would be great to have some 3D games as well.
30  Discussions / General Discussions / Re: Open Pandora on: 2010-08-13 03:13:27
This pandora thing is pretty cool. I guess they don't provide a Java VM included? Is there some SDK? OpenGL support?
Pages: [1] 2 3 4
 

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 (50 views)
2014-04-15 18:08:23

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

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

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

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

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

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

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

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

CJLetsGame (208 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!