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]
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. :)

cya



2
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!:
http://www.youtube.com/watch?v=JHc-fXSXj8g

Second video presents the singleplayer mode with enhanced physics and sound:
http://www.youtube.com/watch?v=wSSE4vFkohw

(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 java.net (for local area network gaming).



Here is a video:
(looks only a lil bit muddy and slow in video!)
http://www.youtube.com/watch?v=cA94N00REiE

3
Howdy!

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
or
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?

4
Hooohaaa!

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.

1.
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: http://macgyverdev.blogspot.de/2011/11/android-track-down-memory-leaks.html


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));
playerCar.rotateY((float)Math.PI/2);
playerCar.rotateMesh();
playerCar.clearRotation();
playerCar.getMesh().compress();
//*
drive = new Animation(3);
drive.createSubSequence("IDLE");
drive.addKeyFrame(playerCar.getMesh());

drive.createSubSequence("LEFT");
temp = loadZippedSerializedModel(getResources().openRawResource(R.raw.beetleleft));
temp.rotateY((float)Math.PI/2);
temp.rotateMesh();
temp.clearRotation();
temp.calcBoundingBox();
temp.calcNormals();
temp.getMesh().compress();
drive.addKeyFrame(temp.getMesh());
if(temp!=null)temp.clearObject(); temp = null;

drive.createSubSequence("RIGHT");
temp = loadZippedSerializedModel(getResources().openRawResource(R.raw.beetleright));
temp.rotateY((float)Math.PI/2);
temp.rotateMesh();
temp.clearRotation();
temp.calcBoundingBox();
temp.calcNormals();
temp.getMesh().compress();
drive.addKeyFrame(temp.getMesh());
if(temp!=null)temp.clearObject(); temp = null;

playerCar.setAnimationSequence(drive);

playerCar.strip();
playerCar.build();
// 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.oldStyle3DSLoader=true;
Config.useRotationPivotFrom3DS = true;

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

//clear resources
try {
zis.close();
zis = null;
} catch (IOException e) {/*e.printStackTrace();*/}
Loader.clearCache();
MemoryHelper.compact();
System.gc();
return model;
}


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



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.

2.
Does anyone know a good polygon reduction tool?
I already tried POLYGON CRUNCHER (http://www.mootools.com/plugins/us/polygoncruncher/) 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?

5
Huhu,

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 )


EDIT:
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

6
Hi there,

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

Situation:
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
GameActivity.this.setResult(RESULT_QUIT);
GameActivity.finish();
MenuActivity.onActivityResult(...){ ... case RESULT_QUIT: MenuActivity.finish() }

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

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


Problem:
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).

pic0

short workflow


pic1

Display after pressing "start Game"


pic2

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
Issue:
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



Question:
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?


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









[attachment deleted by admin]

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

8
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:
http://dl.dropbox.com/u/8388853/%5B1.0.2_GER%5DMasterprojekt_Android_3D_programmierung_final.pdf


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
Jansen

EDIT:
Hier gehts zum englischen Thread:
http://www.jpct.net/forum2/index.php/topic,2668.0.html
Zandric hat sich die Mühe gemacht das alles ins Englische zu überführen!
 



9
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]