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

Pages: [1] 2
Projects / Subject 17 - A Voice Input Based Adventure Game
« on: February 07, 2012, 09:59:11 pm »
Hello all

I have just released the beta version of a short demo that I have been working on for a student project. Would love your comments or any bug reports.

Subject 17 plays as a retro style adventure game, where the point and clicking can be replaced by the use of speech. As you manouver the character through the environment you can use the Google Voice facility to speak to the character and give her instructions, for instance to ask her to check an area or to use a particular item (Voice Search needs to be installed for the game to be played with voice, otherwise it can still be played simply with touch gestures).

Subject 17 tells the story of a young girl who wakes up in locked bedroom with no recollection of how she arrived there.

The game was targeted towards lower end devices (like my one :) ) So polygon count/texture resolution have been kept to a fairly low level, this may change in the next release.

YouTube Game Trailer.

Android Market page.

Game Walkthrough.

The game was made mostly using the jBrush level editor for JPCT.

Support / strange behaviour with Animations and OnResume()
« on: January 30, 2012, 01:53:37 pm »
Hi all

Very curious thing happens here. So I am following the exact same structure as the HelloWorld template, whereby the Activity gets backed up in the 'master' field so as to not being re initialised from scratch when the context changes...

Nothing bizarre happens when I start an input activity which leaves the GL context in the background (basically as a widget on top of the game) but if I leave the game completely (say due to a call) and return to it from outside, then all is fine apart from Objects with keyframe animations attached. They become invisible. You can still though turn them to OBJECT_VISIBLE manually and the animation would play as normal, but I just find it curious that everything else returns normally whereas animated objects become invisible....

Is there a reason for this?

Support / Check whether screen is being touched at a given time?
« on: January 27, 2012, 01:00:59 am »
Hi all

This is not strictly a JPCT query but rather an Android programming one....but I can't seem to find any info on this and maybe someone has come across this same issue.

I am currently using onToucheEvent to register all kinds of touch inputs... In my game I am using both ACTION_DOWN and ACTION_UP to trigger certain events....

Sometimes a frame rate  drop can lead the application to not detect an ACTION_UP event following and ACTION_DOWN, so for actions where holding down a button and then releasing it make stuff happen this becomes problematic...

Is there a way to get round this issue? Basically a way to check at any time whether there is a finger on the screen or not, so as to make up for lost touch.up events?

Thank you very much

Support / Resetting object scale: setScale/getScale discrepancy
« on: January 10, 2012, 01:20:19 am »
Hi Egon

I am not sure if this is a bug or whether I am doing something wrong. So I'd like to have an option in my program to reset all of the object's transformations. clearRotation and clearTranslation are already there, for the scale however there's no such option. Through testing I realised that the only way to get the object back to its original size is by calling setScale(0). By after that if you call .getScale() you still get the incremented scale value from before resetting.

So basically:

Code: [Select]
float s = obj.getScale()

would return 2, whereas I'd like it to be back to 1 so that when parsing the object information the object is not scaled incorrectly?

Thank you

Support / Any advice on Sound Effects format?
« on: January 09, 2012, 08:57:33 pm »
Nobody seems to have asked this on this forum, and I am probably thinking too ambitiously here considering that I am already hitting the "out of memory" error at times when I am not careful... But has anybody implemented sound effects consistently in their Android game? And I am thinking of several very short sound effects as opposed to one looping background track....

