Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (117)
games submitted by our members
Games in WIP (564)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Bugs in JOAL Sound?  (Read 1931 times)
0 Members and 1 Guest are viewing this topic.
Offline ruoat

Junior Newbie





« Posted 2006-10-30 19:41:04 »

Hi all,
I have used xith3d for about two years to build a game. I think I have found some bugs and done some private fixes. Nowadays when you guys are doing heavy modifications to code I would like fixes to be put directly to xith3d version control so I do not need to fix these manually every time I get a new build.  Wink

I think one bug is in JOALSoundDriverImpl.java:
1  
2  
3  
4  
5  
6  
7  
 public void setListenerOrientation(Tuple3f direction, Tuple3f up) {
  208
  209         al.alListenerfv(AL.AL_ORIENTATION,new float[]{direction.z, direction.y, direction.z,
  210         up.x,up.y,up.z});
  211
  212         // To change body of implemented methods use Options | File Templates.
 213     }


First direction.z should be direction.x:
1  
2  
  209         al.alListenerfv(AL.AL_ORIENTATION,new float[]{direction.x, direction.y, direction.z,
  210         up.x,up.y,up.z});


As a side effect sound directions are not not working correctly. In my game player is looking to -Z coordinate. After fixing the alListenerfv-call sounds are coming from wrong direction. I have had to do this in View.java
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
private void updateSound() {

        getTransform().get(listenerPosition);
        listenerOrientation.set(1,0,0);
        Matrix3f m = new Matrix3f();
        getTransform().getRotation(m);
        m.transform(listenerOrientation);
        listenerOrientation.normalize();
        listenerOrientation.set(0, 0, -1);        // NOTE! Set orientation manually. Otherwise direction is somehow wrong!
       soundDriver.setListenerOrientation(listenerOrientation, new Vector3f(0,1,0));
        soundDriver.setListenerPosition(listenerPosition);
    }

I noticed that in SVN this logic is moved to SoundProcessor.java. Do you guys have had issues with sound orientation with JOAL?

Another problem in JOALSoundDriverImpl.java is:
1  
2  
  185         System.out.println("Making sound context current");
  186         alc.alcMakeContextCurrent(context);


When I call soundDriver.shutdown(); execution hangs in the line 186. To get JOAL working I have had to comment the line out. I am not sure if this is bug in xith but I have not got it working otherwise Smiley

Currently I have not bothered to do those changes in local xith3d sources but fixed them inside the game extending base classes and creating FixedView, FixedJOALSoundDriver, FixedJOALSoundSourceImpl etc. Now I have noticed that there are all kinds of new functionality added like Xith3DEnvironment and HUD. When using those Fixed<blah blah> classes usage of new functionality is harder. It would be great if someone could check if there really is bugs in xith3d and fix them with the help of my code snippets. Cool

-ari
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #1 - Posted 2006-10-30 19:43:21 »

First ruoat, it's really cool to have you here !

What kind of game are you working on ? Can we play/have screenies ?

Do you want SVN access for xith3d & xith-tk ?

I do not have the time to review your changes right now but as of tomorrow I'll do the required changes. (I have digged sound support, see rafa_es game)

One more time, really great to have you here.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline ruoat

Junior Newbie





« Reply #2 - Posted 2006-10-30 20:08:12 »

Hi Amos,
thanks for the interest. Smiley There is one screenshot in http://atr.dy.fi/~atr/aos/. The game can also be played using web start or downloaded. Even though I have developed it so long time the game is still very immature. But basic dogfight should be able to be played in multiplayer.
Too bad I have so few time that I would like to develop my game more instead of contributing much to xith3d. I appreciate your hard work but I like to be like a parasite who enjoys other's work doing nothing itself Tongue

-ari
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #3 - Posted 2006-10-30 20:08:51 »

Welcome to the forum Grin.

I have used xith3d for about two years to build a game. I think I have found some bugs and done some private fixes. Nowadays when you guys are doing heavy modifications to code I would like fixes to be put directly to xith3d version control so I do not need to fix these manually every time I get a new build.  Wink

Isn't it always better to commit the fixes to the original code base? That's Open Source, isn't it?

