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

Pages: [1]
Hey all,

I was searching for an inapp Bug/ Error reporting system. Are there any suggestions?
I want to give the user the chance to e.g. simply click on a button to send a bug report to a specific server/E-Mail-Account/... .
Do I have to implement this by myself or are there any libraries?

And the second topic:
What are the pro's and con's of the two platforms 'Google Play' and 'Amazon Appstore'?
Who has experience with those (developer fee, features, disadvantages...)?

I want to hear/ read your opinions before I decide to use any of these technologies. :)


Projects / Android-Game 'Autoball' [v0.1a] [Update 2013-03-23]
« on: February 02, 2013, 01:37:10 pm »
Update 2013-03-23
Hi again,
after 2 month break caused by my Prof's illness the Master Thesis finally got defended successfully on last Thursday.
I used the following videos to present my application to the audit committee.
The recording app, i used, runs in background and lowers the fps rate a little bit. So without recording its more fluently.

First video shows the game in multiplayer mode with sound!:

Second video presents the singleplayer mode with enhanced physics and sound:

(btw., youtube really messed up the video's sharpness :( )
More information and screenshots will be coming soon.

Edit: If someone is interested in reading the Master thesis (in German) - just pm me :)

Autoball v0.1a [sneak preview]

Hi all,
after a long time of inactivity on jPCT-forums I want to show you my game for Android systems in a sneak preview.
Autoball is a prototype as a result of my Masterthesis (already printed and published, will be defended and finished soon).
If you are interested in some more information then I will give it to you after my thesis colloquium.
The thesis is about developing Android-3D-Applications with jPCT-AE, jBullet and (for local area network gaming).

Here is a video:
(looks only a lil bit muddy and slow in video!)


short question about the storage of GUI elements that are obliged to blit via FrameBuffer:

What is better:
1. putting all GUI elements in one big bitmap that will be loaded as one single Texture to the TextureManager
2. for every small GUI element one single Texture-object that will be loaded to TextureManager?

