-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Building OpenRCT2 on Windows
Matt edited this page Apr 24, 2025
·
28 revisions
- Windows 7, 8, 10 or 11
- Visual Studio 2022 (Enterprise, Professional, or Community (Free))
- Latest Visual Studio updates installed
- At least 5 GB free disk space
- Create a directory on a drive with at least 5 GB free space (e.g.,
cd C:\GitHub\OpenRCT2
). - Navigate to the new directory.
- Clone the repository using GitHub Desktop or other tools.
- Navigate to the directory where the code was cloned (e.g.,
cd C:\GitHub\OpenRCT2
). - Open
openrct2.sln
in Visual Studio. - In Visual Studio, select
Build
>Build Solution
from the top menu. The first build will fetch all required dependencies.- Before building select the correct Configuration and Platform, see Configurations and Platform
- Run the game:
bin\openrct2
.
- Navigate to the directory where the code was cloned (e.g.,
cd C:\GitHub\OpenRCT2
). - Open a
Developer Command Prompt for VS 2022
and navigate to the repository (e.g.,cd C:\GitHub\OpenRCT2
). - Run one of the following:
- For 64-bit:
msbuild openrct2.proj /t:Build /p:Platform=x64 /p:Configuration=Release
- For 32-bit:
msbuild openrct2.proj /t:Build /p:Platform=Win32 /p:Configuration=Release
- Both choices will work but it is recommended to select the platform that you are using.
- For 64-bit:
- Run the game:
bin\openrct2
.
After running MSBuild once, you can continue development in Visual Studio by opening openrct2.sln
.
set platform=x64
msbuild openrct2.proj /t:Clean
msbuild openrct2.proj /t:Rebuild /p:Configuration=Release
msbuild openrct2.proj /t:BuildG2
Choose a Platform matching your system (e.g., x64 for 64-bit systems). Available configurations:
- Debug
- All optimizations are disabled for easier debugging. Fast build times but poor runtime performance.
- Release
- Recommended for development. Most optimizations enabled, supports fast incremental builds, and balances build time and runtime performance. Debugging may be limited.
- ReleaseLTCG
- This configuration uses
Link Time Code Generation
also known asWhole Program Optimization
, this enables additional optimizations but will result in longer build times. This configuration is used for all our releases as it will provide the best possible performance but is not ideal for development.
- This configuration uses
- If you encounter build errors or graphical glitches, rebuild the project to update dependencies.
- For Visual Studio debugging:
- Open
openrct2.sln
. - In Solution Explorer, right-click
openrct2-win
and selectSet as Startup Project
.
- Open
- Home
- FAQ & Common Issues
- Roadmap
- Installation
- Building
- Features
- Development
- Benchmarking & stress testing OpenRCT2
- Coding Style
- Commit Messages
- Overall program structure
- Data Structures
- CSS1.DAT
- Custom Music and Ride Music Objects
- Game Actions
- G1 Elements Layout
- game.cfg structure
- Maps
- Music Cleanup
- Objects
- Official extended scenery set
- Peep AI
- Peep Sprite Type
- RCT1 ride and vehicle types and their RCT2 equivalents
- RCT12_MAX_SOMETHING versus MAX_SOMETHING
- Ride rating calculation
- SV6 Ride Structure
- Settings in config.ini
- Sizes and angles in the game world
- Sprite List csg1.dat
- Sprite List g1.dat
- Strings used in RCT1
- Strings used in the game
- TD6 format
- Terminology
- Track Data
- Track Designs
- Track drawers, RTDs and vehicle types
- Track types
- Vehicle Sprite Layout
- Widget colours
- Debugging OpenRCT2 on macOS
- OpenGL renderer
- Rebase and Sync fork with OpenRCT2
- Release Checklist
- Replay System
- Using minidumps from crash reports
- Using Track Block Get Previous
- History
- Testing