Skip to content
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

[Draft] 2D Onboarding Tutorial #85

Draft
wants to merge 220 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
220 commits
Select commit Hold shift + click to select a range
9df357f
Added preface article
AristurtleDev Nov 5, 2024
28e35bc
Updated toc
AristurtleDev Nov 5, 2024
3c34ca9
Move to tutorials directory
AristurtleDev Nov 6, 2024
92bb76d
revert changes so only new doc is in pr
AristurtleDev Nov 6, 2024
bd96a34
Reword sentence per recommendation
AristurtleDev Nov 6, 2024
7e244e4
Initial Chapter 01
AristurtleDev Nov 6, 2024
3d6a69b
Fix resolution from 48 to 480
AristurtleDev Nov 6, 2024
f942943
Initial add Chapter 02
AristurtleDev Nov 6, 2024
cc005c3
Suggested edits from @lightalkmst
AristurtleDev Nov 6, 2024
d2805df
Initial Chapter 3
AristurtleDev Nov 6, 2024
a30b777
Fix appendix links for future documentation
AristurtleDev Nov 6, 2024
7b4c1e1
Correct spelling of "this" in description
AristurtleDev Nov 6, 2024
4d61645
Initial chapter 04
AristurtleDev Nov 7, 2024
54d979f
Removed "to the players" and "in order" wording as suggested by Enthu…
AristurtleDev Nov 8, 2024
767f156
Change verbiage from "Locate" to "Find" as suggested by EnthusiastGuy
AristurtleDev Nov 8, 2024
4326d40
Added description of what the code added does as suggested by Enthusi…
AristurtleDev Nov 8, 2024
f4e87a4
Added steps for Visual Studio users as suggested by EnthusiastGuy
AristurtleDev Nov 8, 2024
9e8a978
Adjusted wording as suggested by EnthusiastGuy
AristurtleDev Nov 8, 2024
5017f96
Added comments for parameters as suggested by EnthusiastGuy
AristurtleDev Nov 8, 2024
6fd12cb
Moved comparison of file loading vs content pipeline loading higher u…
AristurtleDev Nov 8, 2024
4af01df
Fix spelling of variables
AristurtleDev Nov 8, 2024
7c5a163
Adjust wording based on suggestion from EnthusiastGuy
AristurtleDev Nov 8, 2024
84218f0
Added note referencing existing documentation on benefits of optimizi…
AristurtleDev Nov 8, 2024
8b55d9b
Update wording on draw method responsibility to be more clear as sugg…
AristurtleDev Nov 8, 2024
bdf4a1d
Add source files column for chapters that will have them
AristurtleDev Nov 18, 2024
4782293
Add introduction paragraph
AristurtleDev Nov 18, 2024
f16f296
Expand contractions
AristurtleDev Nov 18, 2024
370716d
Draft commit to create PR
AristurtleDev Nov 18, 2024
d29af49
Merge pull request #1 from AristurtleDev/2d-tutorial-bounty--index
AristurtleDev Nov 18, 2024
7a7da17
Merge branch '2d-tutorial-bounty' into 2d-tutorial-bounty--chapter-01
AristurtleDev Nov 18, 2024
2eac775
Move into tutorials directory
AristurtleDev Nov 18, 2024
a100e91
Make images a 2x2 grid per Simon
AristurtleDev Nov 18, 2024
f62d454
Move tutorials file into tutorials directory and rename to index
AristurtleDev Nov 18, 2024
8af2879
Update chapter table
AristurtleDev Nov 18, 2024
1f80762
Update toc for tutorial
AristurtleDev Nov 18, 2024
b5c0f80
Merge pull request #2 from AristurtleDev/2d-tutorial-bounty--chapter-01
AristurtleDev Nov 18, 2024
224bda3
Merge branch '2d-tutorial-bounty' into 2d-tutorial-bounty--chapter-02
AristurtleDev Nov 18, 2024
2c1f8d4
Move into tutorial directory
AristurtleDev Nov 18, 2024
3f323f3
Fix links
AristurtleDev Nov 18, 2024
08e7131
Add chapter 2 link
AristurtleDev Nov 18, 2024
c883b2e
Update toc for chapter 2
AristurtleDev Nov 18, 2024
312ca66
Merge pull request #3 from AristurtleDev/2d-tutorial-bounty--chapter-02
AristurtleDev Nov 18, 2024
b89a749
Merge branch '2d-tutorial-bounty' into 2d-tutorial-bounty--chapter-03
AristurtleDev Nov 18, 2024
dfe6e55
Move into tutorial directory
AristurtleDev Nov 18, 2024
e6835e3
Update introduction to not repeat "this chapter" statement per Simon
AristurtleDev Nov 18, 2024
7f9e6ae
Restructured document to include sections for each number list item i…
AristurtleDev Nov 18, 2024
55bb2cc
Reword to expand or remove contraction words as necessary
AristurtleDev Nov 18, 2024
df6eba6
Appendixes are not written yet, replaced with default link for now so…
AristurtleDev Nov 18, 2024
0a5d2f7
Added chapter 3 link
AristurtleDev Nov 18, 2024
0099e2b
Include chapter 3 in toc
AristurtleDev Nov 18, 2024
3c5f66a
Merge pull request #4 from AristurtleDev/2d-tutorial-bounty--chapter-03
AristurtleDev Nov 19, 2024
8b12502
Merge branch '2d-tutorial-bounty' into 2d-tutorial-bounty--chapter-04
AristurtleDev Nov 19, 2024
586d71d
Remove duplicate heading
AristurtleDev Nov 19, 2024
510015a
Reword intro
AristurtleDev Nov 19, 2024
d2b8e72
Updated description to match changes being made
AristurtleDev Nov 19, 2024
b8fac3d
Reword intro again
AristurtleDev Nov 20, 2024
a7d494f
Update to focus on content pipeline usage
AristurtleDev Nov 20, 2024
685e215
Move to tutorial directory
AristurtleDev Nov 20, 2024
4ed9400
Minor corrections
AristurtleDev Nov 20, 2024
31e8aa0
Add api links
AristurtleDev Nov 20, 2024
f5d04ee
Add chapter 4 link
AristurtleDev Nov 21, 2024
0b8837f
Correct link to content pipeline documentation
AristurtleDev Nov 21, 2024
ea082ea
Fix xref link for SpriteBatch.Begin
AristurtleDev Nov 21, 2024
c515caa
Added clarification that textures are referred to as sprites per Simon
AristurtleDev Nov 22, 2024
477c6e9
Include chapter 4 in chapters table
AristurtleDev Nov 22, 2024
6c4ee2f
Update toc to include chapter 4
AristurtleDev Nov 22, 2024
33d6694
Make xref links bold as suggested by Simon
AristurtleDev Nov 22, 2024
cccdc22
Move section into an important admonition with clarification on handl…
AristurtleDev Nov 22, 2024
36a88ff
Bold "content pipeline" to make it stand out and put it in title case…
AristurtleDev Nov 22, 2024
9e8fcae
Update verbiage to include "for the target platform" for compiled ass…
AristurtleDev Nov 22, 2024
3d5c577
Correct type of THis to This
AristurtleDev Nov 22, 2024
ed050b9
Expand contraction of We're to We are per suggestion from Simon
AristurtleDev Nov 22, 2024
d87097c
Add bullet point about learning advantages of using content pipeline …
AristurtleDev Nov 22, 2024
d122c45
Merge branch '2d-tutorial-bounty--chapter-04' of https://github.com/A…
AristurtleDev Nov 22, 2024
0ca13f6
Correct summary of chapter 4
AristurtleDev Nov 22, 2024
1ec4645
Correct grammar of "loading" to "load"
AristurtleDev Nov 25, 2024
692dbe6
Added Understanding Content Paths section per recommendation by Simon…
AristurtleDev Nov 25, 2024
6fc93e4
Merge branch 'main' into 2d-tutorial-bounty
SimonDarksideJ Nov 26, 2024
4678054
Merge branch '2d-tutorial-bounty' into 2d-tutorial-bounty--chapter-04
AristurtleDev Nov 27, 2024
81730e8
Remove trailing '
AristurtleDev Nov 27, 2024
8ae134c
Fix issue where xref links in table columns break and wrap in the mid…
AristurtleDev Nov 27, 2024
228b6d8
new draft
AristurtleDev Nov 27, 2024
6abd65f
Move Important admonition block up
AristurtleDev Nov 27, 2024
993a488
Add space after comma
AristurtleDev Nov 27, 2024
4534eee
Add proper xref links
AristurtleDev Nov 27, 2024
10526d4
Make this a subsection of the Drawing A Texture section
AristurtleDev Nov 27, 2024
b54c66e
Merge branch '2d-tutorial-bounty--chapter-04' of https://github.com/A…
AristurtleDev Nov 27, 2024
ce3aaf9
Reword section for better clarity and add focus on MonoGame advantages
AristurtleDev Dec 2, 2024
28fcc93
Expand contractions
AristurtleDev Dec 2, 2024
a545af5
Match description of parameters in tables
AristurtleDev Dec 2, 2024
adbc572
Auto format
AristurtleDev Dec 2, 2024
4960e5e
Sync with upstream main
AristurtleDev Dec 2, 2024
0d039d1
Merge branch '2d-tutorial-bounty' of https://github.com/AristurtleDev…
AristurtleDev Dec 2, 2024
5f368bf
Merge upstream main changes
AristurtleDev Dec 2, 2024
fdda409
Grammar/spelling errors
AristurtleDev Dec 2, 2024
a0158c9
Merge pull request #5 from AristurtleDev/2d-tutorial-bounty--chapter-04
AristurtleDev Dec 2, 2024
9af2a6c
Sync with 2d-tutorial-bounty
AristurtleDev Dec 2, 2024
88efc38
wip
AristurtleDev Dec 2, 2024
4382765
WIP: Chapter 05 rework
AristurtleDev Dec 3, 2024
27d4573
WIP: Split Game Library section into separate chapter, reworked text
AristurtleDev Dec 4, 2024
730395c
Adjustments in wording
AristurtleDev Dec 5, 2024
c32bcb1
Restructure section to build class up in sections
AristurtleDev Dec 6, 2024
98ab907
Initial draft of Using Sprite section
AristurtleDev Dec 6, 2024
6c5dd0e
"when" to "with"
AristurtleDev Dec 7, 2024
8de9765
reword section
AristurtleDev Dec 7, 2024
7468c25
Remove tip section, not useful for beginner tutorial
AristurtleDev Dec 7, 2024
548b2c0
Reword section
AristurtleDev Dec 7, 2024
a9d0ad7
Remove tip, doesn't read right.
AristurtleDev Dec 9, 2024
e6ef9d4
Wordmark was off center
AristurtleDev Dec 9, 2024
55e2053
Correct spelling of boundary
AristurtleDev Dec 9, 2024
fe56887
Fix figure numbers from copy/paste
AristurtleDev Dec 9, 2024
9460cb1
Added conclusion
AristurtleDev Dec 9, 2024
4233dd2
Added Test Your Knowledge questions
AristurtleDev Dec 9, 2024
5196e17
Remove appendix, was added by accident and not part of this PR
AristurtleDev Dec 9, 2024
bca1e36
Optimize to Optimizing
AristurtleDev Dec 10, 2024
8849071
Rephrase to be single sentences for constancy
AristurtleDev Dec 10, 2024
f1e265d
Add missing period
AristurtleDev Dec 10, 2024
da77935
Missing period
AristurtleDev Dec 10, 2024
1ee12c3
Add "It" for consistency
AristurtleDev Dec 10, 2024
b3de4ab
Update image to match new one from chapter 6
AristurtleDev Dec 10, 2024
78d7b80
Missing space
AristurtleDev Dec 10, 2024
34f2a51
Remove "then", not needed
AristurtleDev Dec 10, 2024
6099053
Update summaries to be verbs instead of a mix of verbs and nouns
AristurtleDev Dec 10, 2024
2ddbbe2
Update description metadata of chapters to match summaries
AristurtleDev Dec 10, 2024
24f492f
Add xref links
AristurtleDev Dec 10, 2024
0732986
Resolve Markdown Lint Warnings:
AristurtleDev Dec 10, 2024
174a465
Use markdown tabs
AristurtleDev Dec 10, 2024
2532efa
Include link for MSDN article on DLLs
AristurtleDev Dec 10, 2024
4daea0c
Remove contractions
AristurtleDev Dec 10, 2024
77527a7
Include link to MSDN article on namespaces
AristurtleDev Dec 10, 2024
6564b4e
Links to MSDN article on Debug.Assert added
AristurtleDev Dec 10, 2024
93c4728
Use fully syntax for commands
AristurtleDev Dec 10, 2024
cc4f38f
Update to use the solution explorer panel
AristurtleDev Jan 14, 2025
94cff38
Add section validating reference setup correctly
AristurtleDev Jan 14, 2025
6eed239
Replaced image
AristurtleDev Jan 14, 2025
8a43808
Changed validation section
AristurtleDev Jan 17, 2025
545a000
Simplify validation step
AristurtleDev Jan 17, 2025
240ee27
Merge branch 'main' into 2d-tutorial-bounty--chapter-05
AristurtleDev Jan 17, 2025
182b8f0
Merge pull request #6 from AristurtleDev/2d-tutorial-bounty--chapter-05
AristurtleDev Jan 17, 2025
30a2a6e
image no longer needed
AristurtleDev Jan 17, 2025
917423a
Add tabs for OS sections
AristurtleDev Jan 17, 2025
ae7d047
Combine 04 and 06 into a single chapter
AristurtleDev Jan 17, 2025
3a9d131
Combine chapter 4 into chapter 6 making it a single chapter 5
AristurtleDev Jan 21, 2025
0b80a36
Update next chapter sentence
AristurtleDev Jan 21, 2025
126587b
Merge pull request #7 from AristurtleDev/rewrite-chapter-05
AristurtleDev Jan 21, 2025
d0d165a
Fixed chapter number in title
AristurtleDev Jan 21, 2025
6ca06bf
Markdown formatting fixes
AristurtleDev Jan 21, 2025
a4ad372
Rework Chapters
AristurtleDev Jan 31, 2025
3c01abe
Fix chapter number in table
AristurtleDev Jan 31, 2025
69b3f8b
Merge pull request #8 from AristurtleDev/reorginize
AristurtleDev Feb 3, 2025
35c29a4
Fix chapter number
AristurtleDev Feb 3, 2025
796fa50
Add Chapter 07: The Sprite Class
AristurtleDev Feb 3, 2025
42e8169
Merge pull request #9 from AristurtleDev/07_the_sprite_class
AristurtleDev Feb 3, 2025
993066f
Remove inline code block in header
AristurtleDev Feb 3, 2025
c989270
Add chapter 8
AristurtleDev Feb 3, 2025
9f1a486
Merge pull request #10 from AristurtleDev/08_the_animatedsprite_class
AristurtleDev Feb 3, 2025
16fa3ea
Update images
AristurtleDev Feb 4, 2025
47f826e
Add chapter 9
AristurtleDev Feb 6, 2025
d09e62b
Merge branch 'main' into 2d-tutorial-bounty
AristurtleDev Feb 6, 2025
2c370b5
wip
AristurtleDev Feb 7, 2025
5938d56
Add image of controller with button layout
AristurtleDev Feb 7, 2025
73d0904
Moved notice about storing state higher in document
AristurtleDev Feb 7, 2025
f9ddda1
Updated smaller example snippets to store state for consistency of note
AristurtleDev Feb 7, 2025
c83fa8d
Rewrite notes on screen coordinates to include callback references
AristurtleDev Feb 7, 2025
f24f8f8
Added playstation controller image
AristurtleDev Feb 7, 2025
dc750e9
Update images
AristurtleDev Feb 8, 2025
7df428f
Replace `joysticks` with `thumbsticks`
AristurtleDev Feb 8, 2025
6531438
Added touch input section
AristurtleDev Feb 8, 2025
8747fb7
Additional questions
AristurtleDev Feb 8, 2025
5924167
Remove notice about not talking about mobile since Simon requested to…
AristurtleDev Feb 8, 2025
58d8e27
Merge pull request #11 from AristurtleDev/09-handling-input
AristurtleDev Feb 8, 2025
b206f1b
Merge branch '2d-tutorial-bounty' into 10-input-management
AristurtleDev Feb 8, 2025
a95ad62
Chapter 10
AristurtleDev Feb 10, 2025
db55086
Add description
AristurtleDev Feb 10, 2025
fe34bca
Update toc
AristurtleDev Feb 10, 2025
b3f9ef7
Add chapter 10 to chapter list
AristurtleDev Feb 10, 2025
ec38ecd
Add xref links
AristurtleDev Feb 10, 2025
c9e4c74
Fix bullets in conclusion
AristurtleDev Feb 10, 2025
7015bc2
Markdown lint fixes
AristurtleDev Feb 10, 2025
577b0e8
Add statements about gamepad connection
AristurtleDev Feb 10, 2025
bea1cc7
Add position deltas for mouse info
AristurtleDev Feb 10, 2025
304200f
Update list to include new delta properties
AristurtleDev Feb 10, 2025
1ef2f57
Merge pull request #12 from AristurtleDev/10-input-management
AristurtleDev Feb 10, 2025
a925288
Merge branch 'main' into 2d-tutorial-bounty
AristurtleDev Feb 10, 2025
ae4a2ab
Revise input chapters
AristurtleDev Feb 12, 2025
e3c768f
Fix method name in documentation
AristurtleDev Feb 13, 2025
80f8bd4
Include video files when building
AristurtleDev Feb 13, 2025
516e1a6
Add collision detection chapter
AristurtleDev Feb 13, 2025
279df50
Update links to collision detection chapter
AristurtleDev Feb 13, 2025
a70eefd
Format code in block
AristurtleDev Feb 13, 2025
e5791e1
Fix markdown bold
AristurtleDev Feb 13, 2025
4162e3f
Merge branch 'main' into 2d-tutorial-bounty
AristurtleDev Feb 14, 2025
fbc37dc
Remove extra space between lists to fix rendering issue
AristurtleDev Feb 16, 2025
df40465
Reword section to differentiate different checks that can be made for…
AristurtleDev Feb 16, 2025
5eeacc3
Add section on optimizing collision performance
AristurtleDev Feb 16, 2025
bfc6ae3
Add style to match th,td for figures
AristurtleDev Feb 16, 2025
2951a73
Replace <figure> with md tables
AristurtleDev Feb 16, 2025
029270b
Merge branch '2d-tutorial-bounty' into 11_collision_detection
AristurtleDev Feb 16, 2025
9472c38
Replace <figure> elements with tables
AristurtleDev Feb 16, 2025
6adc55d
Merge css changes from chapter 11 so I can start on chapter 12
AristurtleDev Feb 17, 2025
d23c956
Initial chapter draft
AristurtleDev Feb 17, 2025
aa73840
Sync with chapter 11 toc and index
AristurtleDev Feb 17, 2025
9673e06
Update toc and index for chapter 12
AristurtleDev Feb 17, 2025
8e26735
wip
AristurtleDev Feb 18, 2025
dab58f0
Finish revision
AristurtleDev Feb 18, 2025
f2c570c
Code block not indented in numbered list
AristurtleDev Feb 18, 2025
514ba2e
Moved XACT information into an admonition section
AristurtleDev Feb 18, 2025
85622c3
Broke last part of paragraph into bullet points
AristurtleDev Feb 18, 2025
e18a780
Added constraints on the number of simultanious audio
AristurtleDev Feb 18, 2025
29e97b8
Updated to use mediaplayer state before playing new song
AristurtleDev Feb 18, 2025
f1c7744
Separate differences between SoundEffect.Play and SoundEffect.CreateI…
AristurtleDev Feb 18, 2025
c12a06b
Restructure
AristurtleDev Feb 19, 2025
00000b9
Added simple Play method
AristurtleDev Feb 19, 2025
144bd5a
Remove contractions
AristurtleDev Feb 19, 2025
043172f
Merge pull request #13 from AristurtleDev/11_collision_detection
AristurtleDev Feb 20, 2025
836fb63
Merge branch '2d-tutorial-bounty' into 12-soundeffects-and-music
AristurtleDev Feb 20, 2025
3cce019
Merge pull request #14 from AristurtleDev/12-soundeffects-and-music
AristurtleDev Feb 20, 2025
c28c520
Retroactively added game components and class library chapters
AristurtleDev Feb 22, 2025
c76a79e
Update input manager to be a game component
AristurtleDev Feb 22, 2025
56ee949
Fix all link errors
AristurtleDev Feb 22, 2025
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
Prev Previous commit
Next Next commit
Fix figure numbers from copy/paste
AristurtleDev committed Dec 9, 2024
commit fe5688707bd9d51437828abe6f0a3a78fdd5d271
Original file line number Diff line number Diff line change
@@ -436,7 +436,7 @@ The new code for the [**Draw**]() method now renders both sprites. Since both s

