Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
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
1  Java Game APIs & Engines / Xith3D Forums / Terrain Class Info on: 2005-04-04 13:30:13
Hi im looking for the theory behind the com.xith3d.terrain.Terrain class and how it works more specifically how it renders the terrain adapting the polygon density for efficient usage.

Does anybody know what kind of technique the terrain class uses and any articles or sites etc. where i can start researching this??
2  Java Game APIs & Engines / Xith3D Forums / Re: Picking terrain on: 2005-02-14 13:27:19
K do you have any examples of that?? i gave a look for some tutorials but found very little but will give another look maybe i overlooked something Smiley
3  Java Game APIs & Engines / Xith3D Forums / Picking terrain on: 2005-02-14 10:49:35
Hi i have a terrain that i want to be able to pick and return the coord the ray intersects the terrain shape.

As far as i know the View.pick function only returns the shape3D object but i need the actual absolute location the pickray intersected the terrain shape.

Can anybody give me an idea how to go about this??

Thanks
4  Java Game APIs & Engines / Xith3D Forums / Splitting Terrain into Shape3D's on: 2005-02-14 10:41:29
Hi trying to sub divide the terrain shape from the terrain demo into a 2 dim array of shape3d's  each of size 256 * 256.

wrote a piece of code (see below)  but the texturing is not mapping properly and there is large gaps between each shape3d geometry.

the init method is the only major thing i changed can anyone suggest a reason why there could be gaps between the shape3d's?Huh

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  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
    public void rebuild(View view) {

      view.getTransform().get(pTemp); // get the location of the view
     terrain.update(pTemp,117); // update terrain according to the views location
     
      for(int row=0; row<geo.length; ++row){
        for(int col=0; col<geo[0].length; ++col){
       
          geo[row][col].drawStart(); // resets the terrain vertices
         totalIndex = totalVerts = 0;
          terrain.render(this);
          geo[row][col].drawEnd(); // commits the changes to the video card
         geo[row][col].setIndex(index);

          geo[row][col].setValidIndexCount(totalIndex);
          geo[row][col].setValidVertexCount(totalVerts);
         
        }
      }

    }// end rebuild()

    /** called at the beginning of rendering the triangles for one adaptive quad square
     */

    public void start() {
    }
   
    /** */
    public void initVert(int i, float x, float y, float z) {
     
      //System.out.println("initVert: x:"+x+" y:"+y+" z:"+z);
     //System.out.println("texture scale: "+textureScale);
     
      if (totalVerts>=MAX_VERTICES) return;
     
      int row = (int)((x) / 256);
      int col = (int)((z) / 256);
     
      if(row == 4)row = 3;
      if(col == 4)col = 3;
     
      //System.out.println("row: "+row);
     //System.out.println("col: "+col);
     
      //for(int row=0; row<geo.length; ++row){
       //for(int col=0; col<geo[0].length; ++col){
         
          geo[row][col].newVertex();
          geo[row][col].setCoordinate(x,y,z);

          /**
           * Next we have to divide out the texture coordinates. 2D textures have coordinates
           * from 0 to 1 in what is called "S,T" space. Each coordinate in our X,Z world
           * has to be mapped to its appropriate S,T texture coordinate. If we are stretching
           * the texture all the way across the terrain, then 0,0 in X,Z would be 0,0 in S,T and
           * the farthest point in X,Z from the origin would be 1,1 in S,T. Thus, mathematically,
           * we should divide X and Z by the width and depth (should be equal) of the terrain. To
           * wrap the texture, you would divide this depth and width by some number (set by textureScale)
           * to make the textured patches smaller.
          */

          float texCoordx = x / (terrain.getWidth() / textureScale);
          float texCoordz = z / (terrain.getWidth() / textureScale);
          // Now we need to use these figures to set up a TexCoord2f
         TexCoord2f texCoords = new TexCoord2f(texCoordx, texCoordz);
       
          geo[row][col].setTextureCoordinate(0,totalVerts,texCoords);

          // We want prettier colors :-)
         float c = y/1500;
          geo[row][col].setColor(0.48f+c, 0.48f+c, 0.39f+c);

          vertexMap[i] = totalVerts++;
         
        //}
     //}// end for loop

    }// initVert()

    /** */
    public void tri(int a, int b, int c) {
     
      if (totalIndex+3>=MAX_INDICES) return;
      index[totalIndex++] = vertexMap[a];
      index[totalIndex++] = vertexMap[b];
      index[totalIndex++] = vertexMap[c];
     
    }// end tri()
