Thursday, November 4, 2010

Demo #4 Breaks ALL THE RULES

Demo 4 brings a host of changes to the core packages, including improvements in the rendering pipeline and a basic implementation of a physics system.

Try out this EXTREME DEMO
Edit: Demo restored!

If you move the inversion block too fast, or crush the gray block, it will automatically move to a nearby safe position. In the actual game, the player would have been killed when the gray block turns red.

So anyway, the graphics are still the same, but now the background (collection of all non-moving masses) is pre-rendered at creation time. The game then uses the pre-rendered background as the canvas to paste the potentially moving objects on. When the backgrounds get more diverse and complex, this will definitely save some valuable render time. It also allows for a neat and simple environmental destruction mechanic, where applying a blank color to the pre-rendered background would permanently erase the black, interactive segments. One way to utilize this could be an enemy firing a laser through the world and leaving a hole that the user could walk through, or that objects could fall through.

The physics system is quite simple. Every mass has a velocity vector, and the arena has a known acceleration vector. When you press a key, such as <LEFT> or <RIGHT>, the gray mass is given a certain velocity in the positive or negative direction perpendicular to the direction of acceleration. It’s simple, fast, and allows me to tweak the way gravity works at any given moment ("gravity wells" WILL be a game play mechanic).

You can switch the gravitational direction by pressing <UP> and <DOWN>. <SPACE> jumps.


Also, the movable block now locks to a 5 x 5 grid!

4 comments:

  1. Wow! That all works very well. Good job. I feel like the jump height should be greater though.

    ReplyDelete
  2. are the directional controls supposed to invert when you flip gravity?

    ReplyDelete
  3. Yup! Soon the whole screen will flip

    ReplyDelete
  4. 0.o
    The idea of gravity wells makes me happy, as you know I wanted to play with "Electro-Magnetic Fields".
    Keep up the awesome work!
    (P.S. the inversion thing was an unexpected/cool addition.)

    ReplyDelete