We have a similar problem that we saw [in the previous chapter](../05_working_with_textures/index.md#drawing-a-texture); the sprites are *technically* drawn correctly at the center of the screen, but the `Origin` was never set for them, so it's default is the upper-left corner of each sprite. Our goal here is to draw the sprites such that the logo is centered on top of the wordmark and both are centered on the game window. Take a look at Figure 6-4 below:

<figure><img src="./images/logo-wordmark-centered-example.png" alt="Figure 6-3: The MonoGame icon and wordmark centered on the game window with the origin point shown."><figcaption><p><strong>Figure 6-3: The MonoGame icon and wordmark centered on the game window with the origin point shown.</strong></p></figcaption></figure>
<figure><img src="./images/logo-wordmark-centered-example.png" alt="Figure 6-4: The MonoGame icon and wordmark centered on the game window with the origin point shown."><figcaption><p><strong>Figure 6-4: The MonoGame icon and wordmark centered on the game window with the origin point shown.</strong></p></figcaption></figure>

The green circle in the image represents the center of the game window. In order to render the sprites like shown in the image, we need to adjust their `Origin` properties so they align with where the green circle is.

@@ -464,7 +464,7 @@ _monogameWordmark.Draw(_spriteBatch, center);

Running the game now produces the expected result.

<figure><img src="./images/logo-wordmark-centered.png" alt="Figure 6-3: The MonoGame icon and wordmark centered on the game window."><figcaption><p><strong>Figure 6-3: The MonoGame icon and wordmark centered on the game window.</strong></p></figcaption></figure>
<figure><img src="./images/logo-wordmark-centered.png" alt="Figure 6-5: The MonoGame icon and wordmark centered on the game window."><figcaption><p><strong>Figure 6-5: The MonoGame icon and wordmark centered on the game window.</strong></p></figcaption></figure>

- A single texture is used to render two sprites, so no texture swapping
- The logo is centered on top of the wordmark, and both are centered relative to the game window