Skip to content

Commit 0a5b739

Browse files
authored
Merge branch 'MonoGame:main' into main
2 parents a22b96b + 8f1fe72 commit 0a5b739

543 files changed

Lines changed: 8970 additions & 51 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

articles/getting_started/2_choosing_your_ide_vscode.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ The official Microsoft version includes proprietary features like settings sync,
7878

7979
## Setting up VS Code for development with MonoGame
8080

81-
1. Open Visual Studio Code
82-
1. Open up its terminal window (`Ctrl` + `` ` ``)
83-
1. Run the following command to install MonoGame Templates
81+
1. Open Visual Studio Code.
82+
1. Open up its terminal window (`Ctrl` + `` ` ``).
83+
1. Run the following command to install MonoGame Templates:
8484
8585
```sh
8686
dotnet new install MonoGame.Templates.CSharp
@@ -141,15 +141,15 @@ The .NET MAUI extension adds features for building mobile apps, including:
141141
142142
## Creating a new MonoGame project
143143
144-
1. Open up an empty folder in Visual Studio Code
145-
2. Open up its terminal window (`Ctrl` + `` ` ``)
144+
1. Open up an empty folder in Visual Studio Code.
145+
2. Open up its terminal window (`Ctrl` + `` ` ``).
146146
3. Run the following command to create an empty project for desktop platforms:
147147
148148
```sh
149149
dotnet new mgdesktopgl
150150
```
151151
152-
4. Once the files are created, open up the `Game1.cs` file and wait a second for the C# extension to load
152+
4. Once the files are created, open up the `Game1.cs` file and wait a second for the C# extension to load.
153153
5. You can now press F5, select C# and then your projects name if Visual Studio Code asks you, and it should start up your brand new game!
154154
155155
## Update Project Tool references
@@ -159,8 +159,8 @@ The MonoGame Content Editor (MGCB) it a tool delivered through NuGet for your pr
159159
Once you have created your project you should run the following terminal/command-line command to ensure the tool (and the pipeline) is setup and read for your project:
160160
161161
```dotnetcli
162-
dotnet tool restore
162+
dotnet tool restore
163163
```
164164
165165
> [!NOTE]
166-
> If you ever change the version of the tools or want to upgrade them by editing the `dotnet-tools.json` configuration, you MUST run this command again to update te tools.
166+
> If you ever change the version of the tools or want to upgrade them by editing the `dotnet-tools.json` configuration, you MUST run this command again to update the tools.

articles/getting_started/content_pipeline/content_builder_project.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ Per platform/game project:
153153
To complete the process, add the following `Target` section to your `csproj` (before the final ```</Project>``` entry):
154154

155155
```xml
156-
<Target Name="BuildContent" BeforeTargets="Build">
156+
<Target Name="BuildContent" BeforeTargets="BeforeCompile">
157157
<PropertyGroup>
158158
<ContentOutput>$(ProjectDir)$(OutputPath)</ContentOutput>
159159
<ContentTemp>$(ProjectDir)$(IntermediateOutputPath)</ContentTemp>
160160
<ContentArgs>build -p $(MonoGamePlatform) -s Assets -o $(ContentOutput) -i $(ContentTemp)</ContentArgs>
161161
</PropertyGroup>
162-
<MSBuild Projects="..\Content\Content.csproj" Targets="Build;Run"
163-
Properties="RunArguments=$(ContentArgs);" />
162+
<MSBuild Projects="..\Content\Content.csproj" Targets="Build" RemoveProperties="Configuration;TargetFramework;RuntimeIdentifier;RuntimeIdentifiers" />
163+
<Exec Command="$(ContentCommand) $(ContentArgs)" WorkingDirectory="$(MSBuildThisFileDirectory)..\" CustomErrorRegularExpression="\[E\] .+" CustomWarningRegularExpression="\[W\] .+" />
164164
</Target>
165165
```
166166

articles/getting_started/tools/mgcb_editor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dotnet mgcb-editor
2929
```
3030

3131
> [!NOTE]
32-
> You will need to buid the project at least once in order for the .NET system to download and register the tool with your project utilizing the `dotnet-tools.json` configuration file located in the `.config` folder, or use the `dotnet tool restore` command shown below.
32+
> You will need to build the project at least once in order for the .NET system to download and register the tool with your project utilizing the `dotnet-tools.json` configuration file located in the `.config` folder, or use the `dotnet tool restore` command shown below.
3333
>
3434
> ```sh
3535
> dotnet tool restore

articles/migration/updating_versions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Alternatively, regardless of the development environment, developers can manuall
4646
To do this:
4747

4848
1. Open your project's *.csproj* file
49-
2. Locate the `<PacakgeReference>` elements for any MonoGame referenced packages.
49+
2. Locate the `<PackageReference>` elements for any MonoGame referenced packages.
5050
3. Change the `Version=` attribute for each one to the current version of MonoGame (currently this is `3.8.2.1105`)
5151
4. Save the *.csproj* file.
5252

articles/toc.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,29 @@ items:
165165
href: tutorials/building_2d_games/26_publish_to_itch/index.md
166166
- name: "27: Conclusion and Next Steps"
167167
href: tutorials/building_2d_games/27_conclusion/index.md
168+
- name: 2D Shaders
169+
href: tutorials/advanced/2d_shaders/index.md
170+
items:
171+
- name: "01: Introduction"
172+
href: tutorials/advanced/2d_shaders/01_introduction/index.md
173+
- name: "02: Hot Reload"
174+
href: tutorials/advanced/2d_shaders/02_hot_reload/index.md
175+
- name: "03: The Material Class"
176+
href: tutorials/advanced/2d_shaders/03_the_material_class/index.md
177+
- name: "04: Debug UI"
178+
href: tutorials/advanced/2d_shaders/04_debug_ui/index.md
179+
- name: "05: Transition Effect"
180+
href: tutorials/advanced/2d_shaders/05_transition_effect/index.md
181+
- name: "06: Color Swap Effect"
182+
href: tutorials/advanced/2d_shaders/06_color_swap_effect/index.md
183+
- name: "07: Sprite Vertex Effect"
184+
href: tutorials/advanced/2d_shaders/07_sprite_vertex_effect/index.md
185+
- name: "08: Light Effect"
186+
href: tutorials/advanced/2d_shaders/08_light_effect/index.md
187+
- name: "09: Shadow Effect"
188+
href: tutorials/advanced/2d_shaders/09_shadows_effect/index.md
189+
- name: "10: Next Steps"
190+
href: tutorials/advanced/2d_shaders/10_next_steps/index.md
168191
- name: Console Access
169192
href: console_access.md
170193
- name: Help and Support
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: "Chapter 01: Getting Started"
3+
description: "Prepare your project and get ready"
4+
---
5+
6+
Welcome to the advanced 2D shaders tutorial! The goal of this series is to explore several concepts in MonoGame's 2D graphics capabilities, specifically with respect to shaders.
7+
8+
## The Starting Code
9+
10+
This tutorial series builds directly on top of the final code from the [Building 2D Games](https://docs.monogame.net/articles/tutorials/building_2d_games/index.html) tutorial. It is essential that you start with this project.
11+
12+
> [!note]
13+
> You can get the complete starting source code for this tutorial here:
14+
> [Chapter 27 source code from Building 2D Games tutorial](https://github.com/MonoGame/MonoGame.Samples/tree/3.8.4/Tutorials/learn-monogame-2d/src/27-Conclusion/)
15+
16+
Once you have the code downloaded, open it in your IDE and run the `DungeonSlime` project to make sure everything is working correctly. You should see the title screen from the previous tutorial.
17+
18+
## Project Structure
19+
20+
The solution is currently organized into two main projects:
21+
22+
- **`DungeonSlime`**: The main game project. This contains our game logic and game-specific content.
23+
- **`MonoGameLibrary`**: Our reusable class library. We will be adding new, generic helper classes here that could be used in any of your future MonoGame projects.
24+
25+
Most of our shader files (`.fx`) will be created in the `Content/effects` folder within the `DungeonSlime` project to start, and later within the `MonoGameLibrary` for shared effects.
26+
27+
## What is Next
28+
29+
Now that our project is set up, we can get to work. The focus for the first several chapters will be to create a workflow for developing shaders in MonoGame. Once we have a hot-reload system, a class to manage the effects, and a debug UI ready, we will carry on and build up 5 effects. The effects will range from simple pixel shaders and vertex shaders up to rendering techniques. As we develop these shaders together, we will build an intuition for how to tackle shader development.
30+
31+
Continue to the next chapter, [Chapter 02: Hot Reload](../02_hot_reload/index.md).
52.8 KB
Loading
57.3 KB
Loading

0 commit comments

Comments
 (0)