Saturday, January 25, 2020

[lxplvvkg] Fun with projectiles

Launching projectiles in parabolic trajectories is fun in computer games.  (Also fun in real life.)  Inspired by this Zelda BOTW video.

It's entertaining to have fun targets to shoot at.  It's entertaining if the target reacts to being hit.

We consider as the target a 3D world of cubical blocks like Minecraft.  Such a world allows plenty of creativity in building interesting targets and terrain.  We propose going beyond (vanilla) Minecraft by allowing arbitrary images to be painted on the faces of cubes.  Maybe also transparency and translucency.  Maybe also reflection, though that requires sophisticated graphics like ray tracing.

Some possible fun effects:

Projectile splatters paint on target cubes.  Paint splatter pattern depends on impact angle.  It's possible to paint transparency (similar to cleaning the surface of a dirty transparent object in the real world).

The projectile is a bomb.  Block at the point of impact disappears, destroyed.

All blocks within a sphere around the point of impact disappear.

Continue the parabolic path beyond the point of impact, into more blocks.  All blocks on the path disappear, creating a hole down to bedrock.

All blocks within a certain distance of the path disappears, creating a parabolic tube down to bedrock.

The amount of penetration beyond the initial point of impact is finite, instead of all the way to bedrock.  Both the distance of penetration and the tube radius of disintegration depend on the choice of projectile.  Not sure what to do if the object the bomb hits is thinner than the bomb's penetration distance.  Easiest is the bomb disappears into thin air.

Some blocks are hard enough to prevent further penetration.

The distance of penetration depends on the speed of the projectile.

Blocks directly above the hole left by the projectile also disintegrate, because their support structure is gone.

Blocks above don't disintegrate but instead slide down filling the hole left by the blocks destroyed by the bomb (subsidence).

Disintegration of not just blocks directly above but also those now steeper than the terrain's maximum angle of repose.

First subsidence, then disintegration due to repose.

Even more complicated models of cratering.

Explosions are not just fun for the hole they leave, but also for the animation of the explosion.

From the point of the impact, launch a spherical shell of debris each of which then travels in a parabolic path.  Initial velocity proportional to tube disintegration radius.  Velocities might be sampled from a distribution to create a cloud of flying debris instead of an initially perfectly spherical shell of flying debris.  Boltzmann distribution?  Not sure what to do about debris launched into matter.  Easiest is debris ignores collision detection, but is rendered only if it is not occluded.

For a bomb which destroys more than one block, every disintegrating block does an explosion animation, when the bomb gets to it.  It might take a while for a long path.  Cone shaped explosion.

When disintegrating a sphere of blocks, it takes time for the shock wave to travel outwards.  Explosion animation for a block delayed until the shock wave arrives.

Animate blocks above the hole first sinking straight down (subsidence), then disintegrating (with explosion) when subsidence stops.

It doesn't need to be physically accurate; it just needs to look good for entertainment.

Provide tools for the player to aim precisely, for example, a reticle projected into the ground at the target.

Undo, of course.

Preview of terrain after destruction, which instantly updates whenever targeting is adjusted.

What tools would be useful for hitting a moving target?

Not sure how a continuously moving target would work in a blocks world.  Maybe continuously animated paint.

Once the desired path and effect are set, allow multiple cameras.

Slow motion at impact.

Render in high quality, probably not real time (offline).

No comments :