I integrated the bouncey ball code into BM2. The first screenshot below shows how a boulder particle will follow along the terrain at the height of it’s radius. The boulder also rolls with the correct rotation as it moves along the terrain (hard to see from this picture – so just trust that it works :) And no, I didn’t just do something like "_rotation += 7" for all you action script critics. ©

The cool thing about the ball particle is that it can be used for many new types of weapons, spells or other reactive environmental effects. For example, imaging a boulder placed at the top of the hill. Perhaps you might be able to dislodge it with a well place bomb arrow, sending it rolling down the hill crushing all the ground troops in its path.

I’ve implemented it so I can adjust the bounciness and friction levels of the ball and surface the ball collides with. This alows me to simulate very different particles using the same code (e.g. boulder on grass, vs boulder on sand, or rubber ball on grass etc.)

Test Boulder Rolling (meteor graphic)

The other new technology I added is the effect the terrain has on ground unit speed. Ground units now travel relatively faster when moving downhill and relatively slower when going uphill. The amount of boost or slowdown is proportianl to the steapness of the terrain. Click on the image below to see a sequence of screenshots that kind of demonstrate this. It probably would’ve been more obvious if I used only one type of unit in this example, but I didn’t have time to do this just for this demo.

Enemy Has an Uphill Battle

Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *