27.Mar.07 Lecture 9
Midterm, torque internals, physics, pathing

Motivate

Internals

I've spent a bunch of time in the Torque code. An interesting page for those that would like to add their own OGL objects to torque is this page by Melv May.

Physics

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.

Debugging

I want to go through a debugging problem I've been working on lately.

Pathing

I have still no completed a pathing tutorial and will talk about what I do have so far.

Contest Scoring

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).

CPSC240 - Games Development
Chapman University
Instructor: W. Wood Harter
(c) copyright 2006-2007 - W. Wood Harter - All Rights Reserved
Screen shots on banner (c) copyright their resprective owners