5  Java Game APIs & Engines / Xith3D Forums / Multible Textures On Terrain on: 2005-02-07 07:49:53
Hi ive augmented the terrain demo for a project im doing and i need to display tiled textures on the terrain where each of the textures is different.

Currently the terrain shape is a single shape3D object, is there any way of tiling multiple textures to the same shape3D object or do i need to split the terrain into multiple shpae3D objects.

The reason i want this is that im creating a procedureal texture from an array which typically is between 1024 * 1024 and 2048 * 2048 in size and mapping that to the terrain, but the graphics card i have to demonstrate the program on can't handle textures over 512.

Appreciate any advice Smiley
6  Java Game APIs & Engines / JInput / Re: Null pointer in Jinput Test program on: 2005-01-27 09:41:52
The thing is that i can get the "ControllerReadTest " up and running, but its just a blank JFrame, i presume theres supposed to be a read out of the keyboard and the mouse or something.

So the DirectInputEnvironmentPlugin mustn't be loading then as the code below is not printing out when i start the ControllerReadTest

1  
2  
3  
4  
5  
6  
7  
Examining file : META-INF/
Examining file : META-INF/MANIFEST.MF
Examining file : net/
Examining file : net/java/
Examining file : net/java/games/
Examining file : net/java/games/input/
Examining file : net/java/games/input/DirectInputAxis.class


and just to reiterate im typing this at the command line

1  
2  
C:\jinput>java -cp jutils.jar;jinput.jar -Djava.library.path=. net.java.games.in
put.test.ControllerReadTest


and my directory structure follows mk81's except that to overcome the error where the plugin loader doesn't find the DirectInputEnvironmentPlugin class i've unpacked the dxinput.jar.

./dxinput.dll
./jinput.jar
./utils.jar
./Controller/net/java/games/input/ *.class

Do you have a bug fixed version of jutils.jar mk81?? as would really appretiate it if i could use it to load the plugins

7  Java Game APIs & Engines / JInput / Re: NoClassDefFoundError on: 2005-01-26 12:29:28
Had the same problem myself, my post is here http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jinput;action=display;num=1106068062"http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jinput;action=display;num=1106068062"

There seems to be a bug in the plugin loader when its trying to load a class from a jar file. So unpack and delete the jar from the controller folder and the class should load properly

Even after this jinput is still not working properly (different problem though )for me so tell me if yours works:)
8  Java Game APIs & Engines / JInput / Re: Null pointer in Jinput Test program on: 2005-01-26 10:03:53
Ok i removed the "controller" directory and moved the
dxinput.dll and dxinput.jar to my project directory.

Im using netbeans (i also tried from the command line) so i set my Running Projecct Arguments to

1  
-Djava.library.path=. -Djinput.plugins=net.java.games.input.DirectInputEnvironmentPlugin


and the jinput.jar and jutils.jar are both in the

1  
{java_home}/jre/libs/ext directory


and im running this code

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  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
/*
 * InputManager.java
 *
 * Created on 10 January 2005, 19:04
 */


import net.java.games.input.*;

/**
 *
 * @author Preacher
 */

public class InputManager {
 
  Keyboard kb = null;
 
  public static void main(String[] args){
    new InputManager();
  }
 
  /** Creates a new instance of InputManager */
  public InputManager() {
   
    ControllerEnvironment ce = ControllerEnvironment.getDefaultEnvironment();
    Controller[] cont = ce.getControllers();
 
    System.out.println("cont: " + cont.length);
     for (int i = 0; i < cont.length; i++) {
       if (cont[i].getType() == cont[i].getType().KEYBOARD) {
         kb = (Keyboard) cont[i];
      }
    }
   
    for(int i = 0; i < 100000; i++) {
      update();
    }
   
    System.out.println("done...");
   
  }// end constructor
 
  public void update(){
   
    kb.poll();
   
    Axis[] ax = kb.getAxes();
   
    for (int x = 0; x < ax.length; x++) {
      float num = ax[x].getPollData();
      if (num != ax[x].getDeadZone()) {
        if (ax[x].getName().equalsIgnoreCase("key 110")) {
          System.out.println("up arrow");
        }
      }
    }
   
  }
 
}// end class