My Problem:
I've chosen the first path because I've got about 60 GUI elements. All these elements are placed within a single
bitmap and are drawn to the screen via frameBuffer.blit(...) over their associated 'bitmap source coordinates' that are stored in a so called GUIMeasurements-Object.
The size of the bitmap is (please don't go berserk XD) 2048x2048 with a color depth of 16.

Is it necessary that this bitmap, which is only used for blitting, is loaded to the TextureManager?
At the moment the memory limit is reached while restarting the Activity, so I got a OOM - naturally.

The use of the method FrameBuffer.blit(int[], int, int, int, int, int, int, int, int, boolean) could be an alternative but is not recommended.

Any advice or hint?


the most nerving problem while programming for mobile devices is the OutOfMemory Exception.
In most cases the OOM is caused by long living objects. The further the development progresses the more objects you
need and the more often you are running into a OOM.

Does anyone have experience with a kind of Memory Leaks tracking tool?
I want to find out which objects are blocking the Memory.
I would try this:

The latest OOM - that drives me insane - is thrown after restarting the gameActivity wherein , among others, a simple keyframe animation
is created. Uncommenting that code lets the OOM disappear, so i think i have something forgotten to clean up.
This is how I do:

Code: [Select]
private Animation drive = null;
private Object3D temp = null, playerCar = null;
/* jPct specific ViewPort setup. It's called in MyRenderer.onSurfaceChanged(...)*/
private void setupViewPort(){
//loading 3D cars
case 1:{
//playerCar = beetle
if(playerCar == null){
playerCar = loadZippedSerializedModel(getResources().openRawResource(R.raw.beetleidle));
drive = new Animation(3);

temp = loadZippedSerializedModel(getResources().openRawResource(R.raw.beetleleft));
if(temp!=null)temp.clearObject(); temp = null;

temp = loadZippedSerializedModel(getResources().openRawResource(R.raw.beetleright));
if(temp!=null)temp.clearObject(); temp = null;


// playerCar is added to world later, after connecting with jBullet Rigidbody
// /*drive.remove(0); drive = null;*/

/** Loads a single, zipped and serialized Object from InputStream. It' s called in setupViewPort()*/
private Object3D loadZippedSerializedModel(InputStream inputRessource) {
ZipInputStream zis = new ZipInputStream(inputRessource);
try {zis.getNextEntry();} catch (IOException e) {/*throw new RuntimeException(e);*/}

Config.useRotationPivotFrom3DS = true;

Object3D model = null;
model = Loader.loadSerializedObject(zis);

//clear resources
try {
zis = null;
} catch (IOException e) {/*e.printStackTrace();*/}
return model;

/* Resets all Objects to null in reverse order of creation. It's called in Activity.onDestroy()*/
private void destroyAllObjects(){
playerCar.clearAnimation(); playerCar.clearObject(); playerCar = null;
if(drive != null)drive.remove(0); drive = null;
if(temp != null)temp.clearObject(); temp = null;

What I managed beside the cleaning of all objects on Destroying the Activity:
  • minimizing the keyframe animation to 3 frames (so beside the object3D there are two more Meshes loaded)
  • every keyframe is part of a single animation sequence (so one frame per sequence)

To reduce the memory usage I want to compute the 3ds-objects down - I hope this helps.

Does anyone know a good polygon reduction tool?
I already tried POLYGON CRUNCHER ( but after optimizing (from 9073 vertices  to 6112 and from 14652 faces to 8738)
the jpctSerializing process get stuck so the serialized 3ds file is not created.
I guess there was something destroyed while polygon reducing that was important for jpctSerializer.
Anyone knows a better tool?

(EDIT: fixed this by doing another import of the reduced 3ds-file to 3ds-Max and export it as 3ds-file again)

ByTheWay!?: What's recommended: quadrangular or triangular Polygons?
I've read somewhere that all quads are recompute into triangles for the android's hardware, so putting objects as quadrangular Polygon Mesh would reduce performance (can't find where I read this anymore) - so is that true?


I am going to try to load a 3ds object (it's one single vehicle mesh) to jpct-ae to connect it with a jbullet rigidbody.
The rigidbody needs the transform's center to set a rigidbodyshape correctly.

Problem is, that the center of the vehicle transform (Object3d.getTransformedCenter()) at runtime doesn't equal with the center of the object in 3ds max. Even a moving of the object in 3ds max away from (0,0,0) doesn't cause a difference (the shown transformedCenter of the vehicle is still the same).

But, that doesn't concern to all objects I'd loaded with jpct the same way!
The transformed center of a spherical soccer ball matches exactly with the one from 3DS Max.

Anyone of you knows this issue?
Is it possible that the .3ds-exporter of 3DS max generates a center of the transform relatively to the size and not position of the object?
Or is the vector of this center generated while serializing the object's 3ds. file with jpct?

I method like Object3D.setTransformedCenter(new SimpleVector()) would be great. Then I may reset manually the center of the vehicle at object creation time.

If some more information, code-snippets or explanation screenshots are required I can deliver them in addition.
(sorry for linguistic bloopers, but this problem made me insane and dizzy .'S )

The 3d object passes through the following workflow:

3DS MAX -> Export as .3ds-file -> Serialization 3ds. to .ser-file -> Zip
... Android Build process ...
Runtime: -> unzipping -> load via Loader.loadSerializedObject and object3d creation

Hi there,

i hope you can help me with the following activity-lifecircle problem:

I have two Activities, one for the Menu and one for the Game.
The GameActivity is started by the MenuActivity via startActivityForResult(GameIntent) after pressing "start Game"
(see pic0 number 1. )
There are two different jPCT-Environments within these two Activities, that will be individually cleaned by their
associated Activity.onDestroy() method when calling Activity.this.finish().

The user has differnet options after pressing "pause Game":

a. Resume the game
-> simply unpausing the game

b. Quit the game

Code: [Select]
//pseudo code
MenuActivity.onActivityResult(...){ ... case RESULT_QUIT: MenuActivity.finish() }

c. Back to Main Menu
Code: [Select]
//pseudo code
MenuActivity.onActivityResult(...){ ... case RESULT_MAIN_MENU: MenuActivity.currentScreen = Screen.MAIN_MENU; }

d. Restart the game
Code: [Select]
//pseudo code
MenuActivity.onActivityResult(...){ ... case RESULT_RESTART: startActivityForResult(GameIntent) }

When restarting the GameActivity immediately after destroying (see option d.), the jpct-World doesn't load (see pic2),
although the Framebuffer is ready (you can see the key buttons on pic 2).
I think the old GameActivity with the cleaned jPCT-Environment is still on the Activity stack and not
destroyed quickly enough by the garbage collector. (see pic0 number 2. ) [reason for this argument: see clumsy workaround 1, lower]

Restarting the GameActivity by pressing "start Game" after returning to the Main Menu (see option c.) is working (see pic1).


short workflow


Display after pressing "start Game"


Display after pressing "restart Game"

Clumsy workaround 1:
When returning to MenuActivity with RESULT_RESTART, pasting a thread.sleep for 5 sec before calling startActivityForResult(GameIntent)
-> result:  World will be loaded like shown in pic1
5 sec blackscreen appears between activity switching

Clumsy workaround 2:
When returning to MenuActivity with RESULT_RESTART, putting a System.exit(0); in GameActivity.onDestroy() as last line
-> result:  World will be loaded like shown in pic1
Issues (EDIT):
-rough Activity changing with short ugly blackscreen, lumberjack style :S
-a following "back to Menu"-action from GameActivity ends up in a restart of the MenuActivity too,
because System.exit(0) clears the states of all Activities! - i guess

Does anyone know a good way to get rid of old activity instances immediately?
I think about a command like "gc, clean the stack NOW!" (System.gc() doesn't help, still takes 5 sec until the GC get its ash up)

Or is there a way to get the number of the Activities on stack?

I am wondering why no new instance of GameActivity is build after calling startActivityForResult(GameIntent) immediately?
Maybe I have to set a flag like "the old GameActivty is expired"? Any ideas?

Reset the GameIntent before calling startActivityForResult(GameIntent) doesn't help neither

[attachment deleted by admin]

Hi there,

as part of a study project I've created a bundle of tutorials on how to getting started with jPCT-AE.
All I did was studying and structuring the compact jPCT-AE basic knowledge of this forum to put that in
a collection.

This collection includes the following topics:
- Setting up the IDE
- jPCT-HelloWorld
- Terrain Generation (Random, HeightMap, Object3D-Serializing)
- Skybox
- Loading and texturing 3DS objects
- Creating your own GUI
- Integrating physics engine jBullet

download and original German thread

In the near future, there is also planned an English version
(short wiki entries would be nice).
However, I don't have the time to do this alone.
I would appreciate it, if you could help me.

Even a translation of small parts of this tutorial collection would be helpful.
A small team project would be nice.

Otherwise, have fun and success with the german version

stay tuned

German corner / [1.0.2] Tutorial-Sammlung jPCT-AE
« on: April 01, 2012, 01:48:43 pm »
Hallo Programmierfreunde,

ich habe mir im Rahmen eines Studienprojektes mal die Mühe gemacht ein paar
Tutorials zum Einstieg in jPCT-AE zu erstellen. Dabei habe ich vorhandenes
Wissen aus diesem Forum hier verwendet, studiert, strukturiert  und gebündelt.

Diese Sammlung beinhaltet folgende Themen:
- Einrichtung der IDE
- jPCT-HelloWorld
- Terrain-Generierung (Random, HeightMap, Object3D-Serializing)
- Skybox
- 3DS Objekte laden und texturieren
- Eigene GUI erstellen
- Physics-Engine jBullet integrieren

Zum Download:

In naher Zukunft ist auch eine Englische Version geplant
(am Optimalsten sind natürlich kompakte Wiki-Einträge).
Allerdings fehlt mir da ein wenig die Zeit um das alleine schnell durchzuziehen.
Total klasse wär es ja, wenn ihr mir dabei helfen könntet.
Und wenn nur Teile der Tutorial-Sammlung ins Englische Wiki übertragen werden - das reicht ja erstmal völllig aus.
Also wär cool, wenn wir das als kleines Team-Projekt umsetzen könnten.

Ansonsten viel Spaß und Erfolg mit den Tutorials

Bis denne

Hier gehts zum englischen Thread:,2668.0.html
Zandric hat sich die Mühe gemacht das alles ins Englische zu überführen!

German corner / Was bedeutet JPCT?
« on: December 28, 2011, 01:07:21 pm »
Hallo Leute,

mal ne fundamentale Frage:

Was bedeutet eigentlich jPCT voll ausgeschrieben?

Arbeite gerade an ner Projektarbeit fürs Studium in dem jPCT eine große Rolle spielen wird.
Themengebiet: Portierung eines PC-3D-Spiel nach Android
In der Doku würde sich deswegen eine kurze Erklärung der Bezeichnung anbieten.
Hab schon s wiki und Forum durchstöbert, leider ohne Erfolg bis jetzt
- entweder bin ich blind auf beiden Augen oder einfach nur blöd...XD

Würde mich mal interressieren...

Bis denne
Haut rein

Pages: [1]