In that case is there a library/implementation that you guys may recommend or a specific file format for the ultra tiny Android memory? (i'm on 2.1)

Thank you very much!

Support / How to correctly apply bumpMaps
« on: January 06, 2012, 02:03:04 pm »

I am trying to fix the Bump Map set up for my editor. Am using software renderer, currently the object's texture is set up using the setTexture(Texture t) method. Afterwards I have an option to browse for a normal map file and then this is how I am applying it, following the instructions on the JavaDoc that say to enable environment map first:
Code: [Select]

But this is the result I get:

The bottom image is the result in JPCT.... it's actually more brownish, i got this screenshot from using a different texture but same bump.... the resolution of both textures is 256x256....

Am I doing something wrong? Thank you very much

Support / checkForCollision and concave/hollow objects
« on: January 03, 2012, 10:19:53 pm »
Hi Egon

I have only tried this with checkForCollisionEllipsoid, but basically I have the mesh for the four walls of a room and its pavement (all one mesh). If I place the character inside it the check always registers a collision, basically making the character never move. I tried putting the character at different positions inside the room mesh and always no movement. If however I import each of the four walls as distinct objects then the collisions works as expected...

Just checking, is this meant to happen? I am setting each object to CHECK_OTHERS and the character to CHECK_SELF, I have tried with different dimensions for the ellipsoid, from (1, 1, 1) to (10, 10, 10), always same result....

Thank you very much

Projects / jBrush - A World and Animation Editor and a Serializer tool
« on: October 21, 2011, 01:27:47 pm »
UPDATED ON 12/02/2012 - Version 0.3

Hello all,

This is a JPCT software I have created as part of a student project. It started as an exercise on the use of JPCT and it developed into this fairly complex toolkit that I used to create most part of an Android game currently available on the Android Market. I developed it a way that it could hopefully be of use to other JPCT users in their projects. While a number of versions were released, correcting a number of bugs reported, the software may still contain bugs (for which reports are appreciated!).

jBrush is a World and Animation editor. It allows you to import 3DS, OBJ and MD2 models, do the usual scale, rotate and translate operations. It has a 3DSMax-like interface where you can navigate the camera through the environment, rotate it around an object, position it front, side or on top of the scene.

World Editor:
In jBrush you can assign textures, most of the Object3D properties (name, collision, transparency, culling, emissive color, bumpMap, parent/child). You can also set up point lights, ambient light. The tool lets you export the scene as an instruction file which can be imported with two to three lines of code inside your JPCT/AE project with the aid of the library that comes with it. The library creates Object3Ds for all the models in the scene and it lets you fetch any of the them by the name given in the editor so that they can be used for further game actions.

Animation Editor:
jBrush is also a keyframe animation viewer and editor. It allows you to playback MD2 animations and to create your own animations out of 3DS keyframe meshes for a model (e.g. the 3-4 main stances of a walk-cycle) and set name and speed to the sequence created.
When linked to your project the library will take care of all the animation routines so that for any Object3D you can start or stop an animation with just one line of code. You can play animations continuously or play them once, at the same speed set up in the editor.

Serializer Tool:
Finally jBrush works as an interface to JPCT's Serializer facility, so it lets you export any supported model in serialized format (.ser) for more efficient processing on the Android.

An example use of this tool for instance is to create a scene with the environment models, create keyframe animations for an enemy, place the enemies inside the map and export the entire scene. The library will let you import the scene and fetch all models whose name contain a given parameter (e.g. "enemy") and with one line of code you can play their "moving" animations and execute further game code on them.

  • Triggers and GUI editors. Create trigger volumes and place them in the map. Use the library functions to have the engine check for collisions between triggers and game objects in order to trigger behaviour (opening of doors, elevators, activation of enemies, starting a cutscene et cetera.)
  • Create GUIs and Heads Up Display icons from image files, edit them and position them in the in-game screen. Use the library functions to dynamically turn GUIs on or off, change their position and size in-game.

  • Playback MD2 animations in the editor.
  • Serialize, reduce and export both MD2 animated models and Animations created in jBrush out of 3DS meshes (higher memory optimization for Android with the latter).
  • Set culling and collision properties
  • Set objects' parent/child dependencies and preview parented movements in editor
  • Get position and orientation of editor camera (useful for recreating a specific view angle in game)
  • Wireframe view mode (Useful when scene gets complex and you need to see through objects)

  • Adjust visibility of objects
  • Several bug fixes
  • Methods for loading level file from URL document base (for JPCT applets)
  • Optimized loading of serialized objects and animations for AE
  • Improved documentation

Download the software:

jBrush (v0.3)

Video previews/tutorials on how to use the library:

World Editor preview and project setup

Animation Editor preview and lib usage


Triggers and GUI editor preview and lib usage

Place 3DS, OBJ and MD2 models in the scene. Edit their texture and properties.

Set up point lights and ambient light.

View MD2 animations or create animation sequences from 3DS keyframe meshes.

Place collision volumes (triggers) in the scene and create GUIs and Heads Up Display icons.

Support / Modify existing Animation objects?
« on: October 12, 2011, 02:11:43 pm »
Hi Egon

For this visual map editor that I am making, I'd like to implement an interface for creating a keyframe animation by browsing for mesh files, ordering them into a sequence, playing the animation back in the editor, and come back later to edit it...

Currently if I have an object selected I get retrieve its attached animation if any, I can get the number of subsequences and their names, play each subsequence by name... but say I wanted the user to be able to add a new sequence at a later time, they would have to work within the number of frames assigned when the Animation object was created (Animation(int keyframeCount)) and if they accidentally assign more I think I read that an exception is thrown... currently there is no way to update this keyframe number after the object has been created?

I don't get what the getSequenceBorders(int seq) method does exactly, but would there be a way to get a list of the meshes per sequence? getKeyFrames() only returns them all....and the Mesh objects could not have a get/setName like Object3D? So as to maybe show the name of the file opened for each keyframe?

And final question, I read that for the Animations to play on AE following the guidelines on the wiki you need to replace with calcNormals(), and that's all right?

Thanks for reading this!

Support / project3D2D runtime errror
« on: October 11, 2011, 12:06:56 pm »
Hey Egon

I can't find a way to get round this.... So I'm using Interact2D.project3D2D to calculate the screen coordinates of a 3D object, and if those coordinates are inside the frameBuffer I blit a 2D image on it....

As I move around the world and the object falls far behind the camera, this check inevitably gives a NullPointerexception and a runTime error, right about when the coordinates get towards 20000 or 20000.... I am not blitting anything at those coordinates, the runtime error comes only from the check:
Code: [Select]
SimpleVector v = ew.getLightPos(frameBuffer);
System.out.println("" + v.x + ", " + v.y + "panel: " + this.renderPanel.getWidth());
if(v.x < this.renderPanel.getWidth() && v.y < this.renderPanel.getHeight()){
  frameBuffer.blit(bulb, 0, 0, (int) v.x, (int) v.y, 128, 128, 50, 50, 10, false, null);

The runtime error points at the third line.

Code: [Select]
public SimpleVector getLightPos(FrameBuffer fb){
SimpleVector arr = Interact2D.project3D2D(camera, fb, lights.elementAt(selectedLight).getPosition());
return arr;

Anything springs to mind?

Exception in thread "main" java.lang.reflect.InvocationTargetException
   at java.awt.EventQueue.invokeAndWait(Unknown Source)
   at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
   at Editor.loop(
   at Editor.main(
Caused by: java.lang.NullPointerException
   at Editor.render(
   at Editor$
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$000(Unknown Source)
   at java.awt.EventQueue$ Source)
   at java.awt.EventQueue$ Source)
   at Method)
   at$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at Source)}

Support / Mouse-drag camera rotation (UDK like)
« on: October 09, 2011, 01:46:06 pm »
Hello all,

I am working on building a simple JPCT map editor, I am trying to implement the same navigation style as Unreal Development Kit (or Blender, 3DSMax, Unity etc...).

Basically in these kits holding a mouse button and dragging makes the camera rotate in a cumulative way, so that for example you rotate 20 degrees on the X axis by moving the mouse up. The next time you drag the mouse, the rotation starts from the same point where it was left....

Currently I have a mouse listener that returns the delta x and delta y whenever the mouse is moved. In my World I am using the same camera code on the Wiki:
Code: [Select]
       public void rotateView(int dx, int dy){
Matrix rot = world.getCamera().getBack();

if (dx!=0) {
camera.rotateAxis(camera.getYAxis(), dx / 500f);

if (dy!=0) {
rot.rotateX(dy / 500f);

Which work great I think for a continuous movement like in a FPS game, but currently whenever I click the mouse and drag the rotation starts from the center each time, so basically it jerks back into place at each mouse movement...

Can anyone give me a hint as to how i can implement this?
Thanks a lot!

Support / Collision Information. Who collided with what
« on: October 01, 2011, 09:35:32 pm »
Hi Egon,

I've been looking through the forum and the Wiki for this, apologies if it's already been asked. Basically the checkXXXcolision method is very helpful for modifying the direction of the object in case a collision occurs, but is there a way to get information as to what object I have just collided with? So that for e.g. some action could be performed on such object?

Thank you very much!

Bones / Model badly deformed when imported
« on: September 19, 2011, 10:47:42 pm »
Hi Raft

Do you have any hints for a model that appears completely deformed when imported? Basically the hands and the feet get stretched far away from the body and all the body stretches in weird ways when it moves.

The export seems to have been successful, this is the log:

-- --
Skeleton created out of jME OGRE skeleton, 25 joints
Created skeleton animation clip: Walk
Loaded ogre file: girlnpc.mesh.xml, scale: 1, rotation: null
        1 sub objects, 1 skin animation(s), 0 pose animation(s)
Saved bones-group to

The model behaves ok in Bender, all vertices have been assigned weights....

Thank you for your time!

Support / Worldspace units. Workflow for placing objects in world?
« on: September 17, 2011, 08:34:35 pm »
Hi all

i was wondering if anyone had any guidelines or suggestions as to how to place models made in an app like Blender into the game world. I am very much used to tools like Unity where you have a visual editor...

I was thinking that I could build the entire scene in blender and then simplyy export it but then if I wanted to "build" the object to get bounding volumes I would only get a big box enclosing the entire room.... or not?

So in that case, if I wanted to import different objects singularly, do you guys know what the JPCT units correspond to? Say in metres/feet so as to work out a co ordinate from the Blender scene?

Thank you!

Bones / General advice on model/skeleton structure for Bones
« on: September 17, 2011, 10:36:48 am »
Hello there

Before I start skinning and rigging my model for this Android demo that I'm making with JPCT, I was wondering if there is any particular guidelines on how the model should be built.

Is there a rough number of polys that you guys would recommend for the average Android phone when using this engine? Is there any special instruction for the building of the skeleton? Number of bones, dependencies etc....

Thank you very much!

Pages: [1] 2