1. Project Status
This repository is the active development source for Movie Business 2.
The repository has already been migrated away from the old internal DLL split. The current Visual Studio solution builds one executable project, BF2DTH, while compiling the recovered source from the historical component libraries directly into that executable.
Current status:
- The solution file contains one buildable project: BF2DTH.sln.
- Internal game modules such as BFGame, BFEntity, BFGeneral, BFMission, BFProfile, BFReview, BFTrophy, and TomigaControlLibrary are now treated as source folders inside the main project.
- Polish and English text resources were extracted from the old BFGeneral.resources.dll satellite assemblies and stored in this repository under Localization/.
- Required runtime assets and default mutable data were imported into the repository under common/, lib/, and runtime-data/.
- The repository still depends on a small set of third-party packages, but recovered internal runtime code now builds from source inside this repository.
2. Primary Goal
The development goal is to keep the game maintainable from a single repository, without requiring lost internal project files or satellite resource DLLs from a historical installation.
That goal is already partially completed:
- Recovered internal source is compiled from this repository.
- Localization is now stored in the repository as XML files.
- The remaining work is focused on cleanup, tooling, and removing decompiler artifacts while keeping third-party dependencies package-managed.
3. Solution Layout
Main build entry points
Important source directories
- BF2DTH/: Main WinForms application, startup code, top-level UI, and integration layer.
- BFEntity/: Domain entities and game data structures.
- BFGame/: Core game logic, gameplay systems, forms, controls, and review/gameplay services.
- BFGeneral/: Shared infrastructure, file system paths, localization access, networking helpers, dialogs, and utility classes.
- BFGfx/: Graphics-related helpers and shared presentation assets used by code.
- BFMission/: Challenge and mission logic.
- BFProfile/: Player profile handling and profile serialization logic.
- BFReview/: Review rules and review-generation support.
- BFTrophy/: Trophy and achievement logic.
- TomigaControlLibrary/: Recovered source for UI controls that were previously distributed as a separate internal DLL.
- Localization/: Repository-owned localization extracted from the old BFGeneral.resources.dll files.
- common/: Repository-owned static runtime assets required by the game.
- lib/: Repository-owned helper executables used by legacy set/archive workflows.
- runtime-data/: Repository-owned runtime data root used instead of ProgramData%, split into committed baseline content and local user state.
- tools/: Recovery, staging, and documentation helper scripts.
Historical subproject files
The old subproject .csproj files are still present in the repository as historical artifacts, but the active solution does not build them individually anymore. The main solution compiles their source through BF2DTH.csproj.
4. Build Architecture
BF2DTH.csproj is an SDK-style Windows Desktop project targeting .NET Framework 4.7.2 with WinForms enabled.
Important characteristics of the main project:
- Output type: WinExe
- Target framework: net472
- Uses Windows Forms
- Generates a single executable build target
- Leaves GenerateAssemblyInfo disabled because the recovered code already contains historical assembly metadata
The project also contains compatibility adjustments required by the merged source tree:
- Duplicate AssemblyInfo.cs files from recovered internal modules are excluded.
- Duplicate BFGame/EV.Windows.Forms sources are excluded because the repository already contains EV.Windows.Forms/.
- Several recovered .resx files are assigned explicit logical names so WinForms can resolve them with the same manifest names used by the original DLL-based layout.
5. What Was Merged Into the Main Project
The About box now reports the old internal modules as integrated components, which reflects the current repo architecture:
- BFGame (integrated)
- BFEntity (integrated)
- BFGeneral (integrated)
- BFReview (integrated)
- BFProfile (integrated)
- BFMission (integrated)
- BFTrophy (integrated)
- TomigaControlLibrary (integrated)
This is not just cosmetic. Those components now compile as source inside BF2DTH.csproj instead of being loaded from separate internal DLLs.
6. Runtime Data Layout
The executable is no longer split across internal code DLLs, and the game no longer depends on ProgramData% for normal repository-based development. Runtime content and mutable data now resolve relative to the repository root.
Working directory content
BFDirectory now resolves the repository root by walking upward from the executable location until it finds the solution or project root.
Important repository/runtime expectation:
- common/
- lib/
- runtime-data/Biznes Filmowy 2/
These folders are expected relative to the repository root and contain the static assets, helper binaries, and mutable runtime data required for launching from a clean clone.
Repo-local runtime data location
Mutable runtime data now lives under:
- runtime-data/Biznes Filmowy 2\
Important subdirectories under that root:
- films/
- monsters/
- set/
- profile/
- reviews/
Important default serialized set file:
- runtime-data/Biznes Filmowy 2\set\default\dane.sds
This means a clean clone can launch as long as the repository includes these imported assets and data folders.
7. Build Requirements
Recommended environment:
- Windows
- Visual Studio 2022
- .NET SDK capable of building net472
Typical build command:
dotnet build .\BF2DTH.csproj -c Debug
Typical Visual Studio entry point:
8. Staging Build Output
Localization is now repository-owned, but the final output still needs to be staged into the build folder so the executable can find the extracted files easily.
Use:
powershell -ExecutionPolicy Bypass -File .\tools\Stage-BuildOutput.ps1
Default target:
What the staging script does:
- Creates Localization\en\ and Localization\pl\ under the output directory
- Copies the extracted XML localization files into that output
- Removes old BFGeneral.resources.dll satellite files from en\ and pl\ if they are still present
8.1 Importing repo-local runtime assets
The repository now contains the imported runtime layout, but if it ever needs to be refreshed from a legacy installation, use:
powershell -ExecutionPolicy Bypass -File .\tools\Import-RepoRuntimeData.ps1
By default the import script copies:
- common/
- lib/
- runtime-data/Biznes Filmowy 2\set
- runtime-data/Biznes Filmowy 2\reviews
- runtime-data/Biznes Filmowy 2\films
- runtime-data/Biznes Filmowy 2\monsters
It leaves profile/ empty by default so machine-specific profile data is not pulled into the repository unless explicitly requested.
9. Localization System
Current localization source of truth
The repository now owns the English and Polish text resources:
- Localization/en/Multilang.xml
- Localization/en/MultiStory.xml
- Localization/pl/Multilang.xml
- Localization/pl/MultiStory.xml
Runtime lookup
BFGeneral/Tomiga.BF.General/Multilanguage.cs now:
- resolves general UI strings from Multilang.xml
- resolves story-related strings from MultiStory.xml
- searches upward from the executable folder until it finds a Localization/ directory
- falls back to historical embedded ResourceManager lookup if a repository-owned extracted file is missing
This means the game can be run from the repository output without depending on the old BFGeneral.resources.dll files from a system installation.
Regenerating localization from an old installation
If the extracted XML needs to be rebuilt from an original install, use:
powershell -ExecutionPolicy Bypass -File .\tools\Extract-BFGeneralLocalization.ps1
The script reads:
- C:\Program Files (x86)\Tomiga\Biznes Filmowy 2\en\BFGeneral.resources.dll
- C:\Program Files (x86)\Tomiga\Biznes Filmowy 2\pl\BFGeneral.resources.dll
and writes the repository XML files back into Localization/.
10. Startup Diagnostics
Startup tracing was added to help stabilize the recovered build.
Current startup log file:
- startup.log next to BF2DTH.exe
The startup logger records early boot steps such as:
- entering Main()
- visual style initialization
- unhandled exceptions
- early form construction and load diagnostics
This log is useful when the game compiles but fails before showing a usable UI.
11. Repository Tools
tools/Extract-BFGeneralLocalization.ps1
Purpose:
- pulls English and Polish localization resources out of the legacy BFGeneral.resources.dll satellite assemblies
- writes them as repository-owned XML files
Use it when:
- the localization XML is missing
- you want to refresh extracted strings from an original installation
- you are validating whether the repository copy still matches the historical data
tools/Stage-BuildOutput.ps1
Purpose:
- prepares a self-contained debug output directory for local execution
Use it when:
- you have just built the solution
- you want to run from bin\Debug\net472
- you want to ensure old BFGeneral.resources.dll files are not shadowing the repository-owned localization
tools/Import-RepoRuntimeData.ps1
Purpose:
- imports static runtime assets and mutable default data out of the legacy installation into the repository layout
Use it when:
- refreshing common/
- refreshing lib/
- refreshing runtime-data/ from a trusted legacy install
- rebuilding the repo-local launchable layout from original machine data
tools/Generate-ProjectDocs.ps1
Purpose:
- regenerates the browser-friendly HTML documentation from this markdown document
Use it when:
12. External Dependency State
The repository no longer depends on lost internal game DLLs for the recovered modules listed earlier.
Current dependency state:
- Jdenticon and Jdenticon.Gdi are restored through NuGet and are no longer legacy repo-local binary references.
- Microsoft.Contracts.dll, StatusMessaging.dll, System.Runtime.InteropServices.APIs.dll, and System.Windows.Forms.TreeListView.dll were removed from the active build.
- Recovered TreeListView and supporting interop source now compile directly into BF2DTH.
Meaning of this state
- Internal runtime code is now repository-owned source.
- Remaining third-party dependencies are package-managed instead of copied from a historical install.
- Future work should avoid reintroducing binary-only internal components.
13. One-Repository Development Policy
The intended workflow going forward should follow these rules:
- New gameplay code should be added to source folders already compiled by BF2DTH.csproj.
- New text resources should be added to the repository-owned localization files instead of reintroducing resource DLLs.
- New runtime content should be committed into the repository or documented explicitly if it must remain external.
- Any remaining binary dependency should be treated as temporary technical debt until it is either recovered or replaced.
14. Recommended Development Workflow
- Open BF2DTH.sln in Visual Studio.
- Build BF2DTH.
- Run tools/Stage-BuildOutput.ps1.
- Launch from bin\Debug\net472\BF2DTH.exe.
- If startup fails, inspect bin\Debug\net472\startup.log.
- If strings are wrong, verify bin\Debug\net472\Localization\en\*.xml and bin\Debug\net472\Localization\pl\*.xml.
15. Known Risks And Technical Debt
- A large portion of the codebase was recovered from decompiled binaries, so some methods still contain decompiler artifacts and low-signal warnings.
- Third-party dependencies are intentionally restored through NuGet where possible instead of being copied from a historical install.
- Runtime content is now repository-owned, but it is still large and partly inherited from a legacy install.
- Historical HTTP endpoints are still hardcoded in parts of the codebase and may be unavailable or obsolete.
16. Suggested Next Steps
Recommended follow-up work:
- Keep internal runtime code source-backed and avoid reintroducing binary-only dependencies.
- Move required runtime content into repository-managed assets where possible.
- Add a repeatable packaging script for debug and release distributions.
- Continue removing decompiler artifacts as active development touches each subsystem.
17. Documentation Maintenance
Source file:
Generated browser version:
Regenerate after editing the markdown:
powershell -ExecutionPolicy Bypass -File .\tools\Generate-ProjectDocs.ps1
Runtime Data Policy
The repository intentionally versions only the baseline runtime content needed to launch the game after clone:
- committed baseline data: runtime-data\Biznes Filmowy 2\set\, reviews\, films\, monsters\
- local user state not intended for git: runtime-data\Biznes Filmowy 2\profile\
This keeps the repository self-contained for development while avoiding churn from personal profiles, saves, logos, advert files, and other per-player artifacts.