Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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]
1  Java Game APIs & Engines / Xith3D Forums / Implementing NeHe Lesson 48 ArcBall Rotation on: 2004-03-10 10:14:20
Hi i'm trying to get NeHe's ArchBall rotation lesson 48 (which is here http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=48) working in Xith3D so i can use it in my current project, its seems to be almost wright, i was wondering if someone can have a look at the code, run it and see if they can see a problem to help us out please. I've pasted the code on sourcepost, here is the link http://sourcepost.sytes.net/sourceview.aspx?source_id=11734
2  Java Game APIs & Engines / Xith3D Forums / Will Xith3D utilise java 1.5 features soon? on: 2004-03-06 14:30:19
Hello again, just wondering if Xith3D will make some changes since 1.5 beta released with load of new features, like in the Group class changing from an ArrayList of objects to an ArrayList of Group's/Nodes and all of thous constants, into logically grouped enum would be quite cool and great step ahead of java3d
3  Java Game APIs & Engines / Xith3D Forums / Re: There is definately something wrong with eithe on: 2004-03-06 13:31:35
"Feck", i found out what the problem was now, i never created the geometry someone on the net did, when i checked it out the file in 3DS Max all the object's local co-ordinate systems where not centered to the object's center, they where all at the worlds origin so i adjusted the all the objects pivot points to the object's center and everything is fine now thats been doing in me for ages, feck ill make the geometry myself from now on lol.

Sorry for pointing the blame on Xith3D  :-/ case closed.
4  Java Game APIs & Engines / Xith3D Forums / There is definately something wrong with either... on: 2004-03-06 10:33:17
There is definately something wrong with either the getLocalToVworld() method or the ASE file loader, you can get the absolute position of an object from its bounding sphere's center but if you try to get the original translation transform of the geometry made in the 3D modeller, even when the nodes are live from root to the most bottom child all the transforms are at identity, this causes me alot of problems because i use the center of the bounding sphere as my position so if the position has been updated and set the translation of a transformGroup (the correct way aswell) instead of staying in the position its translating from (0, 0, 0) to the where ever the bouding sphere's center is which is not correct. for example  one of the geometry in my app its bounding sphere's center is

   (2.1570811, 20.593824, -18.71343)

which is the correct center when i check in 3DS Max, there for there should be a translation matrix with something like this:

(1, 0, 0, 2.1570811)
(0, 1, 0, 20.593824)
(0, 0, 1, -18.71343)
(0, 0, 0, 1)

some where in the tree but i can't find it in any node, i've even tried messing around with the flags of the AseFile object and still the same all node's transform matrices at identity. I've read all simillar post's with simillar problems and tried the solutions but still the same problem, am i not getting something here i just dont get it
5  Java Game APIs & Engines / Xith3D Forums / Re: the center of geometry with bounding sphere on: 2004-03-04 14:02:08
I printed out the all the transforms (including LocalToWorld) and there all set to identity matrix when i load the objects from an ase file  using "getNamedNodesMap()" i can't seem to find the matrix that has the origional translation of the objects done 3D Studio max, am i missing something here?
6  Java Game APIs & Engines / Xith3D Forums / Re: the center of geometry with bounding sphere on: 2004-03-04 10:17:40
Quote
Hi,

Bounding sphere defines shape bounds in local coordinate system (i.e. the same coordinate system where shape vertices are defined).

If you want to determine center of bounding shpere in Vworld coordinates, you can use Node.getVworldBounds() (you can use this even for groups).

If you want to do something different, you have to check the structure of your scenegraph and apply appropriate transforms either to local bounds, or to vworld bounds (your choice).

Yuri


Thanks for replying, still wondering about something, once i get the center position from the bounds, when the geometry is suppose to move after the position is updated, where do i apply the translation? after i've loaded the data from the ase file, i attach a named node to a BranchGroup and then attach the BranchGroup to a TransformGroup so i can move it around, when i update this TransformGroup to the center position that i obtained from the bounds its not correct, when i print out the value of the Matrix contained in that TransformGroup before applying the transformation, its at identity, so i guess must be the local coordinate system, where should i apply the translation at the most top node?
7  Java Game APIs & Engines / Xith3D Forums / Re: the center of geometry with bounding sphere on: 2004-03-03 19:21:40
Some one please help me, i printed out the bounds and the position of the center is correct when i checked the coordinates in 3DS Max, if the balls are not moving i wont them to stay in the position so should i not call translate even thou the coordinates doesn't change?
8  Java Game APIs & Engines / Xith3D Forums / the center of geometry with bounding sphere on: 2004-03-03 07:06:41
Hi, basically in my pool game i'm using the geometry from a ASE file that someone else made, with the pool balls i need to get the center of the ball to set the center of mass 4 my physics calculations so what i do is i get the bounds of the ball, cast to a bounding sphere and get the center from there but in my game loop when i set the translation transform to that center when it isn't moving, its gets moved to the incorrect place here is snippet of what i'm doing:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
//Some where being initialized
TransformGroup tg = (TransformGroup)namedNodes.get("poolball1")