and its not reading any controllers still and therefore throwing a null pointer when i try to poll the keyboard

any idea why its still not working??
sorry about all this it's just really annoying. Think i'll write a tutorial for jiput afte all this Smiley
9  Java Game APIs & Engines / JInput / Re: Null pointer in Jinput Test program on: 2005-01-24 13:04:49
Hi i've tried a lot of things with the -D, without the -D

just trying

1  
java -cp jinput.jar;jutils.jar net.java.games.input.test.ControllerReadTest


gives me the same error

i can get rid of the error by unpacking the dxinput.jar and deleting the dxinput.jar.

There seems to be a bug with the plugin classloader when reading form jar files as i used the plugin code for a project last year and had the same problems.

So with the jar unpacked the demo now runns but only a blank JFrame appears HuhHuh

is Jinput not finding the dll's or something i wonder??
10  Java Game APIs & Engines / JInput / Null pointer in Jinput Test program on: 2005-01-18 15:07:42
Hi im trying my hardest to get JInput working here and its not doing any good for my mental health >:

ive unzipped the core package into "jdk1.5.0_01\jre\lib\ext"

with jinput.jar and jutil.jar in the ext directory and the dxinput.dll and dxinput.jar in a folder named "controller" as the intro tutorials says.

i navigate to the "jdk1.5.0_01\jre\lib\ext" directory in the command window and execute the command:

java -cp jinput.jar;jutils.jar net.java.games.input.test.ControllerTextTest

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  
39  
40  
41  
42  
43  
44  
C:\Program Files\Java\jdk1.5.0_01\jre\lib\ext>java -cp jinput.jar;jutils.jar net
.java.games.input.test.ControllerTextTest
Controller Env = net.java.games.input.DefaultControllerEnvironment@35ce36
Scanning jar: dxinput.jar
Examining file : META-INF/
Examining file : META-INF/MANIFEST.MF
Examining file : net/
Examining file : net/java/
Examining file : net/java/games/
Examining file : net/java/games/input/
Examining file : net/java/games/input/DirectInputAxis.class
Examining file : net/java/games/input/DirectInputDevice.class
Examining file : net/java/games/input/DirectInputEnvironmentPlugin.class
Found candidate class: net/java/games/input/DirectInputEnvironmentPlugin.class
Exception in thread "main" java.lang.NoClassDefFoundError: IllegalName: net/java
/games/input/DirectInputEnvironmentPlugin
        at java.lang.ClassLoader.preDefineClass(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at net.java.games.util.plugins.Plugins.processJar(Plugins.java:112)
        at net.java.games.util.plugins.Plugins.scanPlugins(Plugins.java:85)
        at net.java.games.util.plugins.Plugins.<init>(Plugins.java:73)
        at net.java.games.input.DefaultControllerEnvironment.scanControllersAt(D
efaultControllerEnvironment.java:174)
        at net.java.games.input.DefaultControllerEnvironment.scanControllers(Def
aultControllerEnvironment.java:164)
        at net.java.games.input.DefaultControllerEnvironment.access$000(DefaultC
ontrollerEnvironment.java:57)
        at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultContro
llerEnvironment.java:108)
        at java.security.AccessController.doPrivileged(Native Method)
        at net.java.games.input.DefaultControllerEnvironment.getControllers(Defa
ultControllerEnvironment.java:106)
        at net.java.games.input.test.ControllerTextTest.<init>(ControllerTextTes
t.java:54)
        at net.java.games.input.test.ControllerTextTest.main(ControllerTextTest.
java:86)


ive tried using the -D option with the jinput.plugins option but java tells me the class doesn't exist

can anyone help me with this, and can anyonne make the install for this a little less painful maybe a complete introduction to jinput not an introduction scattered over many threads, it's just messy!!
11  Java Game APIs & Engines / Xith3D Forums / Strange Loop Slow Down on: 2005-01-06 12:26:36
Hi im having some trouble with slow down in a program im developing, below is the main driving loop.  The slow down  happens periodically and stalls the whole program even the awt event thread so i cant killl the program while its stalled. Im wondering if its to do with some thread issue i dont know about in xith??

