Compiler for Outer-world Dimensional Exploration

Powered by DEXscript

a scripting language designed for dimensional exploration

DEXscript

DEXscript is a scripting language developed in 1987 by Johannes von Laue for the CODEX system. Its creation was a response to the dangerous nature of randomly opening a tunnel to the unknown. With DEXscript, the user can insert the desired world parameters, such as a breathable atmosphere, to safely explore a new location.

Example of Lumen’s DEXscript

#!/usr/codex/env dexscript
import calc
import siglib

# Constants
EARTH_STANDARD = 1.0

# World properties
WORLD_NAME = "Lumen"
WORLD_DESC = "Crystalline Nebula"
GRAVITY = 0.3 * EARTH_STANDARD
PRIMARY_ELEMENT = "SILICON"

# Atmosphere properties
NITROGEN = 2.1
OXYGEN = 0.21
CARBON_DIOXIDE = 0.0004
ARGON = 0.9
TOTAL_PRESSURE = NITROGEN + OXYGEN + CARBON_DIOXIDE + ARGON

# Terrain properties
TERRAIN_TYPE = "OCEAN_ISLANDS"
TERRAIN_MATERIAL = "CRYSTAL"
TERRAIN_COLOR = "IRIDESCENT"

# Population properties
LIFEFORM = "ENERGY_BASED"
INTELLIGENCE = "HIVE_MIND"
INTERACTION = "NEUTRAL"

# Sky properties
SKY_COLOR = "DEEP_PURPLE"
SKY_FEATURE = "TWIN_SUNS"

# Safety check atmosphere
def is_atmosphere_safe():
    safe = True
    
    if NITROGEN > 3.0:
        safe = False
    if OXYGEN < 0.16 or OXYGEN > 0.5:
        safe = False
    if CARBON_DIOXIDE > 0.005:
        safe = False
    if ARGON > 1.6:
        safe = False
    
    return safe

# Safety check gravity
def is_gravity_safe(gravity):
    # Safe range: 1% to 138% of Earth's gravity (inclusive)
    return 0.01 <= gravity <= 1.38

# Calculate tunnel coordinates
def calculate_tunnel_coordinates(world_name, world_desc, gravity, primary_element, terrain_type, lifeform, intelligence, interaction, sky_color, sky_feature):

    combined_input = (world_name + world_desc + primary_element + terrain_type + lifeform + intelligence + interaction + sky_color + sky_feature)
    
    unique_signature = siglib.md5(combined_input.encode()).hexdigest()
   
    large_int = int(unique_signature, 16)
    
    coord_x = (large_int % 10000) / 1000.0  # X coordinate
    coord_y = ((large_int // 10000) % 10000) / 1000.0  # Y coordinate
    coord_z = ((large_int // 100000000) % 10000) / 1000.0  # Z coordinate
    
    coord_x = calc.sin(coord_x) * 42.0
    coord_y = calc.cos(coord_y) * 42.0
    coord_z = calc.tan(coord_z) * 42.0
    
    coord_x = (coord_x % 2000) - 1000
    coord_y = (coord_y % 2000) - 1000
    coord_z = (coord_z % 2000) - 1000
    
    return (coord_x, coord_y, coord_z)

# Initialize world
def initialize_world():
    atmosphere_safety = is_atmosphere_safe()
    gravity_safety = is_gravity_safe(GRAVITY)
    tunnel_coordinates = calculate_tunnel_coordinates(
        WORLD_NAME, WORLD_DESC, GRAVITY, PRIMARY_ELEMENT, TERRAIN_TYPE, LIFEFORM, INTELLIGENCE, INTERACTION, SKY_COLOR, SKY_FEATURE
    )
    return atmosphere_safety, gravity_safety, tunnel_coordinates

initialize_world()