Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Marlon

Pages: 1 [2] 3 4 5
16
Support / Re: fire explosion effect
« on: February 08, 2012, 02:40:24 pm »
2. The color of the actual .jpg is yellow.But when I added along with the car example, the color of the texture is changed to violet, ie it is taking the color of the Car.I am not able to figure out why this is happening.I have not manually instructed to change the color to violet.

Cool, I just made an explosive effect for my game yesterday. :)
To anwer your second question. Search your code for "setAdditionalColor()". I suppose, that you are filling your particle with an extra color.

17
Projects / Re: 3D RPG example application
« on: February 08, 2012, 12:51:01 pm »
did you use GLSL shader one?

Please take a look at this JPCT Example:
http://www.jpct.net/wiki/index.php/Advanced_example
I used it to create a basic version and to learn the first steps of JPCT.

Here is the shader:

Code: [Select]
private ShadowHelper sh = null;

Code: [Select]
sh = new ShadowHelper(world, buffer, projector, 2048);
sh.setCullingMode(false);
sh.setAmbientLight(new Color(30, 30, 30));
sh.setLightMode(true);
sh.setBorder(1);

But I did not use GLSLShaders.

18
Projects / Re: 3D Sound System
« on: February 08, 2012, 01:35:45 am »
Thanks for your tipps and your help!

I am planning to release a first 3D Test Version for my game Forgotten Elements very soon (probably this week).
Yes, you're right, I am using JPCT and the hardware renderer.
So you suggest to use SoundSystemJPCT and provide the OpenAl version for the players, who download the game?

19
Projects / Re: 3D Sound System
« on: February 07, 2012, 10:40:41 pm »
Oh I only downloaded the OpenAl jar, that you provided.
What OpenAl file(s) should I take? I want other users (which run my code) automatically download this file.

I just tested the new applet you uploaded.
Mhhh.. the sound is panned in the middle, no 3D effect.

20
Projects / Re: 3D Sound System
« on: February 07, 2012, 09:53:19 pm »
...ein bisschen sehr in Deutsch, oder ???

Bamm... OMG... fortunately I am only speaking 2 languages... Sorry for wrong language.  :-[
But its edited already... ;)

21
Projects / Re: 3D Sound System
« on: February 07, 2012, 09:05:03 pm »
Wow! First I have to say thank you! And its great that you posted a demo applet!
The Applet is running and 3D Sound working.
Its like the wheels are rotating around my head. :)

But: It's still not running with my code. The sound always has the same volume and panning and then (20 Sounds later) there is an exception:
Code: [Select]
java.lang.NullPointerException
at paulscode.sound.SoundSystemJPCT.tick(SoundSystemJPCT.java:270)
at graphic.Graphic3DController.update(Graphic3DController.java:708)

And at the beginning there is this exception:
Code: [Select]
Initializing LWJGL OpenAL
    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
Error in class 'LibraryLWJGLOpenAL'
    Unable to initialize OpenAL.  Probable cause: OpenAL not supported.
    ERROR MESSAGE:
        Could not locate OpenAL library.
    STACK TRACE:
        org.lwjgl.openal.AL.create(AL.java:151)
        org.lwjgl.openal.AL.create(AL.java:102)
        org.lwjgl.openal.AL.create(AL.java:201)
        paulscode.sound.libraries.LibraryLWJGLOpenAL.init(LibraryLWJGLOpenAL.java:164)
        paulscode.sound.SoundSystem.CommandNewLibrary(SoundSystem.java:1576)
        paulscode.sound.SoundSystem.CommandQueue(SoundSystem.java:2572)
        paulscode.sound.CommandThread.run(CommandThread.java:121)
    ERROR MESSAGE:
        Could not locate OpenAL library.