Shape3D visualBall = (Shape3D)b.getChild(0);

bounds =      visualBall.getBounds();

Vector3 centerOfGravity = new Vector3f(((BoundingSphere)bounds).getCenter());

///////////////////////////////////////////////////////////

//some where later on in the game loop

Transform3D trans = tg.getTransform();
trans.setTranslation(centerOfGravity);

tg.setTransform(trans);


one ball is placed correctly but the rest stay in the wrong position, i guess ill have to do it the hard way and get the geometry and calculate the center myself?
9  Java Game APIs & Engines / Xith3D Forums / Re: glActiveTextureARB not supported on uni's PCs on: 2004-02-24 07:10:29
well like i said before my account doesn't that privileges to update the drivers and i couldn't imagine my uni doing an update just 4 one project
10  Java Game APIs & Engines / Xith3D Forums / Re: glActiveTextureARB not supported on uni's PCs on: 2004-02-23 21:30:19
The strangest thing is my uni only changed there PC's last summer and they have WinXP on them, but they are RM computers so i'm not supprised
11  Java Game APIs & Engines / Xith3D Forums / Re: glActiveTextureARB not supported on uni's PCs on: 2004-02-23 15:32:59
RR i didn't notice the version there. I was afraid this would happen there would be no way i'd be allowed to update the drivers of the uni's computers, and i doubt they would do an update to all the computers while classes are running just 4 my project. So i'm pretty much stuffed unless i can change some settings in Xith3D is this a possiablity?
12  Java Game APIs & Engines / Xith3D Forums / glActiveTextureARB not supported on uni's PCs on: 2004-02-23 10:35:27
Hi i'm using Xith3D for my final year project and i've been making the project at home which runs fine on my computer but when i tested it on the uni's computers (with all the lib jars and dll's visiable) its starts up by showing a JFrame then exits an exception message about an opengl extension not on the PC's but i'm not using any extensions at the mo, i guess its Xith3D using them, is there any where i can get the program to run on the uni's computers so i can show it at my presentation please help, the exception message is:

Init GL is net.java.games.jogl.impl.windows.WindowsGLImpl
OpenGL Renderer = GDI Generic
OpenGL Version = 1.1.0
OpenGL Vendor = Microsoft Corporation
OpenGL Extensions = GL_WIN_swap_hint GL_EXT_bgra GL_EXT_paletted_texture
net.java.games.jogl.GLException: Method "glActiveTextureARB" not available
       at net.java.games.jogl.impl.windows.WindowsGLImpl.glActiveTextureARB(Win
dowsGLImpl.java:94)
       at com.xith3d.render.jogl.TextureShaderPeer.shade(TextureShaderPeer.java
:668)
       at com.xith3d.render.CanvasPeerBase.setState(CanvasPeerBase.java:121)
       at com.xith3d.render.CanvasPeerBase.render(CanvasPeerBase.java:99)
       at com.xith3d.render.jogl.CanvasPeerImpl.drawBin(CanvasPeerImpl.java:678
)
       at com.xith3d.render.jogl.CanvasPeerImpl.display(CanvasPeerImpl.java:849
)
       at net.java.games.jogl.impl.GLDrawableHelper.display(GLDrawableHelper.ja
va:74)
       at net.java.games.jogl.GLCanvas$DisplayAction.run(GLCanvas.java:194)
       at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:192)
       at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:182)
       at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82)
       at com.xith3d.render.jogl.CanvasPeerImpl.render(CanvasPeerImpl.java:950)

       at com.xith3d.scenegraph.View.renderOnce(View.java:732)
       at com.xith3d.scenegraph.View.renderOnce(View.java:665)
       at JavaPool.run(JavaPool.java:215)
       at java.lang.Thread.run(Thread.java:534)

P.S: i'm also using the xith3D 3DS loader aswell if that makes any difference, maybe when it loads the textures its using that extension?
13  Java Game APIs & Engines / Xith3D Forums / Is it worth it? on: 2004-02-06 06:23:38
Hi i wont to create a online 3D Pool game for my final year project, basically my project is about the current state of advanced java games development (which is looking really bright), i've used jogl before but i think with the amount of time i have i think it would be more productive to use a scene graph thus Xith, also i wont to have sound & music support so Xith seems even more compelling to use with Joal & JavaSound support in the scene graph. i already have the geometry for the pool table, balls and cue its in 3DS format, how good is the 3DS Loader in Xith?
14  Java Game APIs & Engines / JOGL Development / how do i use sub - texture of an existing texture on: 2003-11-25 11:58:58
Hi i'm loading in one 256 x 256 texture into the card with glTexImage2D() and then i create a texture object with 3 IDs that i bind with three 64 x 64 subtextures of the large texture but its not working or i'm doing something wrong can someone have a look and tell me if this is correct please cheers.

This is from the init() method :

