How pablojuradosoto/survivetoolong works
Project Type and Purpose
• This is a compiled Unity 2D game (“SurviveTooLong”) delivered as a standalone executable package.
• The main components are the UnityPlayer runtime (Proyecto RogueLike.exe), the embedded Mono runtime (MonoBleedingEdge), and the game’s data folder (Proyecto RogueLike_Data).
Top-Level File Structure Insights
• MonoBleedingEdge/ – the embedded Mono runtime and configuration (machine.config, web.config, browsers settings).
• Proyecto RogueLike.exe – the UnityPlayer launcher that boots the engine and the game code.
• Proyecto RogueLike_Data/ – all game assets, scenes, scripting assemblies, plugins, resources, and configuration files.
• UnityCrashHandler64.exe – crash‐reporting helper that Unity launches if the game crashes.
Key Architecture Components to Illustrate
a. Operating System (Windows/Linux) – loads Proyecto RogueLike.exe
b. UnityPlayer Host – the native engine binary provided by Unity
c. Embedded Mono Runtime – dynamic libraries and config in MonoBleedingEdge/
d. Game Scripting Layer – C# assemblies (Managed/*.dll), JSON configs (ScriptingAssemblies.json, RuntimeInitializeOnLoads.json)
e. Asset Pipeline – scenes (level0, level1, level2), sharedassets*.assets, Resources, StreamingAssets
f. Native Plugins – platform-specific code in Data/Plugins/x86_64
g. Engine Subsystems – Rendering, Physics, Audio, Input, UI
h. External Services Integration – UnityServicesProjectConfiguration.json in StreamingAssets
i. Crash Handler – UnityCrashHandler64.exe attached as child process
Relationships and Data Flow
• OS → UnityPlayer (exe) [loads]
• UnityPlayer → Mono Runtime [hosts C# scripts]
• UnityPlayer + Mono → Game Assemblies [invoke game logic]
• UnityPlayer → Asset Pipeline [loads scenes & assets at startup or on demand]
• Game Logic → Engine Subsystems [calls physics, rendering, audio APIs]
• Game Logic → Native Plugins [via P/Invoke or Unity plugin API]
• Asset Pipeline ↔ StreamingAssets & Resources [I/O for configuration and dynamic content]
• UnityPlayer → Crash Handler [on fault]
Architectural Patterns and Principles
• Layered Architecture:
• Native Host Layer (UnityPlayer + Mono)
• Scripting Layer (C# game code)
• Asset Layer (serialized assets & scenes)
• Plugin Layer (native extensions)
• Data-Driven: game behavior and content are defined by external assets and JSON configs.
• Modular: plugins folder allows adding platform-specific modules without rebuilding engine.
Technologies and Frameworks
• Unity 2D Engine (Rendering, Physics2D, Audio)
• Mono (.NET runtime)
• C# scripting assemblies
• Native plugin interface (DLLs in Data/Plugins)
• JSON config for initialization and Unity Services