As you can see below the xith rendering is done in another  object (The UserInterface object ), which is a singleton e.g.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
public class SingletonExample{

  private static SingletonExample sinEx = new SingletonExample();

  private SingletonExample(){
   
  }

  public SingletonExample getReference(){
    return sinEx;
  }

}


Ive printed messages at key points to try and track down the stalling point and it seems to be where the loop sleeps, but the loop sleeps for way longer than its suppossed to, as in its told to sleep for 33 milliseconds and the delay can sometimes be as long as 30 seconds???

Could the fact that the rendering is being done in another object be the cause or am i just barking up the wrong tree here???

Thanks for any help

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  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
private EmergeAnt(){
           
            System.out.println("EmergeAnt: Brian Heylin ITCarlow 2004");
           
    setFramePerSecond(30);
   
            userInterface = UserInterface.getReference();
           
    run();
   
    System.out.println("Loop Variables");
    System.out.println("Number Loops = " + numLoop);
    System.out.println("Number Sleeps = " + numSleep);
    System.out.println("Number Overworked = " + numOverWorked);
    System.out.println("Number Yields = " + numYield);
           
      }// end constructor EmergeAnt()
     
  /** Contains the driver loop
   *  This loop dynamically adjusts itself for the best performance without
   *  comprimising the UserInterface update rate
   */

  private void run(){
   
    beforeTime = System.nanoTime(); // get absolute time before loop runs
   running = true;
   
    while(running){
     
      ++numLoop;
      /** perform updating of ai and ui etc. here*/
      userInterface.update();
   
      afterTime = System.nanoTime(); // get absolute time after udating finished
     timeDiff = afterTime - beforeTime;
      // check if the time available (period) was enough for the workload to complete
     sleepTime = (period - timeDiff) - overSleepTime;
       
      //  if the workload was low, we can afford to sleep and let other threads
     //  execute
     if(sleepTime > 0){
               
        try{
          Thread.sleep(sleepTime/2000000L); // nano -> milli
       }catch(InterruptedException ex){}
       
        // due to sleep() method tendancy to sleep over the requested time
       // calc the acual time slept and compensate on next loop
       overSleepTime = (System.nanoTime() - afterTime) - sleepTime;

      }else{ // The workload was too much for period
       
        excess -= sleepTime;
        overSleepTime = 0L;
       
        if(++numberDelays >= NUM_DELAYS_PER_YIELD){
          Thread.yield();
          numberDelays = 0;
        }
       
      }// end sleepTime check
     
      beforeTime = System.nanoTime(); // update the time
   }
  }// end run()
12  Java Game APIs & Engines / Xith3D Forums / Pheromone Texture on: 2004-12-16 14:12:54
Hi im developing an ant colony simulation and i need to map a  pheromone array (int)to basic primative shapes that make up the environment, this map will have to be updated regularly and be turned on and off.

Im just starting to think about how to do this, i presume that i make some sort of texture from the pheromones array (might have a pheromone array for each primative shape) and map this to the shape every game loop.??

Does this sound ok?? Any opinions on better ways??

Thanks
13  Java Game APIs & Engines / Xith3D Forums / Quaternion Camera Class on: 2004-12-14 08:34:22
Hi im looking for a quaternion camera class, i have a few tutorials but my maths skills are a bit dodgey :-/

I would just like to get a camera up and running as fast as possible as i have to concentrate on a big project, of which the camera is but a small part  Smiley I presume a third person quaternion camera has been done many times before by many people so i would appreciate it if someone could give a maths idiot a helping hand  Tongue
14  Java Game APIs & Engines / Xith3D Forums / Re: Snap to Grid on: 2004-12-14 08:24:56
I just love starting a good discussion  Grin

I'll be doing the code for my snapping stuff over the christmas, but its my first time considering it in a project so it'll probably be very specfic to my problem. but i'll post it if you want. Im doing an ant colony simulation if anyones interrested, its an interesting project from an ai point of view
15  Java Game APIs & Engines / Xith3D Forums / Re: Snap to Grid on: 2004-12-13 10:43:06
Thanks for the reply,  My app needs an environment editor (making a simulation of an ant colony, want to be able to build simple table top ant farm to be used in simulation from simple primatives, nothing fancy) so want a simple snap to grid system where simple primatives, planes, wedges, cubes are used to build the environment.

