Never End: Crushing Blocks

First, some banner art because I can:

Yea it’s kind of plain, but it will have to do for now (and it’s quite hard to convey Never End gameplay elements in a still image).

With that out of the way, I’m glad to say that crushing blocks are now a reality in the game! This was one of the harder problems I’ve had to tackle so far (read this thread to find out why), and it involved actually sitting down and thinking really hard about how collision is implemented in Unreal Engine. Thinking and programming…who knew, right?

For anyone interested in the solution, it involved an insane amount of KActor constraints applied to each group of cubes that made up the larger crushing block. If you’ve ever taken a course in chemistry, you can kind of relate this to intermolecular bonds: diamond is strong because of its lattice structure. In terms of the 2D constraints I would be making in UDK, this means a lot of triangles (the edges constraints, the vertices KActors).

The number of constraints needed increases roughly linearly with the number of KActors — for 3 KActors you need 3 constraints, for 5 you need 10, for 6 you need 15. What this does is ensure that the individual cubes don’t move with respect to their neighbors, since they are bound by pretty much all their neighbors, making a nice solid deadly block of fun.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s