Show Posts
|
|
Pages: [1]
|
|
1
|
Java Game APIs & Engines / Java 3D / Implement a modal dialog with Java 3D
|
on: 2006-03-15 08:39:59
|
|
Hi~ I'm now developing a game and player can start game after cancelling a modal dialog. The modal dialog is implemented with platformGeometry and it can sucessfully interrupt any operation through thread.join(),but all event cannot work(press cancel button on modal dialog). Does anyone know how to solve this problem? thank~~
|
|
|
|
|
2
|
Java Game APIs & Engines / Java 3D / Re: How to sharp the Java 3D Directional Light
|
on: 2005-11-04 10:58:40
|
What are you trying to do with the light? The sharpness is not a concept that directional lights know about - it's a directional light, afterall. That means it's like an infinitely large light source covering the entire scene, and shining in the one direction. Spotlights have sharpness - that's the rate at which the edges drop off as the light beam moves away from the axis of the cone. Also, you may well be seeing the difference between ray tracing and realtime rendering.
Perhaps you are thinking about things like specular highlights or emissive colouring? It's really hard to know what you're trying to do without either some screen shots of the differences between the two, or what file you've generated from Max, which loader is being used etc etc.
UM... i mean the 3d objects is too shine when putting Java3D Directional Light in the scene I hope these objects can be rendered like 3d max model
|
|
|
|
|
3
|
Java Game APIs & Engines / Java 3D / How to sharp the Java 3D Directional Light
|
on: 2005-11-01 09:48:09
|
|
Hello~~ I am now developing a game project which need to have mind Directional light, but its Directional light seem to be too shine , I hope that the Directional light in my game look like the light generated from 3D Max,Can anyone know how to make it Shaper..thank
|
|
|
|
|
4
|
Discussions / General Discussions / How to auto download Java3D/JOGL through jnlp?
|
on: 2005-10-08 00:37:10
|
|
hello~~ I have developed 2 3d application games for a long time. Now, I hope to use "java web start" to package them and hope that Java3D/JOGL can be auto downloaded/installed while someone is downloading my game, but I dont know how to set the jnlp file so that Java3D/JOGL can be downloaded? thank~~
|
|
|
|
|
5
|
Java Game APIs & Engines / JOGL Development / JOGL API installing
|
on: 2005-05-04 18:20:17
|
|
Hi~ I am now developing a applet 3D game with jogl, and I hope that client can conveniently install jogl API. How to do that.. Actually, I also dont know how to make a jogl installation dialog with JNLP web start. what tag should I use in jnlp file. thank~~
|
|
|
|
|
6
|
Java Game APIs & Engines / JOGL Development / Re: Need help~add a texture on the plane
|
on: 2005-04-26 21:21:48
|
these code seem have problem~ System.out.println(texture); for (int y = 0; y < buff.getHeight(); y++){ for (int x = 0; x < buff.getWidth(); x++){ texture.put((byte) img[(y * buff.getWidth() + x) * 3]); texture.put((byte) img[(y * buff.getWidth() + x) * 3 + 1]); texture.put((byte) img[(y * buff.getWidth() + x) * 3 + 2]); } } |
cant run... um... why need *3
|
|
|
|
|
7
|
Java Game APIs & Engines / JOGL Development / Binding Texture exception~~
|
on: 2005-04-26 20:58:53
|
hi~ I now want to map a texture on the object with following code: private BufferedImage readPNGImage(String resourceName) { try { BufferedImage img = ImageIO.read(getClass().getClassLoader().getResourceAsStream(resourceName)); if (img == null) { throw new RuntimeException("Error reading resource " + resourceName); } return img; } catch (IOException e) { throw new RuntimeException(e); } }
private void makeRGBTexture(GL gl, GLU glu, BufferedImage img, int target, boolean mipmapped) { ByteBuffer dest = null; switch (img.getType()) { case BufferedImage.TYPE_3BYTE_BGR: case BufferedImage.TYPE_CUSTOM: { byte[] data = ((DataBufferByte) img.getRaster().getDataBuffer()).getData(); dest = ByteBuffer.allocateDirect(data.length); dest.order(ByteOrder.nativeOrder()); dest.put(data, 0, data.length); break; }
case BufferedImage.TYPE_INT_RGB: { int[] data = ((DataBufferInt) img.getRaster().getDataBuffer()).getData(); dest = ByteBuffer.allocateDirect(data.length * BufferUtils.SIZEOF_INT); dest.order(ByteOrder.nativeOrder()); dest.asIntBuffer().put(data, 0, data.length); break; }
default: throw new RuntimeException("Unsupported image type " + img.getType()); }
if (mipmapped) { glu.gluBuild2DMipmaps(target, GL.GL_RGB8, img.getWidth(), img.getHeight(), GL.GL_RGB, GL.GL_UNSIGNED_BYTE, dest); } else { gl.glTexImage2D(target, 0, GL.GL_RGB, img.getWidth(), img.getHeight(), 0, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, dest); } }but throw following exception java.lang.RuntimeException: Unsupported image type 13
at jogltest.Main.makeRGBTexture(Main.java:223)
at jogltest.Main.init(Main.java:50)
at net.java.games.jogl.impl.GLDrawableHelper.init(GLDrawableHelper.java:68)
at net.java.games.jogl.GLCanvas$InitAction.run(GLCanvas.java:187)
at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:144)
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:162)
at net.java.games.jogl.GLCanvas.reshape(GLCanvas.java:105)
at java.awt.Component.setBounds(Component.java:1664)
at java.awt.BorderLayout.layoutContainer(BorderLayout.java:691)
at java.awt.Container.layout(Container.java:1020)
at java.awt.Container.doLayout(Container.java:1010)
at java.awt.Container.validateTree(Container.java:1092)
at java.awt.Container.validateTree(Container.java:1099)
at java.awt.Container.validateTree(Container.java:1099)
at java.awt.Container.validateTree(Container.java:1099)
at java.awt.Container.validate(Container.java:1067)
at java.awt.Window.show(Window.java:461)
at jogltest.Applet1.jbInit(Applet1.java:41)
at jogltest.Applet1.init(Applet1.java:31)
at com.borland.jbuilder.runtime.applet.AppletTestbed.startApplet(Unknown Source)
at com.borland.jbuilder.runtime.applet.AppletTestbed.main(Unknown Source)Can someone help me to slve this problem..thank~~
|
|
|
|
|
13
|
Java Game APIs & Engines / Java 3D / How to enhance the game efficiency with Java3D
|
on: 2005-04-17 12:27:11
|
|
Hello~~ I have developed a first person Applet game with Java 3D and it contain 80 3d trees(.X file) ,a 128*128 size hill,7 buildings and a gun attach to view in the scene, but it seem to run slow when using transformGroup.setTransform(transform3D) running in the thread especiallly rotating the camera. So, I want to know how to improve the efficiency in such situation. Thank~~
|
|
|
|
|
14
|
Game Development / Performance Tuning / Which codes are more efficient?
|
on: 2005-04-12 06:15:23
|
|
1a) for(int i=0;i<100;i++){ if(a == 0 && a==1)//a is int System.out.println("abc"); } b) for(int i=0;i<100;i++){ if(a != 0 || a!=1)continue; System.out.println("abc"); }
2a) for(int i=0;i<100;i++){ System.out.println (this.getObject1().getObject2().getText()); } b) Object2 o2 = this.getObject1().getObject2(); for(int i=0;i<100;i++){ System.out.println(o2.getText()); }
3a) for(int i=0;i<100;i++){ if(str.equal("1")) System.out.println("str"); } b) for(int i=0;i<100;i++){ if(Integer.parseInt(str) == 1) System.out.println("str"); } c) for(int i=0;i<100;i++){ if(str.charAt(0) == '1') System.out.println("str"); }
|
|
|
|
|
15
|
Game Development / Networking & Multiplayer / What is the best way of creating packet?
|
on: 2005-04-12 06:00:50
|
|
Hi, I am developing a multiplay online game with client/server model(HTTP) and client need to send a packet(with x,yz,....)to server every 40ms.However, the network efficiency seem to be slower when the packet is larger and larger.So, can anyone know how to make a good packet?(my packet format---- x&y&z&angle&hp&money)
|
|
|
|
|
16
|
Java Game APIs & Engines / Java 3D / wCreating some beaming particle
|
on: 2005-04-05 08:01:28
|
|
Hi... I have created some particles with pointArray,specular and emissive material in my project~,but these material cannot simulate real beaming effect such as astigmatic effect,decay.. So, can anyone know what the principle is and how to do so with Java3D...thank
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|