Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
76

SortaBomber - Explosion Physics

tussiez
tussiez

SortaBomber

Blow up stuff.

This is my replica of Roblox's "welds" system. This groups static objects together, e.g buildings, but when hit above a set speed, the building will break.

Controls

  • (RIGHT) click and drag to look around.
  • (LEFT) click to fire explosives.

Improvements

I modified Physijs to work with the WASM version of Ammo, which has improved performance by.. a lot. It's now possible to simulate a few hundred blocks now without any lag. I would update the car physics game with this, but there are a few underlying problems with Physijs itself and Ammo (I spent a few hours getting collisions to work correctly), which means more bug fixing :/

How it works

Objects are first added to a parent object. This makes them a compound shape. Explosions are calculated by their position and force. The overall group has a set "strength", and this is reduced by repeated explosions, amplifying the damage done. The velocity of an object is reduced by the distance it is from the explosion, and increased by the explosion force. Objects farther away from the bomb move slower, and vice versa. Because objects cannot move independently from their parent, the ones nearest to the explosion are orphaned and made dynamic. Simply removing the object from the parent and adding it to the scene doesn't work, so I clone the object (probably a bad idea) instead.

Enjoy!

Play new version! (with buildings)

Play it!

Not working?

This Repl uses experimental technology that may not yet be supported across all platforms and browsers. For the best experience, use the following:

  • A home desktop/laptop computer, some schools may block some files
  • Chrome 89 or as recent as possible

What may be the issue:

  • WASM
  • Module Web Workers
  • WebGL
  • ES6 (Don't use Internet Explorer 😭)
2 years ago

Voters

Comments

TopNew
1
EverettGriffin
EverettGriffin

also suggestion make more buildings and make more bombs and make an auto clicker for it cause... >:) destruction

7 months ago
1
tussiez
tussiez

@EverettGriffin
Hah, will plan on doing this summer

See https://sortabomber2.sortagames.repl.co

7 months ago
1
EverettGriffin
EverettGriffin

omg i needed this in ma life!!!! this is realllllly fun

7 months ago
1
LeonNicosia
LeonNicosia

do NOT use an autoclicker

2 years ago
1
ch1ck3n
ch1ck3n

@LeonNicosia
screw you i put it at 1 millisecond

2 years ago
1
tussiez
tussiez

@ch1ck3n
I laugh because I know what happens

2 years ago
1
LeonNicosia
LeonNicosia

@ch1ck3n
i did put it at 1 millisecond

1 year ago
1
bwoop
bwoop

Screenshot 2021-04-24 at 8.53.56 PM


lol its beautiful

2 years ago
1

Does not work on Chrome 76/ChromeOS
It works if I boot up Ubuntu 20.04 on my chromebook tho with Chrome 89

2 years ago
1
tussiez
tussiez

@novaflippers
school chromebook? This uses a lot of experimental stuff, it’s not implemented and supported everywhere yet

2 years ago
1

Which library was this built with?

2 years ago
1
tussiez
tussiez

@novaflippers
Threejs (WebGL) and Physijs (physics, using Ammo --> pybullet)

2 years ago
1
PyCoder01
PyCoder01

this is basically roblox 2007

2 years ago
1
PyCoder01
PyCoder01

the ball is from crossroads roblox lol.

2 years ago
Load more