skullnbones

Member Since 25 Nov 2007
Offline Last Active Jun 21 2011 02:31 PM

Wry Little Pillface

02 May 2011 - 06:00 PM

Wry Little Pilface
Trouble has struck the home for the criminally insane.  Patients
are wandering freely in need of their meds.  Pill them up for the
orderly to take them back to their rooms.  If the pill wears off
while they are being escorted, they will be very difficult to
handle!
If you get too close to them they will get aggrevated and
pursue you with intent to attack.
pill effect is less if patient was angry.

removed od'ing, pill them as often as you like now.

press R to restart, arrows move, space to fire

(tip: it's more of a puzzle than a shooter)

Spoiler

still lots of bugs, and only 1 level but it gives a feel for the core mechanic.

Squiggles

25 April 2011 - 05:39 PM

Rotate tiles to build the longest line. My record is 73.
Tiles are procedurally generated for endless map possibilities.

Squiggles

Source for the core of the game. (key controls only)

quaternion conundrum [SOLVED by Tepi]

23 March 2011 - 05:22 PM

Basically I need to affect a point the same way this does:
d3d_transform__rotation_axis()
using the same arguments.

If been working with the psuedo code found here.
But it did not work the same.

```//quaternion multiplication
Quaternion quat_mult(Quaternion q1, Quaternion q2)
{
Quaternion result;
result.a = (q1.a*q2.a -q1.b*q2.b -q1.c*q2.c -q1.d*q2.d);
result.b = (q1.a*q2.b +q1.b*q2.a +q1.c*q2.d -q1.d*q2.c);
result.c = (q1.a*q2.c -q1.b*q2.d +q1.c*q2.a +q1.d*q2.b);
result.d = (q1.a*q2.d +q1.b*q2.c -q1.c*q2.b +q1.d*q2.a);
return result;
}

//Quaternion multiplication without the .a component
Point quat_pointmult( Quaternion q1, Quaternion q2)
{
Point result;
result.x = (q1.a*q2.b +q1.b*q2.a +q1.c*q2.d -q1.d*q2.c);
result.y = (q1.a*q2.c -q1.b*q2.d +q1.c*q2.a +q1.d*q2.b);
result.z = (q1.a*q2.d +q1.b*q2.c -q1.c*q2.b +q1.d*q2.a);

return result;
}

//Uses quaternion mathematics to perform a rotation
Point quat_rot(Point point,Point rotVec,double angle)
{
double sinCoeff;
Quaternion rotQuat;
Quaternion pointQuat;
Quaternion conjQuat;
Quaternion temp;

sinCoeff=sin(angle*0.5);

rotQuat.a = cos(angle*0.5);

rotQuat.b=sinCoeff*rotVec.x;
rotQuat.c=sinCoeff*rotVec.y;
rotQuat.d=sinCoeff*rotVec.z;

pointQuat.a =0;
pointQuat.b = point.x;
pointQuat.c = point.y;
pointQuat.d = point.z;
//calculate conjugate of the quaternion
conjQuat.a = rotQuat.a;
conjQuat.b = -rotQuat.b;
conjQuat.c = -rotQuat.c;
conjQuat.d = -rotQuat.d;

//perform  rotation
temp=quat_mult(rotQuat,pointQuat);
return quat_pointmult(temp,conjQuat);

}
```

but this collapsed everything to roughly<2 degrees of freedom.

Then I tried normalizing the axis without the angle and still did

not get the result I was after (It still scaled things on me too).

The Wiki also mentions keeping things accurate by noting the

magnitude of the quaternion, but gives no hint as to how to apply

it:

The "quality" of the multiplication under approximate arithmetic

(such as floating point) could be retained by using quat_mult

instead of quat_pointmult and noting the magnitude of the .a

component of the resultant quaternion.

Has anyone figured out how Game Maker is performing this operation?

bzLight extension

27 December 2010 - 06:00 PM

This will be of use to 3d tool makers. You will not find it very useful for realtime. 2d tool makers may find it useful too, but there is an excellent extension directly targeted to 2d use that might be more intuitive.

Cast shadows use spotlights. Balance lighting against material. Get result as a bitmap file or get a per vertex result that can be transfered back from the extension. Minimum example included. Variables in the extension are very visible in my program Baked, you can play with them directly to see if things work the way you expect.

bzLight

Here is the dll and scripts for those that prefer:
bzLightDLL

free for any use.

Get Baked, updated April 14 2011

27 November 2010 - 08:59 PM

Use it to create lighting 'tiles' that can be reused. Place basic lighting in the color channel of your model or save advanced lighting as a texture. Baked will also bake in transforms and calculate normals.

All you need to do to getting shadow casting with the studio feature is import your model, uncheck 'exclude'on your model (all models load excluded from causing shadows by default), check a light to cast shadows and then render.(hold down control as you click studio and you get a floor-only studio). Studio pieces have proper texture coords auto-generated.

Credits, thanks to: (ordered chronologically as help appeared in Baked)
GMC members: Maarten Baert, Medusar , 1101 and Tepi

baked05a

Baked on Yoyo

major update April 14th 2011

The dll used in the lighting calculations can be found here.