Post feature RSS Breakable stuff in Quake-based games

The Quake engine and its derivatives are perfectly capable to handle breakable stuff. Its absence from Quake was a deliberate choice, not a limitation.

Posted by on

It is a common misconception that the Quake engine, and by extension its derivatives like Darkplaces, do not allow destructible architecture or objects, simply because Quake lacks them. That, however, was not an engine limitation, but a deliberate choice made by the level designers, who decided not to implement a feature that the engine is perfectly capable of performing.

Ego Enforcer features breakable architecture and objects, which I implemented in QuakeC (so the original executable is not modified), making use of all the unused bits in the spawnflags variable. All I had to do was recycle the code that generates gibs when an enemy is blown up. I applied it to the function that manages func_buttons, adding a routine that reads the value of spawnflags and uses it to calculate which type, of how many, models representing fragments must be generated and thrown around.

Now that I created the appropriate models (representing fragments of metal, wood, stone, glass, and ceramic) and the routine for the desired behavior, all I have to do whenever I want to create something that can be blown up is to set the correct value of spawnflags to a func_button (and explicitly specify its origin), which will behave as destructible architecture in game.

mymod20220209235322 00

mymod20220209235326 00

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.