Blackshift's mechanics system is what I call the code that handles pushing blocks, deciding what is pushed by what, what gets to move, what doesn't, and what is crushed. It's not a full physics simulation, it's much simpler and more abstract, which ironically makes it more difficult to code. Why? Because fake, abstract physics is specific to your game, whereas more realistic physics can be achieved using off-the-shelf libraries with little or no modification. Neither is better, but each suits a different type of game. Of course, you're free to use the wrong sort of physics for your game on purpose...
|Not Tetris 2, Stabyourself.net|
Blackshift's mechanics are, in a nutshell:
- The player, enemies, arrow blocks, and anything on a force floor generates a force.
- Forces propagate through blocks.
- Clusters of sticky blocks always move together.
- Once all the forces are propagated, anything that can move does.
- Anything that can move in more than one direction moves in the direction of the strongest force.
There are some other rules as well, to deal with annoying questions like "What happens if a cluster of sticky blocks has two different force floors under it?" and "Can arrow blocks push each other?"
In the end, I'm happy with how the mechanics work and I think we'll be able to get a lot of puzzle mileage out of them, especially when combined with the four sorts of blocks:
- Normal block; can be pushed and can push other blocks along in long columns.
- Heavy block; can only be pushed by the player, not by other blocks.
- Arrow block; pushes itself in one of four directions.
- Sticky block; always moves together with adjoining sticky blocks.
That should be enough for now, but if I think of any awesome new blocks (that won't mess the code up) I won't hesitate to add them. Any ideas?
(I'll post a video of the new mechanics in action once I'm free of all these embarrassing placeholder graphics.)