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

Pages: [1] 2
Projects / formula legends
« on: December 06, 2013, 09:08:38 pm »
Well, I've released my new game on google play this week.
Formula legends. Not the greatest title in the world but all the cool titles seem to have already been taken.

Was wandering if anyone with a Galaxy3 could have a look? I've gotten a comment saying the controls don't work on that phone.

I know there are some collision problems. I'll try and fix those when I get a chance.

Support / camera roll from object
« on: April 05, 2013, 01:12:05 am »
Hi all,

I've got a little problem with my camera and not sure how to fix it.

What I have is a car that is rotated by a dummy. the car body is a child of this dummy.
I then have an extra camera dummy that is attached to the rotation dummy. My camera uses that position.

Code: [Select]

controls_camera = world.getCamera();
controls_camera.rotateY((float) Math.PI);

tempVector = carCameraDummy.getTransformedCenter();

But what happens is shown in the image below:  (front view of car)

Image A is the setup: camera above the car.
Image B is what happens when my car rotates.
Image C is what I want to happen.

Does anyone know how to do that or point me in the right direction? I assume I need to get matrix from the dummy and apply it to the camera?

Support / get angle from objects
« on: November 25, 2012, 09:38:48 pm »
Here's a problem I'm having.

I want a car to align to a surface. so what I've got is 4 dummy objects that are in position of the wheels.
These dummies are always on the ground polygon where the wheels intersect the ground.
That all works fine but how do I align my car to the angle created by these?

I've got this (forward angle only) but it doesnt quite work:
Code: [Select]
forward_angle = collision_fr_dummy.getTransformedCenter().calcAngle(collision_fl_dummy.getTransformedCenter()););
player_vectortest_matrix = player.getRotationMatrix();

if (player_vectortest_matrix.getYAxis().z > forward_angle) {
car_angle_current_frame.z = forward_angle;
} else if (player_vectortest_matrix.getYAxis().z < forward_angle) {
car_angle_current_frame.z = -forward_angle;
} else {
car_angle_current_frame.z = 0;


any help much appreciated

Projects / cheeky monkey
« on: October 30, 2012, 11:47:02 pm »
hello everyone

just would like to announce my latest game: Cheeky Monkey.
It's a semi-3d jumping type game. Not sure how to describe it. I started this because I wanted something quick to make. Hope you enjoy it and any feedback is more than welcome.

You can download it from google play and there is a free and commercial version:

Projects / Gunship Assault
« on: May 21, 2012, 07:54:56 pm »

It's been tough going at times and it sure has taken a long time but my first game on android is finally ready; Gunship assault.
You can choose a helicopter of your choice and fly it through 3 big environments. There are enemy helicopters, boats, tanks, and plenty of objects to destroy.

I admit that graphically it could have been better but my team mate abandoned the project and was left to do it all myself. Framerate is a bit dreadful at times but you can adjust
detail levels in the menu. In the end I decided to release it otherwise I would be working on this forever.

Controls are best with the joystick and instructions are a bit unclear.
Basically, you press the radar to get to the map and once an objective is in the center of the screen, the objective is selected as your current objective. The arrow at the top points to it.

I hope you enjoy it and I welcome any feedback and suggestions

Oh and Mr EgonOlson and the forum; Thank you very much for all your help and making this engine available. (for us to abuse) :)

paid app:

Free version:

Support / out of memory...again
« on: May 10, 2012, 02:46:09 pm »
I have a problem when resetting my game.

I have a couple of levels which are populated from a pool of objects using an xml file. everything works fine untill i restart a level or pick a new level. I think my models remain in memory but i do clear them.

this is how it works:

I'm declaring an array and a world so i can easily access my objects:
Code: [Select]
private List<Object3D> worldObjectsArray = new ArrayList<Object3D>();
private List<Integer> worldObjectsArrayType = new ArrayList<Integer>();//identifies the object type
private Object3D worldEnvironment = null

