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

Pages: [1] 2 3 ... 14
Bones / Re: Hardware skinning needed
« on: June 23, 2014, 05:18:12 am »
Cool~ Would you like to share it when you done? This will give  others(include me  ;) ) a lot of help.

Support / Could you add some useful math functions?
« on: March 19, 2014, 07:05:19 am »
1, To optimize the comparing of the length of vector:
    SimpleVector.length()^2; SimpleVector.distance()^2

2, For animation、camera moving 、physic simulation and so on:
   Interpolation - linear、sin、pow、slerp and so on.

3, For animation、rotation Interpolation:

Support / Should I use etc1 or Texture.defaultTo4bpp(true)
« on: March 06, 2014, 12:30:45 pm »
My purpose is for reduce memory usage\texture bandwith.

Which one is better?(for performance\memory usage\generation time\visual quality\compatibility and so on). - Assume the texture doesn't have alpha.

The shaders exist in 2 locations, one is, the other is jPCT-AE.jar, I found some of them are not the same: defaultFragmentShaderTex1.src、defaultFragmentShader.src.

News / Re: Version 1.28 has been released!
« on: March 06, 2014, 03:08:39 am »
Cheer! ;D

Support / Got black texture when using mulit textures
« on: February 13, 2014, 01:14:55 pm »
Code: [Select]
//first use 1 texture

//after a while, use 2 to blending
int id = TextureManager.getInstance().getTextureID("car_1");
int id2 = TextureManager.getInstance().getTextureID("car_2");
TextureInfo info = new TextureInfo(id);
info.add(id2, TextureInfo.MODE_MODULATE);

I have the same issue in my game. You can use the android's tools which called "Allocation Tracker" to see the detail of memory allocations.

Providing a method with some params of  buffer which are provided and managed by user could be a choice. But I hope there could be an internal improvement without damaging the current clean & simple api-designs.

Support / Re: glError 1280 on Android 4.2
« on: December 14, 2013, 06:00:09 am »
Setting "Config.internalMipmapCreation = true" resolve it, thanks.

I want to always set this option to true in order to support most devices, but I don't know if there is any disadvantages than GPUMipmapCreation(such as loading time、memory usage\peak、performance and so on).

Could you tell me why choose this coordinates system instead of a GL-like system?

Support / Re: Sometimes my game suddenly gets a heavy fps dropping.
« on: December 12, 2013, 10:07:38 am »
This may be the reason, I will check it, thanks!

Support / glError 1280 on Android 4.2
« on: December 12, 2013, 08:05:12 am »
My game crashes on Android 4.2(test with only one device who has a heavily customized system based on Android 4.2), but runs well on other versions(2.3 - 4.4).

First, seems the engine can't find the default shader-files in jar, so I push all sharder-files into a zip named "", and put it in "assets" of project, then call
Code: [Select]
GLSLShader.setShaderLocator(new ShaderLocator(getAssets()));

When I run game again, the engine found shader-files, but crashed when gen VBO, logs:

Code: [Select]
12-12 14:40:07.394: W/dalvikvm(10293): threadid=15: thread exiting with uncaught exception (group=0x41578930)
12-12 14:40:07.416: W/System.err(10293): java.lang.RuntimeException: [ 1386830407375 ] - ERROR: before: glError 1280
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.Logger.log(
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.GL20.checkError(
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.GL20.glGenBuffers(
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.CompiledInstanceFP.compileToVBO(
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.CompiledInstanceFP.render(
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.GLRenderer.drawVertexArray(
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.World.draw(
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.World.draw(
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.renderWorld(
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.handleGameRender(
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.onDrawFrame(
12-12 14:40:07.418: W/System.err(10293): at android.opengl.GLSurfaceView$GLThread.guardedRun(
12-12 14:40:07.418: W/System.err(10293): at android.opengl.GLSurfaceView$

Support / Sometimes my game suddenly gets a heavy fps dropping.
« on: December 10, 2013, 04:14:38 am »
My game runs in 55+ fps normally, but sometimes could suddenly drop to 10- fps, and  resume to normal(55+fps) after several seconds(8 - 20s).

First I doubt other processes kill too many cpu load, but when the fps-dropping occur, I watched the total usage of cpu with android's tool(system information), seems the cpu load is normal(without a suddenly increase, and there is enough idle load).

Then I doubt the GC and incorrect Thread.Sleep() in game loop(there is a mechanism to limit the fps to save power). But I have not check this due to the hard reappearing.

All above is about cpu, my question is:

Is there any issue with gpu(code\driver) could result in this problem? Please give your options, I will check them, thanks.

Support / Re: How to use renderTarget?
« on: December 06, 2013, 04:29:10 am »
Thanks, i have tried this before, but the result is not what i expect, which seems i got an incomplete renderTargetTexture. There is another question:

Assume the size of display is 2X2, and can be spilt to 4 parts:

If i use a 1X1 (npot)texture as the renderTarget, which one is the correct result:
a, 1

b, 3

c, 4

d, a scaled

Could i render the full scene into a smaller texture? The following code seems useless:
Code: [Select]
Texture t = new NPOTTexture(w, h);
frameBuffer.resize(w, h);
frameBuffer.resize(oldW, oldH);

Support / Re: How to use renderTarget?
« on: December 05, 2013, 01:49:53 pm »
> You'll also notice that the blitted result is upside-down. You can fix that by using a negative height (and maybe setting the y start to screenHeight/4...i can't remember if that's needed ATM).

After some try, i am not very clear how to do(to fix the upside-down). Could you give me some sample code?

Support / How to use renderTarget?
« on: December 05, 2013, 07:19:38 am »
My purpose is to render the scene 2 times with different camera per frame, the first rendering will render to full screen, the second rendering will render to a smaller(1/4w、1/4h of the screen). But my code seems useless(the result seems like which don't do the second rendering).

Code: [Select]

  private void init(){
    mTexture = new Texture(256, 128);
    TextureManager.getInstance().addTexture("rt", mTexture);
  private void update(World world, FrameBuffer frameBuffer){
    int screenWidth = 800;
    int screenHeight = 480;
    //first rendering
    //second rendering
    frameBuffer.blit(mTexture, 0, 0, 0, 0, screenWidth/4, screenHeight/4, false);

Pages: [1] 2 3 ... 14