Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (481)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (548)
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 - http://www.fmod.org/
Java version - http://topresult.tomato.co.uk/~jerome/

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
Ok,

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...
1  
2  
3  
4  
5  
6  
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 http://cgi.bencoleman.plus.com/tiki/tiki-index.php?page=DungeonEngine

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

Ben
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 http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;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
Hi,

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

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
TextureUnitState tu0 = new TextureUnitState((Texture2D) TextureLoader.tf.getMinMapTexture("floor.jpg"), null, null);
TextureUnitState tu1 = new TextureUnitState((Texture2D) TextureLoader.tf.getMinMapTexture("test.png"), null, null);
TextureAttributes ta0 = new TextureAttributes();
ta0.setTextureMode(TextureAttributes.MODULATE);            // Mode needs changing???
tu0.setTextureAttributes(ta0);
TextureAttributes ta1 = new TextureAttributes();      // Mode needs changing???
ta1.setTextureMode(TextureAttributes.BLEND);
tu1.setTextureAttributes(ta1);

// ????
// 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

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

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
Hi,

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
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
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);
  to
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)

Ben
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
1  
2  
3  
4  
5  
6  
        Material matt_basic = new Material();
        matt_basic.setAmbientColor(1f, 1f, 1f);  ;
        matt_basic.setDiffuseColor(1f, 1f, 1f);            
        matt_basic.setShininess(0.00f);
        matt_basic.setSpecularColor(0.00f, 0.00f, 0.00f);
        matt_basic.setLightingEnable(true);
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
Hi,

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.

Cheers
Ben
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"
1  
2  
3  
4  
        
Toolkit tk = Toolkit.getDefaultToolkit();
Cursor cursor = tk.createCustomCursor(tk.getImage("flask.png"), new Point(0, 0), "blah");
canvas_peer.getComponent().setCursor(cursor);


Ben
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,
Ben
19  Java Game APIs & Engines / Xith3D Forums / Mouse cursor/pointer problem on: 2004-07-07 20:06:57
Hi,

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

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


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 http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;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....

Thanks
Ben
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
Hi,

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.

Thanks,
Ben
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
Hi,

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?

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

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

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
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;

if(SCR_FULL_SCREEN) {
   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.
http://cgi.bencoleman.plus.com/files/PlaneGenerator.java

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

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...

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

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
Hi,

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
Ben
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.

atombrot (27 views)
2014-08-19 09:29:53

Tekkerue (25 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (15 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (61 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
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!