Author Topic: jPCT-AE wiki  (Read 17674 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
jPCT-AE wiki
« on: June 24, 2010, 11:21:56 pm »
I started to write some stuff about AE in a section of the wiki. Until now, it contains some blah about the differences (not very detailed) and some performance tips. Contributions are always welcome: http://www.jpct.net/wiki/index.php/Main_Page#jPCT-AE_-_a_port_of_jPCT_to_Android

Edit: Fixed link.
« Last Edit: June 24, 2010, 11:29:51 pm by EgonOlsen »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: jPCT-AE wiki
« Reply #1 on: June 25, 2010, 11:33:19 pm »
Added a HelloWorld for Android to the wiki. It's still lacking documentation though...

Offline raft

  • quad
  • ******
  • Posts: 1970
    • View Profile
    • http://www.aptalkarga.com
Re: jPCT-AE wiki
« Reply #2 on: August 06, 2010, 05:08:44 pm »
added a page for profiling an Android app within and without Eclipse.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: jPCT-AE wiki
« Reply #3 on: August 06, 2010, 09:20:39 pm »
Too bad that this doesn't work on 1.5 and/or my phone. The result when trying this on the command line is this:

Code: [Select]
08-06 21:15:37.474: ERROR/AndroidRuntime(12036): Uncaught handler: thread main exiting due to uncaught exception
08-06 21:15:37.474: ERROR/AndroidRuntime(12036): *** EXCEPTION IN SYSTEM PROCESS.  System will crash.
08-06 21:15:37.494: ERROR/AndroidRuntime(12036): java.lang.SecurityException: Process not debuggable: ProcessRecord{43734168 11894:com.threed.jpct.games.alienrunner/10092}
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at android.os.Parcel.readException(Parcel.java:1234)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at android.os.Parcel.readException(Parcel.java:1222)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at android.app.ActivityManagerProxy.profileControl(ActivityManagerNative.java:2156)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at com.android.commands.am.Am.runProfile(Am.java:455)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at com.android.commands.am.Am.run(Am.java:79)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at com.android.commands.am.Am.main(Am.java:51)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at com.android.internal.os.RuntimeInit.finishInit(Native Method)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:186)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at dalvik.system.NativeStart.main(Native Method)

All i find when searching for this exception is the source code of Donut, i.e. Android 1.6...obviously, nobody else has this problem... ???

Offline raft

  • quad
  • ******
  • Posts: 1970
    • View Profile
    • http://www.aptalkarga.com
Re: jPCT-AE wiki
« Reply #4 on: August 06, 2010, 09:23:40 pm »
seems as you havent set debuggable flag on manifest file.

Code: [Select]
<application .. android:debuggable="true">
   ...
</application>

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: jPCT-AE wiki
« Reply #5 on: August 06, 2010, 09:51:32 pm »
Yes, that works better... ;D

The game runs like sh*t when enabling the tracing though...hardly playable at 6 fps...  :(

Offline raft

  • quad
  • ******
  • Posts: 1970
    • View Profile
    • http://www.aptalkarga.com
Re: jPCT-AE wiki
« Reply #6 on: August 06, 2010, 09:55:05 pm »
Cool. I've also updated the wiki page.

Yes, profiling slows down the application but hardly noticable on N1. But debugging makes it crawl ::)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: jPCT-AE wiki
« Reply #7 on: November 24, 2010, 11:28:14 pm »
Reworked the HelloWorld example in the wiki to make it handle pause/resume better.

Offline Sushil

  • byte
  • *
  • Posts: 1
    • View Profile
Re: jPCT-AE wiki
« Reply #8 on: December 15, 2010, 06:45:31 am »
Reworked the HelloWorld example in the wiki to make it handle pause/resume better.

Hi,

Can you please post the Android version of Advanced example posted in Wiki. I was trying to port the advanced example to android but not able to import Projector, ShadowHelper and few other things. Can you suggest me what should I do? Currently I am just using jpect_ae.jar in my build. I have just started to use JPECT engine two days back.

Thank you for posting the HelloWorld example for android.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: jPCT-AE wiki
« Reply #9 on: December 15, 2010, 10:09:13 am »
You can't port them, because they simply don't exist on Android. At least OpenGL 1.1 doesn't support these features.

Offline redfalcon

  • byte
  • *
  • Posts: 14
    • View Profile
Re: jPCT-AE wiki
« Reply #10 on: November 16, 2011, 12:53:41 pm »
I thought I share my simple implementation of the serializer (for *.obj and *.mtl files) for the Android version, might be useful for others. If you don't mind, you can add it to the wiki.
I expected worse when I read that "It's a bit painful to use right now"  ;) It has no special error checking etc., but its usable and should be quickly adaptable for other filetypes.

Code: [Select]
import java.io.FileOutputStream;
import com.threed.jpct.DeSerializer;
import com.threed.jpct.Loader;
import com.threed.jpct.Object3D;

public class Serializer {

              //Adjust the paths as necessary
private static final String INPUT_MODEL = "c:/myobj.obj";
private static final String INPUT_MATERIAL = "c:/mymtl.mtl";
private static final String OUTPUT_FILE = "c:/serialized.obj";

public static void main(String[] args) {

Object3D[] objs = null;
objs = Loader.loadOBJ(INPUT_MODEL, INPUT_MATERIAL, 1);

for (Object3D o : objs)
o.build();

DeSerializer ds = new DeSerializer();

try {

FileOutputStream baos = new FileOutputStream(OUTPUT_FILE);
ds.serializeArray(objs, baos, true);

} catch (Exception e) {

e.printStackTrace();
}

}

}

Load in jpct-ae with:

Code: [Select]
/...
Object3D[] serializedObject = null;
serializedObject = Loader.loadSerializedObjectArray(res.openRawResource(R.raw.INSERT_FILE_NAME));
/...

Offline yindroid

  • byte
  • *
  • Posts: 21
    • View Profile
Re: jPCT-AE wiki
« Reply #11 on: January 05, 2012, 05:58:28 pm »
I noticed that there is no such class as DeSerializer in jPCT-AE (1.24)...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: jPCT-AE wiki
« Reply #12 on: January 05, 2012, 08:22:33 pm »
No, it hasn't. That's because it makes no sense to serialize objects on Android directly. The idea is to serialize them using the desktop version and then load them via http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Loader.html#loadSerializedObject(java.io.InputStream)

Offline OneManSitting

  • byte
  • *
  • Posts: 9
    • View Profile
Re: jPCT-AE wiki
« Reply #13 on: September 14, 2012, 07:47:26 pm »
Thanks for making such a great wiki, and i would love to take part in it.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: jPCT-AE wiki
« Reply #14 on: September 15, 2012, 09:26:37 am »
I'll create an account for you when i'm back home...in a week or so.