Then i load my world when a level is selected from the frontend:
Code: [Select]
worldEnvironment = Loader.loadSerializedObject(res.openRawResource(R.raw.levelA));

then I process an xml file and get the object type from it: (exluded the loop from example)
Code: [Select]
node = getxmlelement;//this is an xml element loaded from a loop

if (node == "buildingA") {
tempobject = new Object3D((Loader.loadSerializedObject(res.openRawResource(R.raw.buildinga))), true);
objectType = 1;

if (node == "carA") {
tempobject = new Object3D((Loader.loadSerializedObject(res.openRawResource(R.raw.cara))), true);
objectType = 2;

tempobject = null;

which all works fine, my world is populated and I can access all objects no problem.
All transforms and data comes through from the xml fine.

but when I reset my game or game over I call reset:

Code: [Select]
if (worldObjectsArray.size() > 0) {

for (int i=worldObjectsArray.size()-1;i>=0;i--) {
if (worldObjectsArray.get(i) != null) {
worldObjectsArray.set(i,null);//probably overkill

and reset the world:
Code: [Select]

after this, my world.size() is zero, the array is cleared and i should have some more free ram but no.
the memory that was filled when loading the level is not cleared and it looks like the model references are kept in ram. Because when i reload the level, more ram is being used untill i eventually run out of memory and the game crashes. (I'm looking at ddms here)
If my xml file has 50 objects, i can probably restart the game about 5 times, if i have 300 objects, i can only play only once.

I've looked on the forum but cant find anything that fixes it. I've tried world.disposeAll(), removing and reloading the textures. removing mesh data, etc.

Object polygon sizes are about 100 polygons each. Serialized
Level is about 2000 polygons.
Textures are all powers of 2, no bigger than 512x512 (compressed and 4bp) probably no more that about 2 for level and 5 for the frontend

I've run out of ideas so any help would be erm.. helpful.

Support / getting and re-applying object rotation
« on: April 04, 2012, 11:26:44 pm »
Hi all,

I'm struggling with saving my game state. basically when the player quits my game, I want to save the health, position and rotation of the player.
Everything works fine apart from the rotation part.

To rotate my player in the world, I use either a joystick or screen tilt input and apply it like this:
Code: [Select]
I thought that I could just take the value like this:
Code: [Select]
save_rotation_data_Y = player.getRotationMatrix().getYAxis().x
then when the game restarts, all objects are re-initialized (player rotation is back to default)
and then I reload the rotation data and apply it like this:
Code: [Select]
But the rotation is not what it should be. The data saves and loads correctly (fuel, missiles, translation all are fine) but I dont think I'm looking in the right place for the rotation.
I've tried every axis and even tried saving out the rotation matrix but I know even less about that so I must be doing it wrong.

Any help would be very much appreciated.

Support / object on screen using interact2d
« on: March 07, 2012, 09:31:51 pm »
Hey all,

can anyone help me or explain to me the interact2d function? I'm trying to put an object on screen but I cant get it in the right place.

this is sort of what i want to do: A 2 polygon plane that fits nicely into a radar frame. (radar frame is blitted on screen)
for example using a screen size of 800x480, the radar frame is always an 8th of the size of the frame buffer width (100 x 100) so the middle point where the radar object should be positioned is half of that (50 x50)
It's not a pivot problem but the radar object is a child of the player object and the camera is offset from the player

Code: [Select]
ui_frame_pos_x = (fb.height/16);// gives us the middle of the radar frame
ui_frame_pos_y = (fb.heigth/16);

SimpleVector dir=Interact2D.reproject2D3D(camera, fb, ui_frame_pos_x,ui_frame_pos_y).normalize();
but that doesnt work, the radar object appears to be positioned at (150x0)

this does work (sort of) it's roughly in the right place but I cant accept that this is right:
Code: [Select]
SimpleVector dir=Interact2D.reproject2D3D(cam, fb, (-ui_frame_size_x+(ui_frame_size_x/2))+8, (ui_frame_size_y+ui_frame_size_x/2));
also, when my screen is 1024 wide, the above formula doesnt work and I need to do this, which is absolutely crazy:
Code: [Select]
SimpleVector dir=Interact2D.reproject2D3D(cam, fb, (-ui_frame_size_x)-(ui_frame_size_x/2)-(ui_frame_size_x/16), ui_frame_size_y+(ui_frame_size_y/2)-(ui_frame_size_y/16)).normalize();

So I dont think i'm doing it right. I have considered doing a lookup table for screen sizes but that's my last resort.
Any help much appreciated

Support / Objective arrow indicator
« on: January 22, 2012, 10:43:42 pm »
Hi all,

I've been looking to implement a target indicator. An arrow at the top of the screen that always points at my next selected objective.

I've been using the code in this topic:,1385.msg9704.html#msg9704

But that doesnt work as i want it to. the arrow seems to point at a point in the world when i move forwards and backwards
but when I rotate the helicopter, the arrow doesnt move and so the rotation goes all wrong.

It's probably to do with my setup:

playerLift (movement dummy)
playerTilt (rotation dummy - child of playerLift)
Player (helicopter model - child of playerTilt)
PlayerRadarDummy (dummy that positions the radarmap and compass - child of player)
PlayerObjectiveArrow (arrow mesh - child of playerRadarDummy)

WorldObjects is an Object3D array that holds my collection of objectives.

Code: [Select]
SimpleVector lookAtPoint = playerLift.getTransformedCenter().calcSub(WorldObjects.get(0).getTransformedCenter());
lookAtPoint.add( WorldObjects.get(0).getZAxis() );
SimpleVector direction = new SimpleVector(lookAtPoint.calcSub( object.getTranslation() ) );
Matrix rotationMatrix = new Matrix( direction.getRotationMatrix() );
PlayerObjectiveArrow.setRotationMatrix( rotationMatrix );

Any help would be much appreciated as this is the last piece of code to make my game work.

Support / multiple worlds and clipping planes
« on: September 24, 2011, 09:21:28 pm »
Hi all

Just a quick question about multiple worlds and clipping planes.

I've got 2 worlds, one is my terrain and skydome and has a large clipping plane (200000) and I have a second world for my scenery objects with a clipping plane of 5000. The terrain object is about 4000 polygons and is my entire playing world.

My objects sit on top of the scenery but when my objects get in range, they seem to slowly emerge from beneath the terrain and visa versa if I move away from them, they look like they sink beneath the terrain.
I am not sure what is happening, if i have all my terrain and objects in the same world, they are fine but putting them in the second world it looks like they are moving in the Y axis.

I know, I know, I probably shouldnt use a clipping plane that large but I need the world to be as big as possible. And I dont want to draw all my objects in the same world because they would all be drawn even if they're miles away.

If there is no solution to this, is there perhaps another way to cull objects when they are a certain distance from the camera without having to loop through all of them?

Thanks for any suggestion and help

Support / getting Object3D properties from a class/array
« on: June 18, 2011, 04:40:44 pm »
Hi all,

I'm stuck at something that probably isnt for this forum but not sure how to google this problem.
Bear in mind I'm still a Java amateur so that doesnt help.

I've got an Object3D array like this that gets pre-loaded on startup so it's got several different objects/classes in there.

Code: [Select]
private List<Object3D> WorldEnemies = new ArrayList<Object3D>();

Then I loop through my list:

Code: [Select]
int tp = 0;
int end = WorldEnemies.size();

for (int i = 0; i < end; i++) {

Object3D Object = WorldEnemies.get(tp);
int WayPoint =  Object.GetWayPoint ();

But the problem is getting the WayPoint from the class. Eclipse wants to Cast the object to a certain type like so:
Code: [Select]
int WayPoint =  ((msam) object).GetWayPoint();But that doesnt really work. It's not really giving an error message, the game just slows to a crawl.
(msam is an object that has Getwaypoint defined but there will be different objects with the same function later)
Getwaypoint returns an int from the class.

Is there a way to make the WayPoint a part of the Object3D so I always have access to it no matter the object type?
Or could I store the object type in a separate array and do an if/then?

oh i'm developing for android btw but this is more a java question i think.

Thanks for any advice

Support / child transformations
« on: March 26, 2011, 07:41:54 pm »
Just wandering if anyone could help me (again)

I've got player helicopter in a hierarchy in this order:

playerlift  - (dummy) controls the forward speed and Y rotation (steering)
playertilt  - (dummy) tilts the chopper forwards and backwards to indicate movement
player - (Object3D) rotates in the Z direction for banking the chopper
missiles - (Object3D) inherits all rotations untill fired.

The helicopter height never changes.

when I set up my models, the missiles are parented to the player so everything works fine. The problem happens when I fire a missile. I un-parent the missile so that it can continue it's current direction. But when doing so it resets to it's original position and rotation.

Now, my maths being what it is I'm a little bit stuck here (again).
There are some threads about this but could anyone give me a pointer on how to do this?

I've got this from the forum:

But how would I use this in a hierarchy like mine? Should I get the transform of each parent and apply that to my missiles?

Support / model offsets problems
« on: March 17, 2011, 01:17:20 am »
Just been trying to get my gameworld lods to work and I'm having some trouble.

My world is a large quad plane (landscape) that is sliced up into smaller erm,... slices. Each slice is about 3000 faces.
I move each slice to position 0,0,0 in 3dsmax, reset the xform and set the object pivot to 0,0,0 and then export to 3ds format as lod1.
I then apply an optimize modifier so that there are about 1000 triangles and is saved as lod2.
Finally another optimize modifer results in about 200 triangles and that's saved as lod3.
(I need to do it like this because my gaming world is big. On top of the terrain are instances of all my objects so framerate is tight.)

When I load lod1, it is roughly where i expect it to be in world space
But when I display lod2, it is a lot lower in world space than lod1
Lod3 appears even lower down than that.

I'm not transforming the objects, just load and build.
I tried this with loading 3ds and serialized files.

I've tried everything I could find in the forum but no help. I've been using 3dsmax for a long time now (I am a full time game developer/technical artist in real life) so i know a little bit about 3dsmax and can't think of anything else to try.

I am just guessing here but could it be that the amount of verts or faces is being subtracted (or added) from the object position in the load process causing the offset?
(I know it is a known issue but I really need this to work)

Thanks for any advice

Support / overlay help needed
« on: March 12, 2011, 01:13:40 am »
12 oclock on a friday night and I'm sitting behind my computer.  :'(

Anyway, I've been trying to work on a radar that is always visible on screen but I'm not fully understanding the overlay.

I've borrowed some code from the forum:

Overlay uiRadar = new Overlay(world, fb, "uiRadarT");

It does slow things down quite badly so something is working but the overlay isn't showing. Texture shows fine when i do this (using texturepack):

fb.blit(uiRadarT, 0, 0, 0, 0, uiRadarT.getWidth(), uiRadarT.getHeight(), 128, 128, 100, false, null);

It says this in the java Docs:
"A scaled blit has to be applied by the application each frame. "

But I'm not getting it. how do I apply a scaled blit? What is a scaled blit?

Support / cant rotate custom object
« on: February 16, 2011, 01:22:49 am »
Hi all,

I've got a problem where I'm trying to rotate an object but it just gives me a NullPointerException.

I create a standard cube which I can rotate fine. no problems.
But when I load a serialized model and rotate the new object, the object cant be found and the screen stays black.
Funny thing is, if i comment out the line that rotates it, the new object gets displayed fine in the scene.

cube.rotateX(0.05f);  //works fine
building.rotateX(0.05f);  //doesnt work

Everything gets declared and added to the world.
Any ideas anyone?

Pages: [1] 2