3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Fun with static Rigidbody Imposters  (Read 1824 times)

jestermon

« on: April 03, 2011, 02:47:51 PM »
With the introduction of rigidbody imposters, 3d Rad has has extended it's game development capabilities to give what could only be done with pure coding engines.

Thanks Fernando, you have outdone yourself with this awesome feature.

Here's my first little test with this marvelous invention.
It shows that you can generate platform games, unlimited terrains, and a host of other "fantabulous" game "thingies" on the fly, by using imposter STATIC rigidbodies.

sample code
Code: [Select]
int CAR = OBJ_0;
int BLOCK = OBJ_22;
int maxBlocks = 500;

void Main()
{
   Quaternion q;
   Vector3 v;
   int i;
   if(iInitializing()){
      iObjectOrientation(BLOCK,q);
      iObjectLocation(BLOCK,v);
      iObjectImpostersCreate(BLOCK,maxBlocks);
      for(i=0;i<maxBlocks;i++){
         v.z = i*10;
         iObjectImposterSet(BLOCK,i,q,v);
      }
   }

   if(iDeinitializing()){
      iObjectImpostersDestroy(BLOCK);
   }
}

This is only for v7.16, Sorry guys.. But you can run the little exe, so that you can see what's cooking.

This sample places 500 static IRB's (Imposter Rigidbodies) in a straight row for the car to drive on.

Now go forth and multiply your collidable .. Buildings, Rocks, Lamp posts, Terrains blocks, roads, or whatever your imagination can conceive.
« Last Edit: April 03, 2011, 02:52:08 PM by jestermon »
« Reply #1 on: April 03, 2011, 03:13:11 PM »
Nice stuff jestermon, and thanx for the kind words!
« Reply #2 on: April 04, 2011, 08:31:35 AM »
Thank you for this demo. Still learning, and your examples are great source for me.
Starting from this sample, how can the orientation of the blocks be modified in the script?
(not yet familiar with the Vector3 and Quaternion... :'()

jestermon

« Reply #3 on: April 04, 2011, 09:49:02 AM »
To use the 10m x 10m blocks, you can place each imposter at a new x,y, z coordinate by setting v.x to the x value, and v.z to the z value. Always set v.y to 0, so that they are the same height. You can use all sorts of maths to place your IRB's where you need.
« Last Edit: April 04, 2011, 09:55:05 AM by jestermon »
« Reply #4 on: April 04, 2011, 10:24:17 AM »
Nice project J :)
« Reply #5 on: September 16, 2013, 11:26:43 AM »
NICE!!!!! I love it! ;D

L33TMaster

« Reply #6 on: September 20, 2013, 11:59:11 AM »
wow ;D
Pages: [1]