{
    "renders": [
        "sample/dirt_background",
        "sample/text_percentage_scrolling",
        {
            "image": {
                "parent": "sample/bottom_bar",
                "colour": "0xFF_00_00_00",
                "position": { "width": "screen_width" }
            }
        },
        {
            "image": {
                "parent": "sample/bottom_bar",
                "colour": "0xFF_11_44_CC"
            }
        },
        {
            "image": {
                "parent": "builtin/text",
                "image": "loadingscreen:ascii.png",
                "position_type": "TOP_LEFT",
                "offset_pos": "TOP_LEFT",
                "text": "memory_used() + ' MiB / ' + memory_total() + ' MiB'",
                "position": {
                    "x": 10, "y": 10
                }
            }
        },
        {
            "image": {
                "parent": "builtin/text",
                "image": "loadingscreen:ascii.png",
                "position_type": "TOP_LEFT",
                "offset_pos": "TOP_LEFT",
                "text": "floor(time * 10) / 10.0 + 's'",
                "position": {
                    "x": 10, "y": 24
                }
            }
        }
    ],
    "functions": [
        
    ],
    "variables": {
        "max_scroll_count": "screen_height / (2 * 16)",
        "scroll_text": "status + (is_reloading ? '' : (' - ' + sub_status))"
    },
    "factories": [
        {
            "parent": "builtin/change",
            "change": "scroll_text",
            "variables": {
                "factory_age" : "factory_count - factory_index"
            },
            "kept_variables": {
                "factory_status": "scroll_text"
            },
            "to_create": {
                "should_render": "factory_age < max_scroll_count",
                "image": {
                    "parent": "builtin/text",
                    "image": "loadingscreen:ascii.png",
                    "position_type": "BOTTOM_LEFT",
                    "offset_pos": "BOTTOM_LEFT",
                    "text": "factory_status + (factory_age == 1 ? ( is_reloading ? ' - ' + sub_status : '') : '')",
                    "position": {
                        "x": "30",
                        "y": "(factory_index - factory_count) * 16 - 4"
                      },
                      "colour": "0xFF_00_00_00 | (0x01_01_01 * (0xFF - 0xFF * factory_age / max_scroll_count).max(0x20))"
                }
            }
        }
    ],
    "actions": [
        
    ]
}
