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.


Topics - KittenKoder

Pages: [1]
1
Support / Collision Problems
« on: December 01, 2012, 04:20:27 am »
Not sure if it's my code, or jPCT, as I still can't figure out exactly what's going on. But it only happens with scaled objects, almost as if the collision detection is scaled twice the object's scale. I'm using the ellipsoid detection, and the moving object is fine on objects scaled 1.0, it's any other scale value that has the effect. That's the best I can do to describe it. Any ideas?

2
Support / Normals in OBJ?
« on: November 28, 2012, 11:07:14 pm »
Just a quick question, if normals are included in the OBJ file, does jPCT use them or ignore them?

3
Support / Not jPCT Related
« on: November 21, 2012, 06:52:25 pm »
But, I'm hoping someone here knows it. I completely forgot as I have not used the technique in a long time, but there's a specific trick to loading a file that could be from either an applet or application and within a jar or not, in other words, loading the file with just the base dir/url and the loader not caring which it is.

I use to have this documented but since I haven't used it in a long time I lost it.  If I remember correctly using new File(filename) doesn't work in all situations.

4
Support / Need Advice
« on: November 12, 2012, 07:51:28 am »
Okay, I figured out that either jPCT or OpenGL doesn't like transparent objects. Tons of sorting errors and it eats CPU cycles, on the GL render. Since I'm too lazy to write my own graphics library for OpenGL I'm just going to work with it somehow. Which leads to two things I would like some recommendations on from the dev(s) of jPCT:

1. For texture animations, frame by frame update of the texture, would reassigning the texture each frame be more costly, or would using a TextureEffect and updating the texture's array each frame be more costly, when using jPCT?

2. Would using two worlds cost a lot? I notice that using two worlds versus one then switching visibility on the objects, has almost no difference in CPU cycles eaten, and the two different methods don't seem to have much of a difference in resource consumption from what I can see.

When I say cost I mean memory and CPU consumption. I don't know exactly how you coded the World class, so I'm not sure what it does exactly. Currently with the simple world, and almost no transparent objects, I can pump out 33 FPS with or without the GUI layer on top of it, using either technique. So unless there is a nuance that could kill an app I am considering going with the multiple world "layers."

5
Support / Fresh Veiw
« on: November 06, 2012, 07:17:50 pm »
Alright, I am literally stumped on this and would like some alternative ideas as to why it happens. Here's the code first:

Code: [Select]
public void moveInBounds() {
this.tempvector = this.object.getTransformedCenter(this.tempvector);
if(this.origin != null) this.tempvector.sub(this.origin);

if(this.bounds.x > 0.0f) this.tempvector.x = (this.tempvector.x < -this.bounds.x) ? -this.bounds.x :
((this.tempvector.x > this.bounds.x) ? this.bounds.x : this.tempvector.x);

if(this.bounds.y > 0.0f) this.tempvector.y = (this.tempvector.y < -this.bounds.y) ? -this.bounds.y :
((this.tempvector.y > this.bounds.y) ? this.bounds.y : this.tempvector.y);

if(this.bounds.z > 0.0f) this.tempvector.z = (this.tempvector.z < -this.bounds.z) ? -this.bounds.z :
((this.tempvector.z > this.bounds.z) ? this.bounds.z : this.tempvector.z);

if(this.origin != null) this.tempvector.add(this.origin);

this.object.clearTranslation();
this.object.translate(this.tempvector);
}

Now the problem is that when moving the object, then checking for if it's in bounds, the x and z directions work as expected, the object stops at the edge like there's an invisible wall. However the y acts funny, moving down(+) there's a bounce, and moving up(-) it takes a large value to pull it back down from the edge. I seriously have no idea why it's doing this, if anyone has an idea let me know.

The bounds are how far the object can move from it's origin, not the jPCT origin but the origin set for the actor.

6
Support / Get Object3D Rotation Matrix Question
« on: November 03, 2012, 08:33:25 am »
When you call the getRotationMatrix() method does it create a new matrix or return the actual rotation matrix of the object? If it creates a new one each call is there a way to access the actual one for read-only operations?

I am attempting to minimize the creation of Java objects per pass and I need a method of tracking the y rotation of an object for some animation methods, so this has been worrying me a bit.

7
Support / Nuance of object.animate(index, seq)
« on: November 03, 2012, 05:35:55 am »
I don't know if it was intended or not, I actually like it, but the index value of 1.0 is actually "just before" the first frame interpolated with the last frame and not actually the very last frame of the sub-sequence. The only reason I bring this up is that the documentation does not mention this nuance and it may be nice to have it included in there, honestly I think the nuance is important for smoother animations anyway.

I noticed it by trying to write a non-cycling animation sub sequence driver class, it looked like it would cycle even though it was ending on the last point. Took me a lot of annoying back checking and cross referencing to realize what was really going on.  Now the challenge of figuring out a way to accomplish a non-cycling animation efficiently, I love challenges though.

8
Projects / New Library And Game
« on: November 01, 2012, 01:27:12 am »
Alright, I am working on a project that's cyberpunk "hacking," I spent the last year practicing modeling in 3D just so I could do this one. OpenGL perplexed me, and developing a system from scratch was too tedious so I found jPCT, which is perfect for my needs. However for the game I am developing a library that includes:

1. Multilayer world system, one layer for a GUI, another for the game, and one in between for "x-ray" objects. There is a world manager than can clean out things owned by only one of the worlds, included textures not needed elsewhere if the extended texture manager is used.

2. A texture manager that incorporates the jPCT texture manager with a few lists for tracking the texture image. Texture image class can be a texture, buffered image, or both, and has a built in dynamic update. Textures can be "owned" by objects and/or worlds so when those are removed from the game the textures can also be removed with them using only one method call.

3. Texture "sequences" for more complex texture animations. A complete system for adding these to the extended object class, extended to accommodate a lot of game dependent data.

4. Texture "layering" the efficient way. The library uses the AWT GL Canvas, which has a few limitations. The layered texture class overcomes some of them by combining multiple buffered images into one new texture, it actually combines multiple buffered images then creates a texture from that.

5. A managed HUD system, pretty straight forward, for posting things like text to the player or meters, 2D elements and the like.

6. The world GUI system, which includes animation responses, an event binding system that is versatile yet easy to use with keyboard, mouse, or even game controller input, you can combine several for each binding allowing multiple ways for the player to access something if desired.

7. An actor system for managing objects, specifically animated objects used for characters.

8. An audio system that utilizes the Tritonus plugins.

I will hopefully have the working demo, and a set of example programs, very soon. The demo will be the game demo as well. The jPCT extension library is dependent on my dev-libs, which includes a Canvas 2D GUI system as well, though it's basic it has some useful features and widgets focused on games.

My standard library, I often call my dev-lib.
http://www.java-gaming.org/user-generated-content/members/130380/kittstandard-v0-1.jar

The jPCT extension, requires jPCT of course, as well as Tritonus plugins for some audio formats, wav is supported directly by Java so if you don't use any other formats you don't need Tritonus.
http://www.java-gaming.org/user-generated-content/members/130380/jpctkitt-v0-1.jar

Edit: Thank you for moving it to the correct location.

Pages: [1]