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

Pages: [1] 2 3 ... 58
Support / Countering visual y-offset from depth
« on: April 11, 2013, 04:53:59 pm »
I recall seeing a thread about this, but wasn't able to find it (and I apologize for using the wrong terminology).  I am looking for a way to counter the effect of the 2D y-position of an object changing the further away it is from the camera.  I drew up a simple diagram of where I'll be using this (this is an overhead view):

Note that this represents just one screen -- the full world will be longer, and the camera will move horizontally to follow the character.  The idea is to have a simulated 2D world with 3D characters and 2D billboarded objects in the background.  The visual y-offset with this setup causes the trees to float up off the ground the further away they are (which would be the desired behavior in a fully 3D world but not in a 2D world).  A couple of ways I could counter this:

- Apply a formula to modify an object's y position based on it's distance (I'm not sure what formula to use)

- Use reproject2D3DWS to calculate the furthest two corners of a "ground polygon", and snap the background objects to it

Any thoughts on the best route to go?

Support / Re: exception in Object3D.rotateMesh on OUYA
« on: March 23, 2013, 07:50:36 pm »
Here are a couple more stack traces I got that were slightly different:

Code: [Select]
03-23 18:31:44.762: W/System.err(1291): java.lang.ArrayIndexOutOfBoundsException: length=11; index=12
03-23 18:31:44.762: W/System.err(1291): at com.threed.jpct.Vectors.addVertex(
03-23 18:31:44.762: W/System.err(1291): at com.threed.jpct.Object3D.setBoundingBox(
03-23 18:31:44.762: W/System.err(1291): at com.threed.jpct.Object3D.calcBoundingBox(
03-23 18:31:44.762: W/System.err(1291): at com.threed.jpct.Object3D.rotateMesh(
03-23 18:31:44.762: W/System.err(1291): at raft.jumpy.view.Particle.<init>(
03-23 18:31:44.762: W/System.err(1291): at raft.jumpy.view.ParticleManager.<init>(
03-23 18:31:44.762: W/System.err(1291): at raft.jumpy.view.GameView.<init>(
03-23 18:31:44.762: W/System.err(1291): at$
(index was 12 instead of the typical 11, in case that's significant)

Code: [Select]
03-23 18:32:34.692: W/System.err(1291): java.lang.ArrayIndexOutOfBoundsException: length=11; index=11
03-23 18:32:34.692: W/System.err(1291): at com.threed.jpct.Mesh.rotateMesh(
03-23 18:32:34.692: W/System.err(1291): at com.threed.jpct.Object3D.rotateMesh(
03-23 18:32:34.692: W/System.err(1291): at raft.jumpy.view.Particle.<init>(
03-23 18:32:34.692: W/System.err(1291): at raft.jumpy.view.ParticleManager.<init>(
03-23 18:32:34.692: W/System.err(1291): at raft.jumpy.view.GameView.<init>(
03-23 18:32:34.702: W/System.err(1291): at$

Feedback / Re: Using jPCT-AE in my app training course
« on: October 14, 2012, 07:58:48 pm »
Yes, I wasn't sure how much enthusiasm it would generate, since there weren't any training course projects like it for comparison (and its my first kickstarter campaign). Its tracking about 50% of what I was shooting for.  I have a few more tricks up my sleeve to boost the support, but if it isn't successful I'll just break the project down into two smaller pieces: firstly an e-book project, to create the course book as an e-book (and a much smaller funding goal), then a second campaign a few months later for the remainder (tests, answer key, printing, etc).

Feedback / Re: Using jPCT-AE in my app training course
« on: October 14, 2012, 07:04:02 pm »
I'm thinking of doing a 3D pacman-clone for this section.  The good thing about this idea is that it could be done in 2D in an earlier chapter, then the chapter on jPCT-AE can focus on using the engine without worrying about the backbone components of the game.

Feedback / Using jPCT-AE in my app training course
« on: October 11, 2012, 05:07:18 am »
Hello, everyone, I haven't posted on here in a while (been busy with my other projects).  My latest project is to create a training course on how to write Android apps. It will be a complete training course with a course book, exercises, quizzes, test booklet, and answer key, as well as a companion website and support forum. It will be geared toward anyone who is interested in learning how to write professional Android apps, whether they have prior programming experience or not.

Each new topic will first be related to real-world concepts, so they can be understood more easily. Then those concepts will be applied to create a practical, interesting demo app for each subject. By the end of the course, the student will have created several of these demo apps, that they can show off to their friends or potential employers.

What I want to do for the final chapter of the course book (the ultimate goal of the course, if you will), is to teach the student how to write a simple 3D demo game, using jPCT-AE.  With that in mind, does anyone have any suggestions on what that demo game should be, and any suggestions of important points to make for the student in this chapter?

I've also set up a kickstarter campaign to help fund the project, to cover the printing costs and compensate for the time I put into it.  Feel free to comment on there as well, if you have useful suggestions for the project.

(BTW, I don't mean this post to be a kickstarter ad -- I'll remove the above link if it is breaking the forum rules)

Projects / Re: Simple Animated Texture Interface
« on: February 19, 2012, 02:49:19 pm »
No problem, sorry for the delay.  My main PC crashed yesterday (haven't determined the cause yet), so it might be a few days until I have everything back up and running to work on this.

Projects / Re: Simple Animated Texture Interface
« on: February 18, 2012, 03:21:28 am »
Haha, sorry got side-tracked.  I'll do this tomorrow :)

Projects / Re: 3D Sound System
« on: February 10, 2012, 10:31:28 pm »
I play sounds from the menu, but then I call quickPlay() without an Object3D.
You should be fine as long as sounds aren't queued to play after the call to cleanup.  I'm not sure what would be causing that crash.  I can't seem to replicate it on my computer.

Is it possible to play mp3s as background music via your SoundSystem as well?
There is no mp3 codec plugin at the moment (must use the .ogg format instead)

Projects / Re: 3D Sound System
« on: February 10, 2012, 11:33:55 am »
Yes, your name is written and it should clean up successfully.
By the way... is it possible to deactivate any console output?
You can deactivate the console output by creating a minimal extension of the Logger class with all the printing methods overridden (take a look at the sourcecode to see which methods).  If cleanup is completed successfully, I'm not sure what would be causing that crash.  You aren't trying to play any other sounds (like in the menus or on exit)?

Projects / Re: 3D Sound System
« on: February 09, 2012, 05:08:52 am »
I haven't seen that error before.  Do you know if cleanup is able to successfully finish before that error appears? (it should print a short blurb into the console stating I am the author once cleanup is complete)

Projects / Re: 3D Sound System
« on: February 08, 2012, 12:36:01 am »
Oh, ok.  It is a problem with JavaSound then.  Oracle has royally screwed up JavaSound in recent versions by their decision to remove the "Java Sound Audio Engine" software mixer (requiring developers to choose one of the hardware mixers, which are all different with different capabilities for different sound cards).  I'm in the process of writing my own software mixer, but it will probably be some time before it is complete (I don't have much free time for programming any more, and what little I do have I am busy working on my N64 emulator project).  In the mean time, I would suggest using OpenAL, as it is more reliable (used to be JavaSound was more reliable, but not any more).

For the native OpenAL library, it ships with LWJGL (which I assume your application is using since you are writing it for jPCT, unless you are going with the software renderer)  It is included with all the other native libraries.

Projects / Re: 3D Sound System
« on: February 07, 2012, 10:27:58 pm »
Code: [Select]
at paulscode.sound.SoundSystemJPCT.tick(
at graphic.Graphic3DController.update(
Aha, I can see that if it is hitting the exception at the beginning of the loop, then the subsequent source positions wouldn't get updated.  This most likely is the cause for your sounds not panning.  I'll see if I can verify that this is what's happening, and fix the problem if it is.  I'm not sure why the null pointer exception is happening in the first place, though.  This used to happen when using quickPlay, because I wasn't making sure when a temporary source is destroyed, that it gets removed from any objects it is bound to.  I thought I had fixed this problem, but I'll take another look at the code to see if I missed something.  Could be a thread synchronization problem.

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.

Do you get that same exception with the applet?  Make sure the OpenAL native library is on your system somewhere.

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();
With SoundSystemJPCT you do not need the calls to addLibrary and setCodec (these are done automatically in the background when you instantiate the SoundSystemJPCT object -- those calls are only a requirement for the core SoundSystem library).  That being said, even though calling these again is redundant, it shouldn't have any negative effects.

Since your problem is happening in JavaSound, I re-uploaded that test applet using JavaSound instead of OpenAL, just to make sure the problem isn't there.  The above link is the same.

Projects / Re: 3D Sound System
« on: February 07, 2012, 01:48:52 am »
Ok, I rigged up one of my old applets.  Let me know if you hear/ don't hear the panning between left/ right speakers as the camera rotates in place:

Panning Test Applet

Projects / Re: 3D Sound System
« on: February 07, 2012, 12:37:34 am »
Hmm.. it seems to pan ok on my computer.  Let me write a quick test applet for you to run, to rule out a hardware-related issue.

Projects / Re: 3D Sound System
« on: February 07, 2012, 12:27:31 am »
By default, it should use ATTENUATION_ROLLOFF, so if you aren't changing it that shouldn't be the problem.  I downloaded your file and will do some tests.  I'll let you know what I find.

Pages: [1] 2 3 ... 58