Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (593)
Games in Android Showcase (168)
games submitted by our members
Games in WIP (647)
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 / Re: PointSound question on: 2004-09-04 15:29:26
I found strange problems with PointSound too (similar to what you are getting)
I went and used FMOD for my sound support instead of what Xith supplies (using JOAL I belive?).

Main FMOD site -
Java version -

It works a treat the API is simple (the Java version is a wrapper around the C function calls, so it's not OO) and it has plenty of features.
2  Java Game APIs & Engines / Xith3D Forums / Re: Effort to improve the Xith3D API documentation on: 2004-08-22 07:16:29

Time to do my bit...
I'd be happy to document a few classes
3  Java Game APIs & Engines / Xith3D Forums / Re: Array index exception caused by TextureUnitSta on: 2004-08-19 18:34:35
I encountered the same problem, when layering two textures.

It's because the Geometry you are trying to texture only has one set of texture coords. You require 1 set of texture coords per TextureUnitState.

The code that creates the Geometry would need a extra call to setTextureCoordinates, something like...
float[] texCoords = 
 // Your coords here
quad_data.setTextureCoordinates(0, offset, texCoords); // texture one
quad_data.setTextureCoordinates(1, offset, texCoords); // texture two

Where quad_data is a QuadArray or similar sub-class of Geometry
They do seem to have omitted mentioning this in the tutorial, which I'm sure has caught out many other people
4  Java Game APIs & Engines / Xith3D Forums / Re: Game Source on: 2004-08-09 05:38:23
You are more than welcome to have a look at my game.
Source and info here

It's not the latest code up there for download. I'll upload a new version this week.

5  Java Game APIs & Engines / Xith3D Forums / Re: CollisionDropTest not working? on: 2004-07-27 21:04:43
I noticed that the balls fell through the objects too, but I thought it was just a problem on my machine or my install of Xith.
6  Java Game APIs & Engines / Xith3D Forums / Re: Incorrect Normals from ASE object on: 2004-07-26 09:25:54
Doh I'm minutes too late! Smiley
Yes I've just discovered the convertMeshCoordinates option on the ASEReader constructor - setting it to false works for me.

I have to rotate my object but thats no hassle as i was doing that for my 3DS models after importing.

Thanks for the help,
7  Java Game APIs & Engines / Xith3D Forums / Re: Incorrect Normals from ASE object on: 2004-07-26 07:03:15
I've gone back to using ASE as I can not find a way to use sharedCopy with models loaded from 3DS, as the game uses ridiculous amounts of RAM without creating shared copies (see this;action=display;num=1080392421 thread) But I'm still suffering with bad normals on my ASE models.

I've tried re-setting the transform, this hasn't helped.
I can't find any option to not export smoothing (I'm using 3D Studio MAX 6) with my model (see screen shot)

Any ideas Huh development my game is basically stopped as I can't use either 3DS or ASE for my models!

I'll post an example later, today
8  Java Game APIs & Engines / Xith3D Forums / Re: Fog not visible on: 2004-07-23 14:10:25
Ahhh, good to see the javadoc's make this very clear Embarrassed (i fell over the same problem) - a quick line in the javadoc stating "this hasn't been implemented yet" would save a lot of people a lot of hassle finding this out

I'm not having a dig has you guys do a great job, just how long would that take to do?  (I mean the comment not implement the fog feature) Wink  
9  Java Game APIs & Engines / Xith3D Forums / Transparent texture overlay problem on: 2004-07-22 15:46:49

I'm having problems with applying a transparent texture over  the top of another, the effect I want is as follows:

Base Texture  +   Texture Overlay (with alpha)  =   Desired result

I've tried what seems like every combination of TextureAttributes and various modes but no luck, surely this can be done? Here's the code I'm using

TextureUnitState tu0 = new TextureUnitState((Texture2D)"floor.jpg"), null, null);
TextureUnitState tu1 = new TextureUnitState((Texture2D)"test.png"), null, null);
TextureAttributes ta0 = new TextureAttributes();
ta0.setTextureMode(TextureAttributes.MODULATE);            // Mode needs changing???
TextureAttributes ta1 = new TextureAttributes();      // Mode needs changing???