Do you know of any good tutorials?? just want to get it done properly the first time, as i have plenty other things to develop!!

Thanks Smiley
16  Java Game APIs & Engines / Xith3D Forums / Re: Xith And Swing Menu on: 2004-12-13 10:23:55
Thanks all, will give the code a try Smiley
17  Java Game APIs & Engines / Xith3D Forums / Xith And Swing Menu on: 2004-12-10 08:01:18
Hi Ive embedded a xith Canvas3D into a swing panel and frame etc.. I have a menubar on the frame, and the problem is that the Xith Canvas overdraws the menus when there expanded.

Ive tried placing a frame.repaint() in the render loop to see if it makes a difference, but it didn't :|

Any ideas on how to cure this one??

Thanks
18  Java Game APIs & Engines / Xith3D Forums / Re: Snap to Grid on: 2004-12-08 13:37:47
Excellent thanks LaLiLuLeLo, just need a starting point on this one, will give it a try
19  Java Game APIs & Engines / Xith3D Forums / Snap to Grid on: 2004-12-08 09:33:29
Hi I need to implement a grid on the zx plane which i can place objects on (for an environment editor).

Looking for a few suggestions on how to go about drawing the grid and also what square of the grid the mouse of hovering over with the pick ray (all i can come up with is using a square with a colored outline for each square of the grid, i'm sure theres a more efficient way;)) is there common way to go about this?  

Thanks
20  Java Game APIs & Engines / Xith3D Forums / Re: Embedding a Xith3D window on: 2004-12-06 11:00:40
Thanks  Wink
21  Java Game APIs & Engines / Xith3D Forums / Embedding a Xith3D window on: 2004-12-06 09:03:17
Hi im looking to develop a multi windowed application (Ant Colony Simulator) and also an environment editor for the app. I need to embed a 3D window within a swing interface is this possible with xith??
22  Java Game APIs & Engines / Xith3D Forums / Re: UIWindow disappering act on: 2004-04-20 16:32:50
heres the class for the infoWindow, as i said it worked when i brought it into one of the simple demo programs from the getting started guide but when i brought it into my project notting is being rendered. I thought i might have been a threading issue, so i created and showed it using the rendering thread but still no luck??? again any help would be great thanks

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  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
public class InfoWindow extends UIWindow{
     
      private UIWindowManager windowMgr = null;
      private JPanel root = null;
      private InfoCanvas infoCanvas = new InfoCanvas();
     
      public InfoWindow(Canvas3D canvas){
           
            super(210, 110, true, false);
            windowMgr = new UIWindowManager(canvas);
           
            root = new JPanel(true);
            root.setSize(210, 110);
            root.setOpaque(false);
            root.add(infoCanvas);
           
            windowMgr.addOverlay(this);
            setRoot(root);
                 
      }
     
      /**
   *
   */

      public synchronized void update(){
           
            super.update();
            setRoot(root);
           
      }
     
      /**
   *
   */

      public synchronized void setMessage(String message){
           
            infoCanvas.message = message;
           
      }
     
      /**
   *
   */

      public synchronized void setLocation(Point location){
           
            System.out.println ("Setting info window location");
            windowMgr.setPosition(this, location.x, location.y);
           
      }
     
      public synchronized void setVisible(boolean isVisible){
           
            System.out.println ("Setting info window visible");
            windowMgr.setVisible(this, isVisible);      
           
      }
     
      /**
   *
   */

      private class InfoCanvas extends Canvas{
           
            public String message = "";
           
            public InfoCanvas(){
                  setBounds(0, 0, 200, 100);
                  setVisible(true);
            }
           
            /**
         *
         */

            public void paint(Graphics g){
                 
                  System.out.println ("Painting InfoWindow");
                 
                  Graphics2D g2d = (Graphics2D)g;
                 
                  g2d.setPaint(new Color(0.15f, 0.0f, 0.60f));
                  g2d.fillRoundRect(0, 0, 200, 100, 20, 20);
                  g2d.setPaint(new Color(0.25f, 0.0f, 0.70f));
                  g2d.fillRoundRect(5, 5, 190, 90, 20, 20);
                 
                  g2d.setPaint(new Color(0.8f, 0.6f, 0.9f));
                  g2d.drawString(message , 10, 50);
                 
            }      
      }      
}
23  Java Game APIs & Engines / Xith3D Forums / UIWindow disappering act on: 2004-04-19 09:36:32
Hi i have written a little UIWindow to act as an info panel in a game im doing. I worte it and tested it using one of the first example programs ( one displying a rotated cube) and it worked fine followed my mouse when i moved it an everything:)

