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

Pages: [1]
1
Support / Lensflare help
« on: November 19, 2011, 09:50:03 pm »
Hi,
Im having trouble getting a simple lensflare to work and Im hoping somebody can help me since I must be missing something simple...

I initialize my flare when im setting up my world (adding objects, lightsources etc). I use the following line

flare = new LensFlare(sun.getPosition(), "test", "test", "test", "test");

Then in my method to render my scene, I am calling two different things on the lensflare

private void renderScene() {

      frameBuffer.clear();
      world.renderScene(frameBuffer);
      flare.update(frameBuffer, world);
      flare.render(frameBuffer);
      world.draw(frameBuffer);

      renderBlits();
      frameBuffer.display();
}

I have added a texture called test to the texturemanager so I can just test this lensflare before i go worrying about using nice images.

I am however seeing nothing! The camera is always moving so thats why im calling update on the flare. The camera itself is always approximately 40 units away from the flare position and Im calling no other methods on the flare - just what you see above.

Any ideas?

Thanks.

2
Support / transformVertices null pointer
« on: March 13, 2011, 02:41:37 am »
Hi, I'm currently getting a seemingly random intermittent null pointer exception at com.threed.jpct.Object3D.transformVertices(Object3D.java:6254) when Im attempting to render a scene. I can do the same thing a few times and this occurs sometimes but not most of the time. Have you any idea what the cause of this is or why the error seems to be random?

Thanks

3
Support / Frame rate issue
« on: March 03, 2011, 12:31:17 am »
Hi,

Im currently working on a simple game to try to get familiar with jpct-ae but Im having a problem with my frame rate.
It generally runs at about 55-60 frames a second but every now and then it drops to 35-40 and I can see in the logs that its being caused by java doing a garbage collection (which seems to be forced upon me). 35-40 frames a second would be sufficient for the whole game but when it goes up and down randomly it feels very glitchy - the user would definitely see the slowdown for the moments when it drops.

So does anybody know of any way to make this smoother? Perhaps a way to limit the number of frames per second to 40? Or is there a better way to control speed? At the moment the games speed is based entirely on frame rate but it would be better if i cant limit the frame rate to have those frames skipped and ensure that all objects are where they should be based on the real speed. Im not sure if im explaining this well enough but any help would be appreciated.

Many thanks.

4
Support / Menu System
« on: February 24, 2011, 02:33:56 pm »
Hi,

for an android game what do people suggest is the best way to create a menu system?

1) A separate android activity with button widgets etc (isolated from jpct-ae)
2) Blitting a full menu via jpct-ae
3) 3d objects with a camera facing them head on
4) Any other suggestions?

Im not looking for any example code or anything like that, Im just curious as to what is the general method for developing a menu system for a jpct-ae game so that I can start investigating that method without wasting time on something which people may know to be a dead end.

Many thanks

5
Support / skybox in jpct-ae
« on: February 24, 2011, 01:37:07 pm »
Hi,

First of all, I only starting using jpct-ae about 3 weeks ago but I want to thank you Egon for developing this library - it is absolutely awesome!

Now, I am trying to write a simple game for android at the moment but I noticed that the framerate for my prototype to date was running at around 30fps on a 1ghz phone so I spent some time trying to optimize it. I have it running at 50fps now after some work but I find that if i remove my skybox from the world (or fog it out) then the fps jumps to 60. So it seems that the skybox is really hurting my framerate.

My approach to the skybox is :
1) Modeled a cube in blender and flipped the normals on the faces of the cube so that the textures will render on the inside
2) Exported the cube as 3ds file - i did not texture the cube in blender.
3) load the 3ds into the world (same world as the rest of the game, not a seperate world like in one of the demos) and used setTexture method to put the same jpg on each of the faces.

This renders well and does what i would like but its the framerate that bothers me.

Is this being caused by the fact that I have a massive cube and the textures are being stretched across the faces of the cube?

What would be a better approach?

I have one or two other questions but I will post them separately so that any answers will be easier to find for others who encounter the same issues.

Thanks in advance.

Any help would be appreciated. Thanks.

Pages: [1]