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

Fix glod game markdown and sample code #67

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Yttruire
Copy link
Contributor

  1. Fix inconsistency of values used across steps in glod-game tutorial code
  2. Fix inconsistency in some naming conventions and variable names in glod-game tutorial code
  3. Fix markdown issues from step 3 onwards of glod-game tutorial (May not be a guaranteed fix for all markdown issues due to limitations of the markdown previewer in vscode, will need to monitor after deployment)

Fixes #59
Fixes #60
Fixes #63
Fixes #64

Renamed all to lowercase for consistency
…orial

The first instance of .y, from step 4, states that we want to move Glod's position from the center of the screen, and bring him down to Earth but changing his position.

Changing 'Anchor.Center' to 'Anchor.Top' then moving glod to the bottom of the screen requires `620.0 >= .y` instead of `310.0 >= .y`. This value of 310.0 changes to 620.0 without indication suddenly in hte middle of Step 4.

We simply change all instances of .y to have the value 620.0 from the start.
@Yttruire Yttruire added the Project: Documentation Improvements or additions to documentation label May 15, 2023
@Yttruire Yttruire self-assigned this May 15, 2023

1. Added to line 12 under `initialize-character`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't meant to be in the code block I believe (it is now)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been fixed in the latest commit e1f3e72, there were missing quotes to close off the preceding code block and open the proceeding one.


When you run the programme, Glod will return to his idle animation whenever you stop pressing the left, right or up buttons and he should be facing the correct direction. Now we have to do the same thing for our jump animation

- Download Jumping Image [here](https://drive.google.com/drive/folders/1l5y2PoZARAukfsNz_qeQXQblrrpnwy6i?usp=share_link).

=== "Code Added"

```{.clojure .annotate linenums="1"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to double check these code blocks, I think the indentation was required this way to correctly show the content tabs (https://squidfunk.github.io/mkdocs-material/reference/content-tabs/#feature-enabled)

You can compare the live docs (https://docs.fragnova.com/learn/shards/tutorials/glod-game/steps/step-3/) with one you build locally.
You can check the shards repo's .github\workflows\build-doc.yml for steps required to build the docs; the main requirements are: copy or symlink the tutorials folder to the correct locations and run mkdocs build

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, my mistake, I was testing the docs with the VSCode preview which isn't accurate. The latest commit e1f3e72 has reverted some changes regarding the indentation and a few other misc fixes were also made while comparing the live build against a local build of the docs using mkdocs. The code blocks should all appear properly now, unless I missed any.

"Full Code So Far" blocks are now all properly nested as the 2nd tab while the 1st tab is always the "Code Added" tab so the page will not appear to be too long so it is more comfortable to scroll through while still able to access the full code at the end of each step.

I think .github\workflows\build-doc.yml might be missing though

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be in the shards repository, not the examples one.

@guusw
Copy link
Member

guusw commented May 15, 2023

Good in general but some issues with tabs/code-blocks

@Yttruire Yttruire requested a review from guusw May 16, 2023 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project: Documentation Improvements or additions to documentation
Projects
None yet
2 participants