// ????
// Some combination of setCombineAlphaMode and setCombineRgbMode here ????
// The modes are not clearly documented which const values of TextureAttributes apply to each method?
// ????
// is order in the array important?
appearance.setTextureUnitState(new TextureUnitState [] {tu0, tu1});

Can anybody help? or at least explain the setCombineAlphaMode and setCombineRgbMode methods

10  Java Game APIs & Engines / Xith3D Forums / Re: Node.sharedCopy(..) on: 2004-07-16 11:17:11

Would it be possible to post or send me your code?

I thought I had a work around too, but my animations are always animating the first model loaded not the cached copies.

This is driving me nuts, yet again this seems a very common problem that lots of people must have encountered?!
11  Java Game APIs & Engines / Xith3D Forums / Re: Node.sharedCopy(..) on: 2004-07-16 06:13:19
Thanks, but thats what I'm currenty doing (casting to a BranchGroup) and it's all working fine.

But the issue is - I then have a BranchGroup not a TDSModel, so I can not use any of the TDSModel methods (e.g. setCurrentFrame for animation)

I need to cast it to TDSModel not BranchGroup.
12  Java Game APIs & Engines / Xith3D Forums / Re: sharedCopy(..) and TDSModel on: 2004-07-15 21:03:20

Just encountered this same problem with the 3DS loader. I want to load lots of the same model file and have them all over my scene. So I setup a hashmap to cache previously loaded models and I get them from there if they have already been loaded once.

But doing this resulted in an exception:
com.xith3d.scenegraph.IllegalSceneGraphOperation: Illegal attempt to set the parent of this Node blah blah

So I tried to use sharedCopy to get copies of my model, yet I get an exception when casting from the sharedCopy call to a TDSModel. Casting to a 'plain' BranchGroup works fine, BUT I can't use any of the features of the TDSModel class (e.g. animation) that I require.

Here is the working code from my ModelLoader class
public class ModelLoader {
    static HashMap cache = new HashMap(20);