gl.glEnable(GL.GL_TEXTURE_2D);
gl.glShadeModel(GL.GL_SMOOTH);
gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);

gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
gl.glEnable(GL.GL_BLEND);

gl.glPixelStorei(GL.GL_UNPACK_SWAP_BYTES, GL.GL_TRUE);
gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, 1);
           
           
gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, 4, 256, 256, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, img);
           
gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
           
           
gl.glGenTextures(3, textureIDs);
           
gl.glBindTexture(GL.GL_TEXTURE_2D, textureIDs[0]);
           
gl.glTexSubImage2D(GL.GL_TEXTURE_2D, 0, 0, 0, 64, 64, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, img);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
           
gl.glBindTexture(GL.GL_TEXTURE_2D, textureIDs[1]);


gl.glTexSubImage2D(GL.GL_TEXTURE_2D, 0, 64, 0, 64, 64, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, img);
           
gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);

           
gl.glBindTexture(GL.GL_TEXTURE_2D, textureIDs[2]);
           
gl.glTexSubImage2D(GL.GL_TEXTURE_2D, 0, 128, 0, 64, 64, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, img);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);

gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);

/////////////////////////////////////////////////////////////////////////////

And this is part of the display method to draw one of the sub textures onto a quad:

gl.glClear(GL.GL_COLOR_BUFFER_BIT);
     
gl.glBindTexture(GL.GL_TEXTURE_2D, textureIDs[currentTexID]);

gl.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
       
gl.glBegin(GL.GL_QUADS);
   gl.glTexCoord2f(0.0f, 0.0f);
   gl.glVertex2i(0, 0);
             
    gl.glTexCoord2f(0.0f, 1.0f);
    gl.glVertex2i(0, 64 - 1);
             
    gl.glTexCoord2f(1.0f, 1.0f);
    gl.glVertex2i(64 - 1, 64 - 1);
             
    gl.glTexCoord2f(1.0f, 0.0f);
    gl.glVertex2i(64 - 1, 0);
gl.glEnd();

gl.glFlush();
15  Java Game APIs & Engines / Java Sound & OpenAL / Re: javax.sound.sampled API - Real - Time Panning on: 2003-11-13 14:25:37
The Control classes are not good at it in real time, it produces alot of hishes and clicks because its not gradually changing the samples overtime. I would use joal and jogl for my project but the requirements of my project are to get the game running on my uni's computers which 1) i doubt OpenAL will be installed on them and i wont be allowed to do it myself. 2) i did some tests and jogl doesn't display correctly. So i'm pretty much stuck with using almost pure java libs which isn't 2 bad not doing some mad 3D game here lol.
16  Java Game APIs & Engines / Java Sound & OpenAL / javax.sound.sampled API - Real - Time Panning on: 2003-11-13 06:44:02
Hi i'm trying to map a mono sound of a character to stero by panning. I have a class that filters a stream of bytes, i can get the sample of the mono sound but i'm having problems in creating the stereo samples. Its hard for me to explain so ill paste some code here its from the class Soundfilter.
This is the method i use to get the sample from bytes and works fine.

public static short getSample(byte[] buffer, int position) {
       return (short)(
           ((buffer[position+1] & 0xff) << Cool |
           (buffer[position] & 0xff));
}


But if i want to put it back with a new left and right sample in new byte array of samples i have this method:

public static void setSample(byte[] buffer, int pos, short leftSample, short rightSample) {

  buffer[pos]= (byte)(leftSample & 0xff);
  buffer[pos + 1]      = (byte)((leftSample >> Cool & 0xff);
       
  buffer[pos + 2] = (byte)(rightSample & 0xff);
  buffer[pos + 3]      = (byte)((rightSample >> Cool & 0xff);
}

Is the left and right sample in the correct position?  In a 16bit sample of stereo sound does the first 2 bytes represent left sample and the next 2 bytes represent right sample?
17  Discussions / General Discussions / Re: 2D Games jogl or awt.Graphics? on: 2003-11-01 06:45:42
Hi well i did some OpenGL coding using jogl and then tested it to run on the universities computers and it shows but not correctly, i think they do not have OpenGL 1.4. Anyways i am not totally what sure i'm gonna do what i origionally planned but i have found this:
http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html

still doing research
18  Discussions / General Discussions / 2D Games jogl or awt.Graphics? on: 2003-10-28 09:39:56
Hi i trying to make a gaunlet clone using jogl, i have done a lot of research i read alot about that its not worth using OpenGL for 2D as it could be slower than using awt.Graphics but then i read that people are making 2D java games with Jogl using textures for faster preformance. I dont know what the best route would be, i know some OpenGL so i'm no bothered about using it just what would be advan and disadvantages. thanks
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

Dwinin (29 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (76 views)
2014-09-10 06:39:09

Tekkerue (38 views)
2014-09-09 02:24:56

mitcheeb (58 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (30 views)
2014-09-07 01:12:14

Longarmx (35 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!