Skip to content

Updated getting started tutorial #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2025
Merged
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
7 changes: 4 additions & 3 deletions articles/getting_started/3_understanding_the_code.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: This tutorial will go over the code that is generated when you star
> [!NOTE]
> For help with creating a project, please look at the Creating a New Project section of the [Getting Started guide](index.md).

Within the `Game.cs` class file, which is the core of any MonoGame project, you will find several critical sections necessary for your game to run:
Within the `Game1.cs` class file, which is the core of any MonoGame project, you will find several critical sections necessary for your game to run:

- `Using statements` - which provide easy access to the various components of MonoGame.

Expand Down Expand Up @@ -63,10 +63,11 @@ public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
IsMouseVisible = true;
}
```

The main game constructor is used to initialize the starting variables. In this case, a new `GraphicsDeviceManager` is created, and the root directory containing the game's content files is set.
The main game constructor is used to initialize the starting variables. In this case, a new `GraphicsDeviceManager` is created, the root directory containing the game's content files is set, and the mouse cursor is set to visible.

## Initialize Method

Expand Down Expand Up @@ -116,7 +117,7 @@ The `Update` method is called multiple times per second, and it is used to updat
```csharp
protected override void Draw(GameTime gameTime)
{
graphics.GraphicsDevice.Clear(Color.CornflowerBlue);
GraphicsDevice.Clear(Color.CornflowerBlue);

// TODO: Add your drawing code here

Expand Down