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

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:
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.setAmbientLight(new Color(30, 30, 30));

But I did not use GLSLShaders.

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?

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.

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

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]
at paulscode.sound.SoundSystemJPCT.tick(
at graphic.Graphic3DController.update(

And at the beginning there is this exception:
Code: [Select]
Initializing LWJGL OpenAL
    (The LWJGL binding of OpenAL.  For more information, see
Error in class 'LibraryLWJGLOpenAL'
    Unable to initialize OpenAL.  Probable cause: OpenAL not supported.
        Could not locate OpenAL library.
        Could not locate OpenAL library.

Starting up SoundSystemJPCT...
Switching to Java Sound
    (The Java Sound API.  For more information, see
JavaSound initialized.

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

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


Edit: Wrong language ;D

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.

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 ( / 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) {

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

I don't set any Attenuation, should I do this?
For example I use this file:


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.

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) {
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?

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

Code: [Select]

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

Projects / Re: 3D Sound System
« on: February 01, 2012, 11:23:11 pm »
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!

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.

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:

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.

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