All game base items include some rudimentary physics.
It isn't a perfect physics engine, but it does mimic a number of physical
properties that may be useful for your games. I created a simple ball
with a spherical collision area.
Here is the datablock for the ball.
datablock ItemData(Superball)
{
// Mission editor category, this datablock will show up in the
// specified category under the "shapes" root category.
category = "Items";
// Basic Item properties
shapeFile = "./superball.dts";
mass = 10;
rotate = false;
static = false;
elasticity = 0.7;
maxVelocity = 100;
sticky = false;
//friction = 0.5;
};
If you add one of these to your mission and find
the item number (gues 1836), you can use calls like the following in
the console window.
1836.setVelocity("0 0 100");
This will send the ball rocketing skyward. Try it
out.
You can also call the following:
1836.applyImpulse(1836.getPosition(),"0
0 100");
This will have very similar effects.
Given this code, you could add an onCollision method
to have the ball move away from the player whenever it is touched.
This is the superball I created.
I'm still working on a complete scoring system, but it will be very
similar to last year.
Completeness: (25 %)
Replay/fun factor (20 %)
Uniqueness (15 %)
Story (10 %)
Graphics (10 %)
Simple graphics that are used in a unique way will also receive high scores here.
Audio: (10 %)
Student Choice: (10%) (max 90 points = 18 students x 5 points each)
Networked/Multiplayer: (+15%) (added to the final
score).