Wednesday, November 16, 2011

The game... it's alive?

Well the very basic prototype of the game is running:



Now to point out some of the things we have:

  1. The main character R3mote as a rigid body which can move through setting its velocity.
  2. The main character R3mote can jump by applying a force to it.
  3. When left mouse is clicked a sphere is generated at R3mote's position, (A place holder for firing the laser).
  4. The platform highlighted in red is a phantom, and when the player collides with it they are pushed up. (A test for collision events and triggers)
  5. The player is constrained to a 2D plane in the XY axis of the scene.
Of the list I worked on the constraint plane, which is a constraint class in Havok and I only needed to do some perusing in the demo files to find out how to constrain the player. It just constrains the pivot of the player, which is at their feet, to a 2D plane that is shown by the flat plane facing the camera. Something that needs to be done is that the player shouldn't spin around when they jump, and any collisions with other rigid bodies causes the player to spin onto their head. This can be remedied by using a character controller class in Havok, which sets the player's inertial tensor to infinity... making it not spin.

I also worked on the movement, but those were just four lines of code. Though since the velocity of the player is set to move left and right, the player can just float across the screen. This is just place holder , and will be changed. 

Also checking out the Character Control documentation it shows how to create rigid bodies that would stop colliding when the player state is set to jumping. This would be a great way to make platforms that the player can jump through, but land on. Havok really seems to be on our side.

No comments:

Post a Comment