Skip to content

Explosive Nuclear

Robin Seifert edited this page Jul 30, 2024 · 7 revisions

Nuclear

Atomic weapon able to destroy a decent size area. Covering easily a 100x100 sized base and leaving long lasting effects.

Radiation

Not fully implemented, radioactive blocks are provided as a short term solutuion. Applying various potion effects and damage based on the version. Future versions will Atomic Science's radiation system. In which radioactive data can be stored per tile. Allowing for any block to be contaminated and for material to spread.

To assist with the gameplay effects. Radiation is simulated using sub-blasts known as rot and mutation. These damage nearby blocks and entities based on their on effects.

Logic

Triggers a custom large blast using a yaw-pitch rotation for raytraces. This blast will run on a thread queue. Allowing for several blasts to calculate at the same time on better hardware. While ensuring the main world thread doesn't stall.

At larger scales the logic does break down. As it is tuned for a set size range to be performant. So when scaling up to get a realistic explosion keep in mind the limits. Both in terms of the blocks it will fail to path. As well the performance hit in memory the thread will consume. As each tile pathed will need estimated 128 bits. Which sounds small until it is scaled by the size of the blast.

For the default this is 524_000 blocks give or take any rounding of distance. This means you can easily see 67_072_000 bits (~8MB) of memory used. This doesn't include the countless waste objects and supporting bits. So can be double this if not higher depending on mod interactions. Some spikes have been as high as 100MB. Combine this with players who like to spam missiles and a server can easily die. Thankfully Java's GC can do wonders so only is an issue if the scale is increased.

Configs

Name Default Purpose
scale 50 Radius of the blast
energy 80 Per raytrace scale of damage to blocks
rotScale 80 Radius of sub-blast rot
mutationScale 80 Radius of sub-blast mutation
entityDamageScale 50 Radius of entity damage
entityDamageMultiplier 1000 Multiplier to apply to scale before damaging entities. Reduces by distance^2
useRotBlast true Enables rot sub-blast
useMutationBlast true Enables mutation sub-blast
radioactive_replacements List of block replacements to override defaults used by rot blast

History

  • v6 - radioactive blocks were restored for near term.
  • pre v6 - Radioactive blocks were removed due to performance and gameplay issues
Clone this wiki locally