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

Pages: [1] 2 3
1
Support / Model Size Issue
« on: December 09, 2010, 11:39:49 am »
HI,
       
        Is there any way to reduce the .ser file size as my single md2 is around 700-800 kb but when serialized it goes to 3.5-4.5 MB which is increasing the size.And my app is required to have 15-20 models.

Any way to reduce the file size?

2
Support / Device issue for the app
« on: November 23, 2010, 02:46:54 pm »
Hi,

       My app is working on HTC Desire but not able to run on DROID and DROID X. I am developing my app using jPCT engine.

Its not able to load the models in the other devices.Saying can't de-serialize.

What could be the possibility?

3
Support / Re: Blitting Image using TexturePack
« on: October 22, 2010, 03:42:03 pm »
Hi,

     Thanx for the suggestion and the problem was due to not packing the TexturePack object

I put this line and its working fine :)

mTexturePack.pack(true);

4
Support / Re: Blitting Image using TexturePack
« on: October 22, 2010, 02:09:15 pm »
Hi ..I am not ommiting the call to display. Following is the code i am using-

public void onDrawFrame(GL10 gl) {
         
         try {
            
            
            if (!stop) {
               if (paused) {
                  Thread.sleep(500);
               } else {
                  if (resetFB) {
                     fb = new FrameBuffer(gl, w, h);
                     resetFB = false;
                  }

                  fb.clear();

                  //moveOpponent();
                  moveCharacter();
                  world.renderScene(fb);
                  world.draw(fb);
                  mTexturePack.blit(fb, imageId, 100, 100, true);
                  
                  fb.display();
               }
            } else {
               if (fb != null) {
                  fb.dispose();
                  fb = null;
                  
               }
            }
         } catch (Exception e)
         {
            Logger.log("Drawing thread terminated!", Logger.MESSAGE);
         }
      }

5
Support / Re: Blitting Image using TexturePack
« on: October 22, 2010, 01:46:05 pm »
W =  72 pix
H = 63 pix

6
Support / Re: Blitting Image using TexturePack
« on: October 22, 2010, 01:44:21 pm »
Hi,

       My Image size is 8KB only and i am creating the texture pack object only in the onCreate method and not in the onDrawFrame method

I also getting the following before the Exception-

10-22 11:31:56.253: INFO/jPCT-AE(4493): Drawing thread terminated!
10-22 11:31:56.272: INFO/jPCT-AE(4493): Additional visibility list (2) created with size: 5000
10-22 11:31:56.292: INFO/jPCT-AE(4493): Drawing thread terminated!
10-22 11:31:56.322: INFO/jPCT-AE(4493): Additional visibility list (3) created with size: 5000
10-22 11:31:56.332: INFO/jPCT-AE(4493): Drawing thread terminated!
10-22 11:31:56.342: INFO/jPCT-AE(4493): Additional visibility list (4) created with size: 5000
10-22 11:31:56.352: INFO/jPCT-AE(4493): Drawing thread terminated!
10-22 11:31:56.363: INFO/jPCT-AE(4493): Additional visibility list (5) created with size: 5000
10-22 11:31:56.373: INFO/jPCT-AE(4493): Drawing thread terminated!
10-22 11:31:56.383: INFO/jPCT-AE(4493): Additional visibility list (6) created with size: 5000
10-22 11:31:56.392: INFO/jPCT-AE(4493): Drawing thread terminated!
10-22 11:31:56.412: INFO/jPCT-AE(4493): Additional visibility list (7) created with size: 5000
10-22 11:31:56.422: INFO/jPCT-AE(4493): Drawing thread terminated!
10-22 11:31:56.442: INFO/jPCT-AE(4493): Additional visibility list (8) created with size: 5000
10-22 11:31:56.462: INFO/jPCT-AE(4493): Drawing thread terminated!
10-22 11:31:56.462: INFO/dalvikvm(4493): Total arena pages for JIT: 12
10-22 11:31:56.482: INFO/ActivityManager(92): Displayed activity android.thearena/.Game_old: 2284 ms (total 2284 ms)
10-22 11:31:56.492: INFO/jPCT-AE(4493): Additional visibility list (9) created with size: 5000
10-22 11:31:56.502: INFO/jPCT-AE(4493): Drawing thread terminated!

7
Support / Blitting Image using TexturePack
« on: October 22, 2010, 01:35:25 pm »
HI,

      I created a texture and added a single image only for testing.

TexturePack Creation:

TexturePack mTexturePack = new TexturePack();   
int imageId = mTexturePack.addImage(((BitmapDrawable)getResources().getDrawable(R.drawable.center)).getBitmap());

Using the TexturePack
When i am using in the draw as following -

mTexturePack.blit(fb, imageId, 100, 100, true);

Nothing is displaying on the screen and also its getting out of memory. See the log below-

java.lang.OutOfMemoryError
     at com.threed.jpct.VisList.<init>(VisList.java:51)
    at com.threed.jpct.VisListManager.getVisList(VisListManager.java:59)
     at com.threed.jpct.World.renderScene(World.java:1000)
    at android.thearena.Game_old$Renderer.onDrawFrame(Game_old.java:497)
    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1341)
     at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)


What i am doing wrong ?
                  
         