    static BranchGroup load(String model_file)
        if(cache.containsKey(model_file)) {
            TDSModel mdl = (TDSModel)cache.get(model_file);
            return (BranchGroup)mdl.sharedCopy(mdl);
        } else {
            try {
                FileInputStream fis = new FileInputStream("features/"+model_file+".3ds");
                TDSModel model = new TDSLoader().load("/features/", fis, true);
                cache.put(model_file, model);
                return model;
            } catch (IOException e) {
                System.out.println("Error loading 3DS model '"+model_file+".3ds'");
                return null;

If I change the line
return (BranchGroup)mdl.sharedCopy(mdl);
return (TDSModel)mdl.sharedCopy(mdl);

I get the ClassCastException....

Help! Any ideas as I REALLY need to cache my models like this, it geatly improves load time and memory usage (I noticed at least 16mb was saved in one small test)

13  Java Game APIs & Engines / Xith3D Forums / Re: Problem with PointLight on: 2004-07-15 20:32:51
Could be a specularity (shiny-ness) problem with (large) white highlights showing over the whole object making them appear white.

Here's some code for a completely non-specular material
        Material matt_basic = new Material();
        matt_basic.setAmbientColor(1f, 1f, 1f);  ;
        matt_basic.setDiffuseColor(1f, 1f, 1f);            
        matt_basic.setSpecularColor(0.00f, 0.00f, 0.00f);
14  Java Game APIs & Engines / Xith3D Forums / Re: PointSound problem on: 2004-07-09 15:02:06
aNt -
Hi, that FMOD looks interesting, as I've got problems with JOAL in Xith3D (it's just seems really buggy) I'd like to try it.

The API looks a little confusing, any code snippets to get started (say a single 3d point sound looping)?
15  Java Game APIs & Engines / Xith3D Forums / Re: Incorrect Normals from ASE object on: 2004-07-09 11:05:45
A quick answer I just found....
Don't use the ASE loader at all.
My objects load and render fine using the 3DS loader.

Must be a bug in the ASE loader.
16  Java Game APIs & Engines / Xith3D Forums / Incorrect Normals from ASE object on: 2004-07-09 09:34:22

I want to load some ASE models into my game, but they appear to be loading with incorrect normal information, as the screenshot below demonstrates. (The cylinder was created in 3D Studio Max)

I noticed that the world coords in 3D Studio have Z as the vertical axis. In Xith Y is the vertical axis (i.e. Xith is left handed and 3dStudio is right handed). I think this is the root of the problem, any ideas how to solve or get around this?Huh Surely I'm not the first person to have seen this?

I've tried swapping the Z and Y coords in the ASE file that hasn't helped.

17  Java Game APIs & Engines / Xith3D Forums / Re: Mouse cursor/pointer problem on: 2004-07-08 18:22:58
Solved it !

All it needed was to call setCursor on the component of the CanvasPeer, bit of a guess but it worked!

Assuming CanvasPeer is called "canvas_peer"
Toolkit tk = Toolkit.getDefaultToolkit();
Cursor cursor = tk.createCustomCursor(tk.getImage("flask.png"), new Point(0, 0), "blah");

18  Java Game APIs & Engines / Xith3D Forums / Re: Moving the camera/player a fixed distance on: 2004-07-07 20:20:35
java -
I could have move the camera a fixed distance and turned it 90 degrees without much problem at all.

What I wanted was the player/camera to move and turn smoothly between these fixed interval grid points and not stop anywhere between.

In retrospect I probably wasn't that clear in my post...
Oh well it's fixed now

Thanks for your interest,
19  Java Game APIs & Engines / Xith3D Forums / Mouse cursor/pointer problem on: 2004-07-07 20:06:57

In the past I have changed the mouse pointer in Swing and AWT apps with the following bit of code

Toolkit tk = Toolkit.getDefaultToolkit();
Cursor hand = tk.createCustomCursor(tk.getImage("Mouse.gif"), new Point(0, 0), "BlahBlah");

This doesn't work with a Xith3D Canvas3D, I'm not getting any error it's simply ignores my new mouse pointer. The JOGL forum implies this method should work for a GLCanvas;action=display;num=1085725562;start=2

Any clues on changing the mouse cursor with Xith3D (Canvas3D class), if this can't be done it's a bit of a nail in the coffin for my project. turning off the cursor would be a start....

20  Java Game APIs & Engines / Xith3D Forums / Re: Moving the camera/player a fixed distance on: 2004-07-06 15:07:19
There is a class that allows the moving and turning the "camera" it's the View class. What I was saying I think we really require is a more "game-like" camera class that moves with the player.
21  Java Game APIs & Engines / Xith3D Forums / Re: Moving the camera/player a fixed distance on: 2004-07-05 04:11:52

It would be nice to have something in the main Xith API for this. In the mean time I have solved my problem. It all stemmed really from using someone else's class and changing it to suit my needs.

Once I wrote my own camera class from scratch I got it working.
Happy to sumbit my code here for people to use but I suspect it's a bit too specialised. I'll be putting all my work on my website soon anyhow.

22  Java Game APIs & Engines / Xith3D Forums / Re: Moving the camera/player a fixed distance on: 2004-07-02 09:39:47
OK, no closer to a solution,
I still end up jigging the player about when they stop to re-center them on the grid, it looks really wrong.

I'm a bit frustrated that Xith3D has no real avatar/camera etc classes. Surely moving a camera around is standard stuff that all games require... Yet there is no support for it.

Every thing seems such hard work, and I have to write everything myself. I know I should be ashamed but I'm considering moving to Dark Basic or something....
23  Java Game APIs & Engines / Xith3D Forums / Re: Moving the camera/player a fixed distance on: 2004-07-02 06:44:57
I'm very close to a solution...
Got the camera to move a fixed distance, just working on the rotating now.

I'll post a solution when I've done.
24  Java Game APIs & Engines / Xith3D Forums / Moving the camera/player a fixed distance on: 2004-07-01 17:40:54

I know I seem to be posting more questions than answers, hopefully that will change soon!

The requirement for my game is that the player (camera) moves set distances on a grid of 'cells' (to reproduce the movement on old games like Dungeon Master). I'm using a modified version of the MovementForce class I found as part of a Quake3 bsp demo (also used in the Maze3D demo) to move about.

A quick screen shot might explain what I'm on about

I've messed about all day trying to stop the force after moving a certain distance, the problem is I either end up overshooting that distance by some small ammount, this error adds up and up and I end up not in the center of my "grid" of cells anymore. No ammount of correcting helps this. I have no need for the CollisionSystem as I know if the character is going to hit a wall from the 2D map array I have.

I understand this is a very specific problem but any clues, the best way to move a character an exact set distance?

25  Java Game APIs & Engines / Xith3D Forums / Re: fullscreen? on: 2004-07-01 17:04:21

I noticed that Full Screen didn't actually fill the screen but simply removed the window borders, it'll only be "genuine" full screen if you set the resolution of your CanvasPeer to that of the desktop. Here's how I do it in my app

public static int SCR_WIDTH = 800;
public static int SCR_HEIGHT = 600;
public static final int SCR_DEPTH = 32;
public static final boolean SCR_FULL_SCREEN = false;

   Dimension scr_sz = Toolkit.getDefaultToolkit().getScreenSize();
   SCR_WIDTH = scr_sz.width;
   SCR_HEIGHT = scr_sz.height;            

RenderPeer rp = new RenderPeerImpl();
CanvasPeer cp = rp.makeCanvas(null, SCR_WIDTH, SCR_HEIGHT, SCR_DEPTH, SCR_FULL_SCREEN);

Hope that helps.
26  Java Game APIs & Engines / Xith3D Forums / Re: Simple Geometry Utils on: 2004-07-01 11:07:49
Thanks, for the reply I've managed to write something now, that suits my needs. I just used QuadArray.

I had a look at GeometryCreator and I didn't understand it, but I think I've got it now.

Here's a link to my class, it creates planes in one of the three orientations and the planes can be subdivided into smaller quads.

27  Java Game APIs & Engines / Xith3D Forums / Simple Geometry Utils on: 2004-06-30 13:30:49

I require some simple geometry utility classes for generating planes, cylinders etc. (planes to beging with)
I've tried the TestUtils class but all it can generate is one big quad as the plane, this is messing with my lighting Sad so I need to tesselate the plane into sub-quads or triangles.

I'm tying to write a class, what is the best Geometry class to use for this sort of thing (QuadArray, TriangleArray or something else)?
Are there any docs on the format that QuadArray and Triangle array expect their data?  Huh

If something exists out there to already do this I'd gladly use that! I can't be the first person to have required this...

28  Java Game APIs & Engines / Xith3D Forums / Re: Problem with PointLight on: 2004-06-30 06:02:02

I was simply using the X part (constant attenuation)
I didn't know Y, Z did anything!

I've changed to quadratic distance (Z) and it's looking a lot better, I need to play about with the values and the ambient light to get it looking 100% as I want.

Here's a new screen shot

Thanks a lot!
29  Java Game APIs & Engines / Xith3D Forums / Problem with PointLight on: 2004-06-29 20:55:28

I have been playing about with Xith3D for a couple of days writing a Dungeon Master clone, and I've got a tiny problem with using PointLight.

I have a PointLight at the same location as the View eye, which moves with the player (representing a torch carried by the player). I want this to only illuminate a small "pool" of light arround the player, the problem is that far away walls are still being lit brightly looking very odd. See this screenshot for details -

Any ideas how to prevent this? I've tried adding a BoundingSphere to the light and changing the attenuation but none of this has helped.

BTW - I know the graphics and math theory why this happening but I don't know how to stop it in Xith3D

Any help very much appreciated, cheers
Pages: [1]
deepthought (37 views)
2015-06-30 15:39:44

deepthought (41 views)
2015-06-30 15:39:09

deepthought (52 views)
2015-06-30 15:36:52

Za\'Anzabar (23 views)
2015-06-29 05:44:54

TritonDreyja (40 views)
2015-06-24 17:10:40

CopyableCougar4 (36 views)
2015-06-23 00:34:45

BurntPizza (42 views)
2015-06-21 20:36:46

cookiecompiler (85 views)
2015-06-11 15:42:53

cookiecompiler (48 views)
2015-06-11 15:41:14

NegativeZero (76 views)
2015-06-11 09:49:18
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14 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!