Starting up SoundSystemJPCT...
Switching to Java Sound
    (The Java Sound API.  For more information, see http://java.sun.com/products/java-media/sound/)
JavaSound initialized.


I am initializing this way:
Code: [Select]
public void initSoundSystem() {
        try
        {
            // add some plug-ins:
            SoundSystemConfig.addLibrary( LibraryLWJGLOpenAL.class );
            SoundSystemConfig.addLibrary( LibraryJavaSound.class );
            SoundSystemConfig.setCodec( "wav", CodecWav.class );
        }
        catch( SoundSystemException e )
        {}
soundSystem=new SoundSystemJPCT();
SoundSystemConfig.setSoundFilesPackage("");
}

At the end I call cleanup(), to avoid dead instances.

Marlon

Edit: Wrong language ;D

22
Projects / Re: 3D RPG example application
« on: February 07, 2012, 08:15:25 pm »
Wow this is one of the best demos ive seen imo.  How did he get the shadows like that did he actually use shaders or did he use some tricks?

Thanks for your words! I just used the shader technique from the JPCT Advanced Example.

23
Projects / Re: 3D Sound System
« on: February 06, 2012, 10:45:31 pm »
I didn't mean to insult your intelligence, but I can't even count how many times that question has been asked from folks using stereo files.

No problem, I can understand that.
I wrote an own engine for my game (www.forgottenelements.com / still in 2D) and pan the sound depending on where the enemies are located. Because I am transforming my game to a 3D game and use JPCT I thought about using your Library also.

When I initialize the JPCT Camera I use the following code:
Code: [Select]
if(SoundController.getInstance().getSoundSystem()!=null) {
SoundController.getInstance().getSoundSystem().bindListener(cam);
}

Every Frametick I use this code:
Code: [Select]
if(SoundController.getInstance().getSoundSystem()!=null) {
SoundController.getInstance().getSoundSystem().tick();
}

I don't set any Attenuation, should I do this?
For example I use this file:
www.forgottenelements.com/appletcontent/sound/misc/questcomplete.wav

Thanks,
Marlon

24
Projects / Re: 3D Sound System
« on: February 06, 2012, 07:54:20 pm »
Of course my file is mono (I use it at Forgotten Elements 2D already). Only the background music is stereo.

25
Projects / Re: 3D Sound System
« on: February 06, 2012, 06:22:02 pm »
Thanks for your answer.
Actually... I got it running.

If I use
Code: [Select]
String path=System.getProperty("user.home")+"\\forgottenelements\\appletcontent\\sound\\"+type+"\\"+name+".wav";
if(soundNotLoaded(path)) {
try {
soundSystem.loadSound(new File(path).toURL(), path);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
soundSystem.quickPlay(path, false, vec);

... the sound gets loaded correctly and it is played.
But... the problem is that the sound always is panned the same (I can hear the same sound with the same volume on each speaker).
For the position of the sound I use a 3D object.
It seems that there is no 3D effect. Mhhh... did I do something wrong?

26
Projects / Re: 3D Sound System
« on: February 02, 2012, 12:25:07 am »
Have you set

Code: [Select]
SoundSystemConfig.setSoundFilesPackage("");

? I don't know if one has to, but i did in Robombs and i had no problem loading files from disk.

I already set this, but without success. :(
I checked the Robombs source code, but it seems that there sound files are loaded with relative paths?

Any other tipps?

27
Projects / Re: 3D Sound System
« on: February 01, 2012, 11:23:11 pm »
Hello!
I want to use SoundSystemJPCT for my game and I wonder if I can play a wav file, which is stored at a fix position on my hard drive.
I do not want to compile a sound file into a jar, I want to play it while using an absolute path to this file.

For example: If I use this code:
Code: [Select]
String path=System.getProperty("user.home")+"\\forgottenelements\\appletcontent\\sound\\"+type+"\\"+name+".wav";
soundSystem.quickPlay(path, false, vec);

I get the following error:
Code: [Select]
Error in class 'LibraryJavaSound'
    Unable to open file 'C:\Users\Marlon\forgottenelements\appletcontent\sound\misc\queststart.wav' in method 'loadSound'

I searched with the help of google, I searched in this forum, but I couldn't find anything useful.

Thanks in advance!
Marlon

28
Support / Re: Rotation Issue
« on: February 01, 2012, 03:53:32 pm »
1) I want to rotate an object along the Y axis around its center. Most of the time that's not a problem, but it sometimes is.
...
3) Also not the case, as the object has to contantly spin.

I think this is the case. If you want to constantly spin your object (like a wheel), just call Object3D.rotateY(small float value) every frame and watch the wheel spinning.

Sorry, when I totally miss the point, but with the help of this method I created spinning objects with success.

29
Support / Re: Shaders and gouraud shading
« on: February 01, 2012, 03:40:19 pm »
I had exactly the same problem some weeks ago.
Take a look: http://www.forgottenelements.com/wallcompare.jpg

I found out that there are 2 solutions for me to solve this problem:
1. increase the face count of a box, so that it gets a higher resolution.
2. deactivate lighting for the box: Object3D.setLighting(LIGHTING_NO_LIGHTS);

I hope that helps.

30
Support / Re: Rotation Issue
« on: February 01, 2012, 03:28:56 pm »
I don't get your problem here.
1. What do you want to achieve? Do you want to rotate around the Y Axis?
2. I had similar problems with the PivotPoint. While debugging my program the PivotPoint was always set to (0,0,0). Sometimes I get confused with object and world space and different matrixes.
3. When I use rotateY() on a desired object, it works. When I want to rotate with an absolute value I use object3D.clearRotation() and then object.rotateY().

Pages: 1 [2] 3 4 5