Skip to main content

Blog Archive

Spotlight: Agent767’s Script for Fully Destructible Worlds

February 16, 2013

by JacksSmirkingRevenge


We like using our Spotlight articles to feature not just famous ROBLOXians, but those who are doing innovative things with our platform. If you pop over to Agent767’s profile, you’ll see different iterations of Crossroads, a map that has become universally known on ROBLOX. Each of the iterations feature a slightly modified fragmentation tech test, and we’re here to tell you that these tests are awesome. 

Agent767 has written a script that opens up a huge realm of possibilities in ROBLOX. With this script, parts affected by explosions or rockets crumble apart incredibly realistically. Every wall, floor, and object in Agent767’s Crossroads map is fully destructible and will react differently depending on what angle they’re hit from and with what weapon. If you drop a bomb on the floor, for example, the explosion will create a crater that is several studs deep. If you drop another bomb inside that crater, you’ll make an even larger hole with the second explosion.

You can shoot holes into walls. Dig holes in the ground, as deep as the floor baseplate goes. Clip the sides of trees and blow them in half. It’s really cool stuff. Everything blows up. Think of the possibilities.  During a brief break in the middle of our interview, Agent767 grabbed his pick axe and carved “ROBLOX” into the terrain, while he waited. Don’t believe me? Evidence:

“I just wanted to try and see what you can achieve using Lua,” said Agent767, in an online interview. “Basically, the script takes all parts that are close to an explosion, and splits them into eight smaller parts. All parts close to the explosion split into smaller parts as well. This is repeated until the new parts reach a minimum size and can’t split anymore.”

Without the introduction of our featherweight parts, this would be impossible–creating that many new parts in real time would create too much lag. Agent767 even mentioned he “didn’t expect it to run as well as it actually does.” He’s curious as to how others users can implement the system he developed in different places and types of games. That’s why the script is totally open source.

“You could create an awesome fully destructible brick battle game where you could literally blow everything up,” says Agent767. “Or you could build a mining game where you could mine through giant dirt blocks.”

Wall in the way? Thanks to this script (and a bazooka), it ain't anymore!

The script is far from finished, and there are many different iterations of it that feature different levels of detail, all of which you can access from Agent767’s profile page. Keep in mind, Agent767’s script is running on Crossroads, which is a relatively small map. Even then, each explosion creates more and more parts, which can eventually slow the game. We’re curious to see what this script does in larger places, with more parts. We encourage you to try it out. We certainly did. Creative Director John Shedletsky (Telamon) applied the script to Chaos Canyon, a frantic deathmatch-style game, and said it was “fracticious.”

John shares his thoughts on Agent 767’s script:

I had a little bit of trouble getting the script to work but that’s because I didn’t follow the simple directions in the comments of the supplied script (hint guys, read the directions). After I found those, it took me about 20 seconds to convert sleepy old Chaos Canyon into a fracticious tech demo. I had to crank down the maximum number of players for the place from 30 to 8, but after I did that multiplayer play was smooth. I took a couple of screenshots 5-10 minutes into a battle – the level was totally trashed. In addition to allowing for new strategies (like blasting through walls), the sheer extent to which the level can now be transformed by “battle damage” is, for lack of a better word, epic.

Adding this script made Chaos Canyon even more frantic

According to Agent767, you can decide how detailed your craters are by changing the “MinimumSize” Property in the script. Lowering the number makes the craters more detailed, though the more parts your craters are made of, the more likely your game will lag.

We’re hoping that builders take this script and run with it. If you’re a builder, try adding it to your place to see what changes. If you’re a developer, maybe there’s a game that can be built around the idea of a totally destructible environment. Either way, what Agent767 has created with this script is astonishing and innovative.