Marvin

EDIT: Do you have more bugs fixed? If so, please share your fixes.
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #4 - Posted 2006-10-31 12:59:46 »

Hi Amos,
thanks for the interest. Smiley There is one screenshot in http://atr.dy.fi/~atr/aos/. The game can also be played using web start or downloaded. Even though I have developed it so long time the game is still very immature. But basic dogfight should be able to be played in multiplayer.
Too bad I have so few time that I would like to develop my game more instead of contributing much to xith3d. I appreciate your hard work but I like to be like a parasite who enjoys other's work doing nothing itself Tongue
That's not a problem. Your game seems cool, would you want it to be mentioned on http://www.xith.org/ "Featured Projects" page ?

I have used xith3d for about two years to build a game. I think I have found some bugs and done some private fixes. Nowadays when you guys are doing heavy modifications to code I would like fixes to be put directly to xith3d version control so I do not need to fix these manually every time I get a new build.  Wink
Isn't it always better to commit the fixes to the original code base? That's Open Source, isn't it?
I guess some people believed once that Xith3D was dead and they all had their local homemodified version. But more and more are coming back with their fixes and that's fine.

EDIT: Do you have more bugs fixed? If so, please share your fixes.
+1

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline ruoat

Junior Newbie





« Reply #5 - Posted 2006-10-31 15:22:45 »

Isn't it always better to commit the fixes to the original code base? That's Open Source, isn't it?
EDIT: Do you have more bugs fixed? If so, please share your fixes.
Yes I agree. I posted my modifications here because I would like you to review my changes and not just commit something to SVN and possibly break other things. I am not very familiar with xith internals and have been concentrating to game logic instead. I don't have any other fixes. Some Fixed<something> classes (like FixedJOALSoundSourceImpl) are basically just copy pasted code with new name to get rid of issues caused by extending xith3d classes.
Because I am not familiar with xith internals maybe someone could know what's wrong with updateSound after fixing the setSoundOrientation. The change in my version is not suitable to be put in version control, because of just manual setting
1  
listenerOrientation.set(0, 0, -1);
. That would work with my game, but someone other's game might break. Smiley

And someone might know what consequences of skipping the call alc.alcMakeContextCurrent(context); has.

That's not a problem. Your game seems cool, would you want it to be mentioned on http://www.xith.org/ "Featured Projects" page ?
Thanks, but I think the game is not yet ready for public. Smiley

-ari
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #6 - Posted 2006-10-31 16:07:03 »

Yes I agree. I posted my modifications here because I would like you to review my changes and not just commit something to SVN and possibly break other things. I am not very familiar with xith internals and have been concentrating to game logic instead. I don't have any other fixes. Some Fixed<something> classes (like FixedJOALSoundSourceImpl) are basically just copy pasted code with new name to get rid of issues caused by extending xith3d classes.
Because I am not familiar with xith internals maybe someone could know what's wrong with updateSound after fixing the setSoundOrientation. The change in my version is not suitable to be put in version control, because of just manual setting
1  
listenerOrientation.set(0, 0, -1);
. That would work with my game, but someone other's game might break. Smiley
OK. The listener-orientation thingy also seemed strange to me. It's surprising that it won't work correctly when you compute it from point-of-view.

And someone might know what consequences of skipping the call alc.alcMakeContextCurrent(context); has.
Will test it if I have time.

Thanks, but I think the game is not yet ready for public. Smiley
So I think, but look my game project (Stratagem) appears on Xith.org yet it's really not ready for public. Remember xith.org is primarily a developer place. Who knows some developer finding your project cool could contact you and contribute?
And second, it demonstrates that some people actually use Xith3D.. and that attracts more developers and so it's 100% advantage for you ^^

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

Grunnt (20 views)
2014-09-23 14:38:19

radar3301 (14 views)
2014-09-21 23:33:17

BurntPizza (31 views)
2014-09-21 02:42:18

BurntPizza (22 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (29 views)
2014-09-20 20:14:06

BurntPizza (33 views)
2014-09-19 03:14:18

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

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

TehJavaDev (108 views)
2014-09-10 06:39:09
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!