I then brought it into the game im writing, and for some reason unknown to me, it will not disply itself.

I have ran a few tests of it and the point() method i'm using to diaplay the graphics is being called as expected but it's just not being rendered to the canvas???

Any suggestions would be great:)
24  Java Game APIs & Engines / Xith3D Forums / Re: Path finding camera on: 2004-04-16 13:44:04
the quad.interpolate(Quad4f, Quad4f, int) was a typo, i am using the quad.interpolate(Quad4f, Quad4f, float)method im using the resulting quad to set the view.Transform().set(Quad4f) but whatever value of alpha i use the view snaps straight to the end point.
25  Java Game APIs & Engines / Xith3D Forums / Re: Path finding camera on: 2004-04-14 11:25:42
Will give them a look pedro thanks. I want to apply the camera to a college chess project but ive only a week and a half to polish the whole thing off so it looks like i won't have the time to look into it at the moment. If anyont else has something simular done already even that would be great.

was looking at the interpolate(Quad4f target,  int alpha) method of the Quad4f class in the vecmath packages and was under the impression that it would interpolate between two points in increments specified by alpha. But it seems to just jump from the source point to the target point no matter what value alpha is. i know that this is usually used in-directly with a Java3d interpolator but pressumed that it could be used maually. any info on this would be good Smiley
26  Java Game APIs & Engines / Xith3D Forums / Re: Path finding camera on: 2004-04-08 11:10:22
Hi havent used interpolaters yet i'm just loking into them at the mo (bit of a newbie Smiley got pointed towards quaternions for smooth rotations, apparently most top class games use tham for rotaions in place of the standard matrix. so anyway i'm just printing off stuff about quaternions now and going to give it a look over other than that i'm not much help at the mo Smiley
27  Java Game APIs & Engines / Xith3D Forums / Re: Path finding camera on: 2004-04-03 09:50:31
Will do thanks pedro Wink
28  Java Game APIs & Engines / Xith3D Forums / Path finding camera on: 2004-04-02 08:41:33
Hi im trying to modify a currently basic camera that orbits around a center point always looking at the center point.

I want to set up a camera system where i can give the camera a point in 3d space and it will smoothly orbit around to the point.

at the moment i just have a basic algorithm that takes the mouse diplacement as its parameters

1  
2  
3  
4  
5  
6  
7  
8  
float cos = (float)Math.cos(rotXDisplacement);
            float x = cos*(float)Math.cos(rotYDisplacement) * zoomDisplacement;
            float y =                  (float)Math.sin(rotXDisplacement) * zoomDisplacement;
            float z = cos*(float)Math.sin(rotYDisplacement) * zoomDisplacement;
           
            view.getTransform().lookAt(new Vector3f( x, y, z),  // location of eye
                                centerVector,                           // center of view
                                upVector);                          


I have no idea of where to start implementing a path finding algorithm so if anyone has any good ideas links to tutorails etc. it'id be great  Grin
29  Java Game APIs & Engines / Xith3D Forums / Re: Text in XIth3D on: 2004-04-02 07:45:45
I presumed that the fact that the UI manger has to, at the end of the day call the swing code for all components in the UIWindow, e.g. resizeing code all the differnet panes etc, which i'd imagine is a lot of code compared to just displaying some texture with some text on it.

I'll give the UI system a go can i just use a canvas to display a rounded rectangle with a bit of text on it using the UIOverlay???

30  Java Game APIs & Engines / Xith3D Forums / Text in XIth3D on: 2004-04-01 09:09:37
Im developing a chess game and i'm trying to make a little info window that pops up at the mouse coords when the mouse hovers over a piece.

Besides using the UIOverlay system what options do i have to display a simple info dialog, all i want is a simple radiused blue rectangle containing textual info so i feel using the UIOverlay system is a bit overkill.

I have a felling i'll have to use JOGL as i can see no text classes in the Xith3D packages, this i have very little experience with. so if anyone has any ideas it would be great:)
Pages: [1] 2 3
 

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

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

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

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

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

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

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

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

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

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