Skip to content

Commit 276a985

Browse files
Merge branch 'main' into dellis1972-package-android
2 parents f7f730c + 0085472 commit 276a985

File tree

400 files changed

+23303
-199
lines changed

Some content is hidden

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

400 files changed

+23303
-199
lines changed

articles/console_access.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The process for access to the private console repositories is as follows:
1919
2020
The instructions below will help you gain access to each platform.
2121

22-
## Nintendo Switch
22+
### Nintendo Switch
2323

2424
![Nintendo Switch](images/nintendo_switch.png)
2525

@@ -29,7 +29,7 @@ Once you are in the program, you can go to the middleware page and fill out the
2929

3030
We will then contact you with further instructions.
3131

32-
## PlayStation 4, PlayStation 5
32+
### PlayStation 4, PlayStation 5
3333

3434
![PlayStation Partners](images/ps_partners.png)
3535

@@ -39,7 +39,7 @@ Once you are registered, you can submit a request in the [PlayStation 4 forums](
3939

4040
We will process these requests to give you access and further instructions.
4141

42-
## Xbox One, Xbox Series X
42+
### Xbox One, Xbox Series X
4343

4444
![ID@Xbox](images/idatxbox.png)
4545

articles/contributing.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
---
2-
title: Contributing Guidelines
2+
title: Contributing to MonoGame Documentation
33
description: Instructions on how to contribute to the documentation of the MonoGame Framework
44
---
55

6-
# Contributing to MonoGame Documentation
7-
86
Thank you for choosing to contribute to the MonoGame project! This page provides guidance on how you can help to improve the documentation for MonoGame.
97

10-
# Getting Started
8+
## Getting Started
119

1210
> [!NOTE]
1311
> If you are new to making contributions to open source projects, it is recommended to understand the following concepts before submitting your contribution:
@@ -17,15 +15,15 @@ Thank you for choosing to contribute to the MonoGame project! This page provides
1715
> - [Creating a new file](https://help.github.com/articles/creating-new-files/) or [editing an existing one](https://help.github.com/articles/editing-files-in-your-repository/) using the GitHub markup editor.
1816
> - [How to submit your contributions for review through a pull request](https://help.github.com/articles/creating-a-pull-request/).
1917
20-
## Articles and API References
18+
### Articles and API References
2119

2220
The MonoGame documentation contains two types of documents: articles and API references.
2321

2422
Articles include manuals, guides and tutorials on how to use the MonoGame Framework to create games.
2523

2624
API references provide detailed explanation of each class and method found in the MonoGame Framework. The documentation is written in the [C# XML format](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/xml-documentation-comments) and is inline to the MonoGame source code.
2725

28-
## Generating the Documentation Site
26+
### Generating the Documentation Site
2927

3028
The pages for articles and API references are hosted on a documentation site that is generated using [DocFX](https://dotnet.github.io/docfx/).
3129

@@ -40,7 +38,7 @@ To generate a local copy of the documentation site:
4038
> [!TIP]
4139
> Verify your changes in your local documentation site before submitting a pull request with said changes. It is recommended to include screenshots of the pages in the pull request to help reviewers confirm these changes.
4240
43-
# General Rules
41+
## General Rules
4442

4543
The following rules **must** be observed at all times when contributing documentation to the MonoGame project.
4644

@@ -52,65 +50,65 @@ The following rules **must** be observed at all times when contributing document
5250
> [!WARNING]
5351
> Breaking these rules can result in your contribution being rejected.
5452
55-
# General Style Guide
53+
## General Style Guide
5654

5755
Because there are many contributors to the MonoGame documentation, it can be difficult to maintain a coherent writing style throughout the documentation site. In addition to the [General Rules](#general-rules), this style guide serves to inform contributors of the conventions needed to maintain this writing style. So please review the following expectations before contributing any documentation.
5856

59-
## Every Word Should Contain Value
57+
### Every Word Should Contain Value
6058

6159
Every word in the reference documentation should provide information beyond the API itself. Documentation that only rehashes or rephrases what is already apparent in the class, method, parameter, or property name has zero value and wastes time for both the writer and reader.
6260

63-
## The First Sentence Is the Most Important
61+
### The First Sentence Is the Most Important
6462

6563
There is no guarantee that the reader will read beyond the first sentence of the reference documentation. This is why that first sentence is the most important and should convey the most key piece of information. Take your time to write the most concise and clear first sentence possible. This helps users tremendously and goes a long way towards having great documentation.
6664

67-
## Surface Information Hidden in the Code
65+
### Surface Information Hidden in the Code
6866

6967
Being inline with the code allows you to easily look for critical information within it that the user might not know from looking at the API alone. Take your time to explore inner method calls and platform specific sections of the code. The time to write the documentation is once you feel you fully understand the code you are documenting. If you don't feel you understand the code then leave the documentation for someone else to write.
7068

71-
## Focus on What Adds Value to the Consumer
69+
### Focus on What Adds Value to the Consumer
7270

7371
Limit documentation to public methods and functions unless there is a specific reason to include internal methods, while documenting internals helps with readability of the code, it provides limited use to consumers of the MonoGame Framework.
7472

75-
## Documentation Is Referenced Not Read
73+
### Documentation Is Referenced Not Read
7674

7775
Remember that the user is searching for an answer for a specific question. It is your job to predict these questions and provide them clear answers.
7876

79-
## Descriptions Should Add Value and Understanding
77+
### Descriptions Should Add Value and Understanding
8078

8179
Describing a thing by naming the thing does not help the developer to understand what the concept is that you are describing, for example:
8280

8381
> "The Genre class provides information about a genre"
8482
8583
Which does not help someone reading the documentation if they do not know what a `Genre` is. Be descriptive and improve the readers understanding for what something is and WHY it is.
8684

87-
# API Reference Style Guide
85+
## API Reference Style Guide
8886

8987
In addition to the [General Style Guide](#general-style-guide), please consider the following conventions used for code associated with the API reference docs.
9088

91-
## XML Tag Guidance
89+
### XML Tag Guidance
9290

9391
By default, the standard [Microsoft recommendations](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/recommended-tags) should be used for filling in XML tags for each class, method and property.
9492

9593
With a few points to call out:
9694

97-
### `<see>` and `<cref/>` should be used whenever an API reference is used in the documentation
95+
#### `<see>` and `<cref/>` should be used whenever an API reference is used in the documentation
9896

9997
To ensure that API documentation is linked to whichever reference is used, `<see>` and `<cref/>` references should be used, this helps users navigate the methods, especially when looking up initializers or use of a property or method.
10098

101-
### Avoid self referencing `<cref/>` unless it provides value
99+
#### Avoid self referencing `<cref/>` unless it provides value
102100

103101
`<cref/>` blocks are there to add links and create references to other classes, functions and methods that help inform the developer for what those concepts are. Adding a `<cref/>` for the same class or property you are describing just creates a circular reference that does not add value.
104102

105103
References to other methods or properties in the same class is fine, just avoid self if possible.
106104

107-
### Use descriptors in `<see/>` and `<cref/>` statements for better readability
105+
#### Use descriptors in `<see/>` and `<cref/>` statements for better readability
108106

109107
By default, a `<cref/>` or `<see/>` reference will use only the type you are referencing when rendered to the user, e.g. `<cref="Album.Genre"/>` will render as `Genre`.
110108

111109
Instead, use the descriptor in the style to render what you actually mean, for example: `<cref="Album.Genre">Album.Genre</cref>` which will always render as `Album.Genre` which is much clearer, it is the same for `<see/>` tags.
112110

113-
### 120 width comments for easy reading
111+
#### 120 width comments for easy reading
114112

115113
Comments should be limited to **120** width, with overflow moving to the next line to make reading easier, for example:
116114

@@ -125,7 +123,7 @@ and the y component uses 6 bits.
125123
> If the `cref` description would cause the line to exceed the 120 recommendation, this is generally ok, so long as the rendered line does not exceed the limit.
126124
> THe limit however, is more of a guideline than a hard rule, so common sense should be applied to keep the limit near 120 characters.
127125
128-
### Use the packed multi-line style with surrounding tags
126+
#### Use the packed multi-line style with surrounding tags
129127

130128
To keep the documentation packed and readable, each parameter should be contained to a single line, for example:
131129

@@ -138,7 +136,7 @@ Creates a new instance of Bgr565.
138136
<param name="z">The z component</param>
139137
```
140138

141-
## Interface Documentation
139+
### Interface Documentation
142140

143141
If documentation is already provided by an interface or inherited class, then the `<inheritdoc />` tag should be used. Critically, **DO NOT** duplicate documentation as it increases maintenance later, for example:
144142

@@ -152,7 +150,7 @@ public void Dispose()
152150

153151
This applies to all derived elements within a class, property or method.
154152

155-
## Inherited Properties
153+
### Inherited Properties
156154

157155
Where a property or type is already documented in an `enum` or `static`, to avoid duplication the `<inheritdoc cref=""/>` style should be used, for example:
158156

@@ -175,7 +173,7 @@ Where a property or type is already documented in an `enum` or `static`, to avoi
175173
public static readonly VertexDeclaration VertexDeclaration;
176174
```
177175

178-
## Protected Methods Requiring Documentation by the Linter
176+
### Protected Methods Requiring Documentation by the Linter
179177

180178
By default, we do not document Finalizers or other protected methods, the recommendation is to apply an empty `<summary />` tag to suppress the warnings raised by the linter, for example:
181179

articles/getting_started/1_setting_up_your_os_for_development_macos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ If you intend to also work with platforms such as `Android` or `iOS`, you will n
3434
> [!NOTE]
3535
> You can use `dotnet workload search` to detect any other available workloads you wish to use.
3636
37-
# Apple Silicon Known Issues
37+
## Apple Silicon Known Issues
3838

3939
For the time being, MonoGame requires that you install the x64 version of the .NET runtime if you are running on an Apple Silicon mac in order to be able to build content. It is also required that [Rosetta](https://support.apple.com/en-us/HT211861) is enabled.
4040

articles/getting_started/1_setting_up_your_os_for_development_ubuntu.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: Setting up your OS for development on Ubuntu
33
description: This section provides a step-by-step guide for setting up your development environment on Ubuntu.
44
---
55

6+
> [!TIP]
7+
> The minimum version of Ubuntu that is supported by MonoGame is `20.04`.
8+
69
To develop with MonoGame in C#, you will need to install the .NET SDK. As of MonoGame 3.8.2 the minimum supported version is .NET 8.
710

811
## Install .NET 8 SDK

articles/getting_started/2_choosing_your_ide_rider.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ You can download and install Rider from: [https://www.jetbrains.com/rider/downlo
2626
dotnet new install MonoGame.Templates.CSharp
2727
```
2828

29+
> [!TIP]
30+
> Alternatively, consider using the Preview Packages provided by MonoGame to get access to the latest developments.
31+
>
32+
> * [How to install MonoGame Preview packages](../getting_to_know/howto/HowTo_Install_Preview_Release.md)
33+
2934
## Creating a new MonoGame project
3035

3136
To get you started with Rider, here are the steps for setting up a new Rider MonoGame project.
@@ -42,6 +47,19 @@ To get you started with Rider, here are the steps for setting up a new Rider Mon
4247
4. Press "Create"
4348
5. You can now press `F5` to compile and debug your game, happy coding :)
4449

50+
## Update Project Tool references
51+
52+
The MonoGame Content Editor (MGCB) it a tool delivered through NuGet for your project using the tools configuration held in your `dotnet-tools.json` file (located in the `.config` folder of your project).
53+
54+
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:
55+
56+
```dotnetcli
57+
dotnet tool restore
58+
```
59+
60+
> [!NOTE]
61+
> 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.
62+
4563
## Next Steps
4664

4765
Next, get to know MonoGame's code structure and project layout:

articles/getting_started/2_choosing_your_ide_visual_studio.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,14 @@ To create new MonoGame projects from within Visual Studio 2022, you will need to
3737

3838
> [!WARNING]
3939
> **Visual Studio Extension Issues**
40-
>
40+
>
4141
> The extension that is installed by Visual Studio 2022 is currently outdated.
4242
> Instead of using Visual Studio 2022 to install the templates, run the following command:
43+
>
4344
> ```sh
4445
> dotnet new install MonoGame.Templates.CSharp
4546
> ```
47+
>
4648
> After doing this, you should be able to launch Visual Studio 2022 and create a new project with the newly installed templates.
4749
4850
1. Launch Visual Studio 2022
@@ -66,6 +68,11 @@ To create new MonoGame projects from within Visual Studio 2022, you will need to
6668
6769
You now have the MonoGame templates installed and are ready to create new projects.
6870
71+
> [!TIP]
72+
> Alternatively, consider using the Preview Packages provided by MonoGame to get access to the latest developments.
73+
>
74+
> - [How to install MonoGame Preview packages](../getting_to_know/howto/HowTo_Install_Preview_Release.md)
75+
6976
## Creating a new MonoGame project
7077
7178
To get you started with Visual Studio, here are the steps for setting up a new MonoGame project.

articles/getting_started/2_choosing_your_ide_vscode.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ By the end, you will be fully equipped to start creating games with MonoGame usi
4949
dotnet new install MonoGame.Templates.CSharp
5050
```
5151

52+
> [!TIP]
53+
> Alternatively, consider using the Preview Packages provided by MonoGame to get access to the latest developments.
54+
>
55+
> - [How to install MonoGame Preview packages](../getting_to_know/howto/HowTo_Install_Preview_Release.md)
56+
5257
## Install Visual Studio Code C# Extensions
5358

5459
To transform Visual Studio Code from a simple text editor into a powerful development environment for C# projects, you must install the Visual Studio Code C# extension. This extension enhances the editor by providing syntax highlighting, code analysis, IntelliSense, and other features that significantly improve the development experience and productivity when working with C#.
@@ -89,6 +94,19 @@ You can find this extension by following the steps above and searching for "Mono
8994
4. Once the files are created, open up the `Game1.cs` file and wait a second for the C# extension to load
9095
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!
9196
97+
## Update Project Tool references
98+
99+
The MonoGame Content Editor (MGCB) it a tool delivered through NuGet for your project using the tools configuration held in your `dotnet-tools.json` file (located in the `.config` folder of your project).
100+
101+
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:
102+
103+
```dotnetcli
104+
dotnet tool restore
105+
```
106+
107+
> [!NOTE]
108+
> 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.
109+
92110
## Next Steps
93111
94112
Next, get to know MonoGame's code structure and project layout:

articles/getting_started/5_adding_basic_code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,6 @@ We recommend browsing through the [Getting to know MonoGame](../getting_to_know/
319319

320320
## Further Reading
321321

322-
Check out the [Tutorials section](../tutorials.md) for many more helpful guides and tutorials on building games with MonoGame. We have an expansive library of helpful content, all provided by other MonoGame developers in the community.
322+
Check out the [Tutorials section](../tutorials/index.md) for many more helpful guides and tutorials on building games with MonoGame. We have an expansive library of helpful content, all provided by other MonoGame developers in the community.
323323

324324
Additionally, be sure to check out the official [MonoGame Samples](../samples.md) page for fully built sample projects built with MonoGame and targeting our most common platforms.

articles/getting_started/content_pipeline/adding_ttf_fonts.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: Adding TTF Fonts
33
description: Learn how to use TrueType fonts in MonoGame.
44
---
55

6-
# TrueType fonts
7-
86
MonoGame supports more than one method of using fonts, the following is an explanation of how to use TrueType fonts.
97

108
## Using TrueType Fonts with MonoGame
@@ -14,7 +12,7 @@ To be able to use a TrueType font, MonoGame requires the **TrueType font file**
1412
> TrueType fonts may be installed on the system, or added manually in to the same directory as the .spritefont file.
1513
1614
1. Create the .spritefont file by selecting "Edit -> Add -> New Item" from the MGCB Editor menu, then select **SpriteFont Description** from the list and click **Create**.
17-
15+
1816
![Adding TTF fonts step 2](images/adding_ttf_fonts.PNG)
1917

2018
2. Open the newly created .spritefont file in your text editor of choice, find this line and change it to your selected .ttf font.

articles/getting_started/content_pipeline/custom_effects.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: Custom Effects
33
description: Learn how to create and use custom effects for rendering in MonoGame.
44
---
55

6-
# Custom Effects
7-
86
A core element of Microsoft XNA is the effect system which is used for all rendering.
97

108
For MonoGame we have the burden of supporting stock and custom effects for desktop GLSL, mobile GLSL, DirectX HLSL, and custom formats like that of the PlayStation Mobile. There currently is no effect system or shader language that supports all the platforms we require, forcing us to build a new custom effect system.
@@ -64,7 +62,6 @@ These are some tips for writing or converting effects for use with MonoGame.
6462
| `HLSL` and `SM4` for DirectX |
6563
| `OpenGL` and `GLSL` for OpenGL |
6664

67-
6865
As an example, you can conditionally set shader models depending on the platform with the following code:
6966

7067
```hlsl

articles/getting_started/content_pipeline/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: Adding Content
33
description: Learn how to add content to your game using the Content Pipeline.
44
---
55

6-
# Adding Content
7-
86
A big part of your game is your content. This includes standard files like textures, sound effects, music, videos, and custom effects as well as custom content like level and enemy files.
97

108
MonoGame implements its own content pipeline for transforming your unoptimized assets into platform optimized content. This is critical in building a game which runs as fast as possible under tight resource constraints.

articles/getting_started/content_pipeline/localization.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: Localization
33
description: Learn how to add localization to your game to support multiple regions.
44
---
55

6-
# Localization
7-
86
Localization is an important part of any game. While it can be possible to design a game that is region independent, it is quite hard. At some point you will need to produce localized text and graphics.
97

108
MonoGame has a simple localization system built in. If you want to develop your own system you are still able to do so. But the default system should be good enough for
@@ -135,6 +133,6 @@ CultureInfo.CurrentCulture.Name // eg. "en-US"
135133
CultureInfo.CurrentCulture.TwoLetterISOLanguageName // eg. "en"
136134
```
137135

138-
which are part of the **System.Globalization namespace**.
136+
which are part of the **System.Globalization namespace**.
139137

140138
> On a side note you can also use the `LoadLocalized` to load language specific SpriteFonts. They just need to be named in the same way as we have described above.

0 commit comments

Comments
 (0)