8
Support / Re: Can't deserialize object
« on: October 21, 2010, 12:52:38 pm »
Hi,

      Though i tried with zip but no success. But my requirement got changed and the model is reduce from 19 animations to 12 animations which helped the code to run smoothly in both 2.1 and 2.2.

I thank you for jPCT which running as the base of my project.

I have another query regarding multi-touch.As my target device is 2.2 and above so i have multi-touch support.

My requirement is to use touch button combination on the screen and that can only be acheived using multitouch.

And my question is- Is there any help from jPCT for multi-touch? What is the user of Overlay class in the jPCT?  Any link between multi-touch and overlay?

9
Support / Re: Can't deserialize object
« on: October 20, 2010, 01:25:16 pm »
HI,

          Following is the serialize log for the model from the jPCT --

Loading file data/model_no_7.md2
Expanding buffers...1000000 bytes
Expanding buffers...1500000 bytes
File data/model_no_7.md2 loaded...1131692 bytes
Magic number: 844121161
Version: 8
Skin width: 512
Skin height: 512
Frame size: 3804
Number of skins: 1
Number of Vertices: 941
Number of Texture coordinates: 4719
Number of triangles: 1573
Number of GL-commands: 15731
Number of Frames: 271
Reading Texture coordinates...
Done!
Reading polygonal data...
Done!
Reading keyframes...
Done!
Coverting MD2-format into jPCT-format...
Processing: walksplit...
Processing: jumpsplit...
Processing: breathsplit...
Processing: blockonheads...
Processing: swingattackch...
Processing: swingattackhe...
Processing: jumpattackspl...
Processing: swingattackch...
Processing: swingattackwa...
Processing: stabsplita...
Processing: blockchestspl...
Processing: deadfallbackw...
Processing: rollsplitw...
Processing: rollblockspli...
Processing: rollattackspl...
Processing: kicksplitl...
Processing: punchsplit...
Processing: fencingwalksp...
Processing: absorbingattac...
Done!

When i run this in 2.1, it runs fine but when i use the same file 2.2 it gives error "Can't Deserialize" (see attached log file...use wordpad for the clear view).

I don't know y its happening with the same code for different Android SDK


[attachment deleted by admin]

10
Support / Re: Can't deserialize object
« on: October 18, 2010, 03:02:08 pm »
Hi,

        My Code is running fine in 2.1 but when i am using it in device with 2.2. Its not able to Deserialize my model.

     Everything running fine in 2.1.

Any issue with jPCT and SDK 2.2 ?

11
Support / Re: Not able to clear the data
« on: October 17, 2010, 02:36:52 pm »
Hi,
     
          Though i am able to run the GLActivity(the main class using renderer and other jpct utilities ) without any exception but my others screens getting affected when coming out of GLActivity.

  All the other screens are running fine but when i enter in the GLActivity and come out of it. Other activities /screens starts showing OutOfMemory and its very random(not specific to any acitvity/screen ).

 I don't know what causing it but its coming only when going inside the GLActivity(the main class using renderer and other jpct utilities ).


Any idea as whether gc is not able to clean the unwanted memory or any other issue.

12
Support / Re: Not able to clear the data
« on: October 17, 2010, 12:33:06 pm »
Hi,

        This helped a lot and i am able to run any number of time without any exception.

Thanx a lot :)

13
Support / Re: Not able to clear the data
« on: October 13, 2010, 10:25:35 am »
Hi,


   There are 2 cases i encountered using your NinjaDemoActivity class

1.When declaring varibales as attribute of the activity.

    I added following code taking in the try block in onCreate method of your NinjaDemoActivity class

 mCharacter  =    null;
mArena     =   null;
mAnimation   =    null;
         
mCharacter   =  Loader.loadSerializedObject(getResources().openRawResource(R.raw.model_new5));
mArena        = Primitives.getPlane(4, 15);
mAnimation   = mCharacter.getAnimationSequence();
      
I have not added any of the object to the world. Its just the above lines only.
This run correctly for first time but thrwos OutOfMemeory when i restarts the app.

And

2.When declaring varibales as local(inside a block or method).

 Object3D mCharacter     =    null;
 Object3D mArena     =   null;
 Animation mAnimation    =    null;
         
mCharacter   =  Loader.loadSerializedObject(getResources().openRawResource(R.raw.model_new5));
mArena        = Primitives.getPlane(4, 15);
mAnimation   = mCharacter.getAnimationSequence();

In this case everything runs fine at evertime i restart the app.



As i need the attributes for the activity to be used a other places also. I feel the data is not getting cleared in the engine.


14
Support / Not able to clear the data
« on: October 12, 2010, 06:04:39 pm »
HI,

         I am trying to load the followings

1. A serialized md2 model.
2. A texture
3. A primittives.

It runs fine for the first time but when i restart the app, it gives me OutOfMemory exception.

i used

mCharacter.clearObject();


but the same issue is coming.


Can anyone help out in getting  a way as How to release the resources onDestroy?


15
Support / Using GLView in xml file
« on: October 12, 2010, 10:19:32 am »
Hi,

            I am using GLView in xml with some image buttons on it. I am finding problem in recreating it on onResume as not being a part of jPCT.

Can any one guide me as how to utilize jPCT for recreating the GLContext where GLView being in the xml file.

Pages: [1] 2 3