Skip to content

Commit

Permalink
Merge pull request #11 from endlessm/push-ptqwslyzryqs
Browse files Browse the repository at this point in the history
Document player mods
  • Loading branch information
manuq authored Nov 11, 2024
2 parents 8383702 + 64e5962 commit f797399
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8

[*.gd]
indent_style = tab
max_line_length = 100

[*.md]
indent_style = space
max_line_length = 80
5 changes: 5 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
branches:
- main

# Cancel any ongoing previous run if a PR is updated
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
pre-commit:
name: Linting and Formatting
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
types:
- published

# Cancel any ongoing previous run if the job is re-triggered
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

permissions:
contents: read
pages: write
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/godot-asset-library.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
types:
- published

# Cancel any ongoing previous run if the job is re-triggered
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

name: Push to Godot Asset Library

jobs:
Expand Down
6 changes: 2 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/Scony/godot-gdscript-toolkit
# Use this commit from the master branch until the next stable release with
# <https://github.com/Scony/godot-gdscript-toolkit/commit/e3c37fa54fb32ad99b0bceb2f17e7bc1ffd99806>
rev: f836958a4487e31e3c5ab35c57c7a2128b7e2303
rev: 4.3.3
hooks:
- id: gdlint
- id: gdformat
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Moddable Platformer

This mini moddable game project by [Endless OS Foundation](https://endlessos.org) is intended to help ease the learning curve into Godot.
This mini moddable game project by [Endless OS
Foundation](https://endlessos.org) is intended to help ease the learning curve
into Godot.

This sample project allows learners to engage with game creation concepts, applying various modifications to the game itself, all without reading or writing any code.
This sample project allows learners to engage with game creation concepts,
applying various modifications to the game itself, all without reading or
writing any code.

The `doc/MODS.md` file details the mods that have been made available.

Expand Down
30 changes: 30 additions & 0 deletions doc/MODS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,36 @@ Select the `GameLogic` node. From the Inspector, you can adjust the
Gravity of the world. Decreasing gravity will allow the player to jump
higher.

### Player

Select the `Player` node. From the Inspector, you can adjust the way the player
moves in various respects. There are some relatively self-explanatory
properties:

- **Speed**: How fast the player can move left and right.
- **Acceleration**: How quickly the player reaches its top left/right speed.
- **Jump Velocity**: How fast the player moves upwards when jumping. This,
together with gravity, controls how high the player can jump.
- **Double Jump**: If enabled, the player can jump a second time while still in
the air. This is quite a common power-up in platform games.

There are also a number of parameters which are commonly used in platform games
that players may not notice:

- **Jump Cut Factor**: How much to reduce the player's jump when you release
the jump key before the top of the jump. Setting this to more than 0% allows
the player to control the height of the jump by how long they hold the jump
key.
- **Coyote Time**: How long it takes for the player to start falling after they
walk off a ledge. This allows the player to jump if they press the key a
moment too late, avoiding frustration. Named after [Wile E.
Coyote](https://en.wikipedia.org/wiki/Wile_E._Coyote_and_the_Road_Runner), a
cartoon character who often runs off a cliff but does not start falling until
he notices he has done so.
- **Jump Buffer**: How early can the player press jump while still in the air,
so that they jump as soon as they land on the floor. This allows the player to
jump if they press the key a moment too early, avoiding frustration.

## Rules

### Win condition
Expand Down
2 changes: 2 additions & 0 deletions scripts/player.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@tool
class_name Player
extends CharacterBody2D
## A player's character, which can walk, jump, and stomp on enemies.

## Use this to change the sprite frames of your character.
@export var sprite_frames: SpriteFrames = _initial_sprite_frames:
Expand Down

0 comments on commit f797399

Please sign in to comment.