Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,18 @@ Effect (shader) compilation requires access to DirectX. This means it will not
MonoGame provides a setup script that can be executed to setup the Wine environment for Effect (shader) compilation.

1. Install [brew.sh](https://brew.sh)
1. Enter the following command:
1. Enter the following commands:

```sh
brew install wget p7zip curl && brew install --cask wine-stable && xattr -dr com.apple.quarantine "/Applications/Wine Stable.app"
brew install wget p7zip curl
brew install --cask xquartz
curl -L -o wine.tar.xz "https://github.com/Gcenx/macOS_Wine_builds/releases/download/11.0_1/wine-stable-11.0_1-osx64.tar.xz"
tar -xJf wine.tar.xz
sudo mv "Wine Stable.app" /Applications/
sudo xattr -dr com.apple.quarantine "/Applications/Wine Stable.app"
echo "export PATH="/Applications/Wine Stable.app/Contents/Resources/wine/bin:$PATH"" > ~/.zprofile
source ~/.zprofile
wine --version
```

1. Now that the prerequisites are installed, download the [mgfxc_wine_setup.sh](https://monogame.net/downloads/net9_mgfxc_wine_setup.sh) script and execute it by entering the following command in the terminal:
Expand Down
50 changes: 28 additions & 22 deletions articles/tutorials/building_2d_games/02_getting_started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@ To install VSCode, follow the instructions for your operating system below:

## Install the C# Dev Kit Extension

For C# development using VSCode, it is recommended to use the official *[C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit)* extension provided by Microsoft. Installing this extension adds C# project tooling to VSCode, including project actions in the *Explorer* panel, the *C# Project Details* view, and status bar integration for loaded solutions. It also provides code editing features such as syntax highlighting, code completion, code navigation, refactoring, NuGet package management, and debugging tools.

> [!NOTE]
> The C# Dev Kit extension adds C#-specific project tooling to VSCode. Depending on the version of the extension and whether a solution file is loaded, you may see project actions on `.csproj` files in the *Explorer* panel, a *C# Project Details* view, and status bar text showing which solution file is currently open.
>
> When you open a workspace in Visual Studio Code containing a .NET solution file (*.sln*), C# Dev Kit can load that solution and expose common project actions. Common tasks you can perform include:
>
> * Creating new projects.
> * Managing project references.
> * Managing NuGet packages.
> * Building and debugging projects from the `.csproj` file in *Explorer*.
>
> Microsoft is still updating some of their own documentation to match the current C# Dev Kit experience, so exact panel names and screenshots may differ. For general background on C# project tooling in VSCode, you can still refer to the [Project Management](https://code.visualstudio.com/docs/csharp/project-management) documentation.
For C# development using VSCode, it is recommended to use the official *[C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit)* extension provided by Microsoft. Installing this extension adds C# project tooling to VSCode, including project actions in the *Explorer* panel, the *C# Project Details* view, and status bar integration for loaded solutions. It also provides code editing features such as syntax highlighting, code completion, code navigation, refactoring, NuGet package management, and debugging tools.

> [!NOTE]
> The C# Dev Kit extension adds C#-specific project tooling to VSCode. Depending on the version of the extension and whether a solution file is loaded, you may see project actions on `.csproj` files in the *Explorer* panel, a *C# Project Details* view, and status bar text showing which solution file is currently open.
>
> When you open a workspace in Visual Studio Code containing a .NET solution file (*.sln*), C# Dev Kit can load that solution and expose common project actions. Common tasks you can perform include:
>
> * Creating new projects.
> * Managing project references.
> * Managing NuGet packages.
> * Building and debugging projects from the `.csproj` file in *Explorer*.
>
> Microsoft is still updating some of their own documentation to match the current C# Dev Kit experience, so exact panel names and screenshots may differ. For general background on C# project tooling in VSCode, you can still refer to the [Project Management](https://code.visualstudio.com/docs/csharp/project-management) documentation.

To install the C# Dev Kit extension, perform the following:

Expand Down Expand Up @@ -154,7 +154,7 @@ The .NET MAUI extension adds features for building mobile apps, including:

- F5 debugging support - Debug your MonoGame mobile apps on emulators, simulators, and physical devices
- Easy target switching - Change debug/deploy targets between different mobile platforms
- Enhanced C# Dev Kit integration - Leverages C# project tooling, Test Explorer, and advanced language features
- Enhanced C# Dev Kit integration - Leverages C# project tooling, Test Explorer, and advanced language features

| ![Figure 2-2: The .NET MAUI Extension listed in Visual Studio Code](./images/maui-extension.png) |
| :-------------------------------------------------------------------------------------------------: |
Expand All @@ -178,8 +178,14 @@ Open a new *Terminal* window and execute the following commands:

```sh
brew install p7zip
brew install --cask wine-stable
xattr -dr com.apple.quarantine "/Applications/Wine Stable.app"
brew install --cask xquartz
curl -L -o wine.tar.xz "https://github.com/Gcenx/macOS_Wine_builds/releases/download/11.0_1/wine-stable-11.0_1-osx64.tar.xz"
tar -xJf wine.tar.xz
sudo mv "Wine Stable.app" /Applications/
sudo xattr -dr com.apple.quarantine "/Applications/Wine Stable.app"
echo "export PATH="/Applications/Wine Stable.app/Contents/Resources/wine/bin:$PATH"" > ~/.zprofile
source ~/.zprofile
wine --version
wget -qO- https://monogame.net/downloads/net8_mgfxc_wine_setup.sh | bash
```

Expand Down Expand Up @@ -227,13 +233,13 @@ After selecting *Create Project*, a new C# project will be generated based on th
| :--------------------------------------------------------------------------------------------------: |
| **Figure 2-3: A new MonoGame project after being created in Visual Studio Code** |

Now that we have the project created, locate the `DungeonSlime.csproj` file in the *Explorer* panel, right-click it, then choose *Debug > Start New Instance*. The project will compile and run, displaying a screen similar to the following:
Now that we have the project created, locate the `DungeonSlime.csproj` file in the *Explorer* panel, right-click it, then choose *Debug > Start New Instance*. The project will compile and run, displaying a screen similar to the following:

| ![Figure 2-4: The default MonoGame cornflower blue game window](./images/game-window.png) |
| :---------------------------------------------------------------------------------------: |
| **Figure 2-4: The default MonoGame cornflower blue game window** |

| ![Figure 2-4: The default MonoGame cornflower blue game window](./images/game-window.png) |
| :---------------------------------------------------------------------------------------: |
| **Figure 2-4: The default MonoGame cornflower blue game window** |

Be amazed, the default MonoGame Cornflower Blue game window. You have just created your very first MonoGame application. While there is not much happening here visually, there is a lot going on behind the scenes that the MonoGame framework is handling for you. When you ran the application, the following occurred:
Be amazed, the default MonoGame Cornflower Blue game window. You have just created your very first MonoGame application. While there is not much happening here visually, there is a lot going on behind the scenes that the MonoGame framework is handling for you. When you ran the application, the following occurred:

1. The application started
2. The game window was created and graphics were initialized
Expand Down
Loading