Penelope Android Game

Quick question how are people switching states? I know the obvious answer attach the new state and detach the old one, but is that the right method?

It depends on the situation. At least as often, I simply enable/disable them and leave them attached.

…that’s why there is BaseAppState which unifies all of the enable/disable/initialize/terminate so that you don’t have to worry about questions like “am I initialized and enabled or just initialized and not yet enabled… but when I’m later enabled what do I do?” etc.

Another little update

I have finished the main logic for the TitleState, but I still need to tweak the MotionPath tension and way points to get the CameraNode to move the way I want.
I started working on a Cinematic IntroState I am having trouble making the camera shake like an earthquake is happening.

I have finished all the logic for the on screen controls, I removed the touch logic from the ChaseCamera and am now using a RemoteControlState to handle all the controls. This did require exposing the rotate and zoom methods for the ChaseCamera.

What I have left to do is: create collision shapes, create the GamePlayState, create control for emeracite sprite, bake shadows, animate main character, and create smooth scrolling sewage texture.

I think I am going to do some testing and see witch method work better for Android. I am just wondering if the memory used to keep a state alive will have an impact.

Wow, that’s cool. I painfully noticed that nifty doesn’t and that iOS is even harder to support. So I watched carefully the events keeping an eye on Android and iOS at the same time… best idea I had. Maybe Lemur would be easier. Does it run on iOS?

I don’t know if anyone has tried it. Presuming the touch events are delivered like on android then I see no reason it wouldn’t work on iOS if all other things are working.

You can simply import FBX to blender. There’s a good FBX importer that I’m using.+ it’s importing animation

1 Like

Please leave a link to your converter or its name i have bee using the stand alone fbx converter from autodesk

On another note all logic is complete and only the tree top shadow maps are left in the texture department. Animations are still needed. I found if i want a 1 for 1 port i will need unity to echo the cam position during the title scene or something. I just downloaded a android screen recorder so I hope to get a video up soon

I forgot where I got it, buy I have names of creators: Campbell Barton, Bastien MOntagne, Jens Restemeier

1 Like

I am going to try this one Autodesk_FBX it turns out that I was using a really old version of Blender.

Yeah I think this is it;

The blender FBX importer script works for some of the models but not for the main level. so I have bones in the character model now but still no UV for the shadow maps. I need to just finish the game without the animations and shadows before I waste all my time and lose interest in the project.

So I a bought AIDE a while back and now i think i am going to finish this project using it to finish along with gethub. I should be more productive if i can work on it any time I want :wink:

1 Like

Lots of :cookie: :cookie: :cookie: coming your way if you make sure it works with 3.1 alpha :wink: That’s definitely blog-worthy.

Well AIDE is an android application so the project will be restricted to android only but that shouldn’t be an issue. AIDE also uses gradle witch is great IMO. But all that said I’ll create a project and see what I can do. :smiley:

SO I looked into doing this and it seems that there isn’t a quick solution to having a project you can open in both Android Studio, NetBeans, and AIDE :frowning:
So to avoid spending a lot of time figuring this out I am going to just move on. The idea of creating the project to work on AIDE was to make it easier for me to code on the go.

So sorry to all my fellow monkeys maybe I will attempt to make this work at a later time.

new control added WaterMovementControl tell me what you think. In the original game the swamp water’s texture scrolls constantly away from the drainage pipe this control is designed to do just that.

public class WaterMovementControl extends AbstractControl {
	private float offsetX;
	private float offsetY;
	public class WaterMovement() {
		offsetX = offsetY = 0;
	public void setSpatial(Spatial spatial) {
	public void controlUpdate(float tpf)
		if(spatial != null) {
			float moveX = (offsetX >= 1) ? -offsetX : tpf;
			float moveY = (offsetY >= 1) ? -offsetY : tpf;
			offsetX += moveX;
			offsetY += moveY;
			spatialUpdate(spatial, moveX, moveY);
	public void controlRender(RenderManager renderManager, ViewPort viewPort) {
	public void spatialUpdate(Spatial spatial, float moveX, float moveY) {
		if(spatial instanceof Node, tpf) {
			nodeUpdate(spatial, moveX, moveY);
		} else if(spatial instanceof Geometry) {
			geometryUpdate(spatial, moveX, moveY);
	public void nodeUpdate(Node node, float moveX, float moveY) {
		List<Spatial> children = node.getChildren();
		for(Spatial child : children) {
			spatialUpdate(child, moveX, moveY);
	public void geometryUpdate(Geometry geometry, float moveX, float moveY) {
		Mesh mesh = geometry.getMesh();
		VertexBuffer texCoordBuffer = mesh.getBuffer(VertexBuffer.Type.TexCoord);
		FloatBuffer texCoordDataBuffer = (FloatBuffer) texCoordBuffer.getData();
		while(texCoordDataBuffer.hasRemaining()) {
			int position = texCoordDataBuffer.position();
			float value = texCoordDataBuffer.get();
			if((position & 1) == 0) {
				texCoordDataBuffer.set(position, value + moveX);
			} else {
				texCoordDataBuffer.set(position, value + moveY);
	private void resetTexCoords() {
		if(this.spatial != null) {
			spatialUpdate(spatial, -offsetX, -offsetY);
		offsetX = offsetY = 0;

I will add moveSpeedX and moveSpeedY later time witch will be multiplied by tpf at update time and set to the moveX and moveY variables accordingly.

1 Like

@ndebruyn @pspeed

So here is a real update :stuck_out_tongue:

The Penelope model for the tutorial comes in several parts the main FBX mesh then additional FBX files one per animation. you can import the main file directly into blender using the Autodesk_FBX plugin. If you attempt to import the other models noting will happen not even an error not that I have seen anyway. So I converted the animation FBX files into FBX 2013 format using the FBX 2013.3 Converter. So I import those new FBX files into blender and, now I have a bunch of blender files on for each FBX all with there armature and animations. Now in blender you can Append all the animations into one using the Append option in the File menu.

This is almost worthy of its own topic there are tons of people asking for this.

1 Like

Yes, yes and yes. Please tell us how you cleanly append the animations into a single file.
My Blender-fu is not strong enough for this atm :smile:

Also that sounds like a working FBX -> … -> JME pipeline

@skidrunner, sounds like a proper solution.
Let me check it today and test it. I will let you know.
Thanks for this info.

Yes, please do.

@erlend_sh and @zanval I have only appended one animation to the main mesh, the WIN animation :wink:. That being said I will start from the beginning, get some screenshots, and start a new topic after I am done.