-
Notifications
You must be signed in to change notification settings - Fork 7
Added a new category called "Player physics" #40
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
Open
jojo989
wants to merge
21
commits into
Rifct:main
Choose a base branch
from
jojo989:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
646dbd4
aa
jojo989 dab39ed
caacc
jojo989 a930a29
gamemodes.md
ch-zzzy 607b0a2
Merge pull request #1 from ch-zzzy/main
jojo989 7b684a3
added hitboxes.md on sidebar
jojo989 9aa9781
clarify what is a "unit" in gamemodes.md and hitboxes.md
jojo989 749e308
Added input Restrictions table at gamemodes.md
jojo989 d68fb95
updated
ch-zzzy cbd49e2
Add documentation for orbs and pads mechanics
ch-zzzy 9d1d3b6
Document force blocks and their acceleration calculations
ch-zzzy 5daa84e
added equation1
ch-zzzy e2c0a3a
updated equation1
ch-zzzy 725b2f8
added equation2
ch-zzzy 46a31ba
Rename equation2 to equation2.svg
ch-zzzy 29c339d
asdasd
ch-zzzy f5e1e78
asd
ch-zzzy b846f20
asdsad
ch-zzzy a451fd0
asd
ch-zzzy 96a1f18
Update force blocks.md
ch-zzzy 57786a1
Merge branch 'main' into main
jojo989 3669bba
Merge pull request #2 from ch-zzzy/main
jojo989 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| ## Force Blocks | ||
|
|
||
| The acceleration in Vels from a force block without relative or range turned on can be calculated with the following equation. | ||
|  | ||
|
|
||
| The acceleration ends once the player is no longer touching the force block and it returns back to \(A\). If the player is touching two or more force blocks with no ForceIDs or different ForceIDs at once, then their accelerations get added up together, which is all added to the acceleration \(A\) as usual. However, if a force block causes the velocity to go past the maximum velocity, then the maximum velocity is temporarily increased by \(F\). Another way of saying that is the velocity is set to \(F\) rather than increase by \(F\) every tick. The force is also affected depending on the rotation of the force block. | ||
|
|
||
| The equation above can be simplified if there is no force block stacking. | ||
|  |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
|
|
||
|
|
||
| ## Gamemodes | ||
|
|
||
| For the tables below, G is describing whether the player falls up or down. | ||
| The variable G is simply 1 when the player falls downwards, or -1 when the player has upwards. | ||
|
|
||
| All the velocities are in Vels (1 Vel = 60 units/sec, as reference 1 block is 30 units). | ||
|
|
||
| Max velocity is the highest velocity the player can reach by falling normally, with the exception of ship which also has an upwards max velocity in addition to the downwards one. | ||
| However the max velocity can be temporarily overridden by force blocks until it goes back down to the regular max velocity. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. potential further research: how does it "go back down"? |
||
|
|
||
| Ticks held is how many ticks one needs to hold for before the click action triggers. | ||
| 1 would mean it triggers on that tick, 2 would mean it triggers on the next | ||
| (Both would have their actions occur on the following tick, but 2 would mean swift clicks don't trigger the click action). | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. both would have their actions occur on the tick following the last required tick, right? |
||
|
|
||
| Robot is also just 1/2 of cube jump velocity and ball is 3/10 of cube jump velocity. | ||
|
|
||
| ### Gamemode Restrictions | ||
|
|
||
| | Gamemode | Ticks Held | Can Click Midair? | Max y-velocity | | ||
| | ----------- | ---------- | ----------------- | ---------------------------- | | ||
| | Cube | 1 | No | -15G | | ||
| | Ship | 2 | Yes | 8G on hold, -6.4G on release | | ||
| | Ball | 1 | No | -15G | | ||
| | UFO | 2 | Yes | -6.4G | | ||
| | Wave | 2 | Yes | N/A | | ||
| | Robot | 1 | No | -15G | | ||
| | Spider | 1 | No | -15G | | ||
| | Swingcopter | 2 | Yes | -8G | | ||
|
|
||
|
|
||
|
|
||
| ### 0.5x Speed Portal | ||
|
|
||
| | Gamemode | Click | Hold | Release | | ||
| | ----------- | --------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------- | | ||
| | Cube | Sets the y-velocity to 10.62G | continuously checks if the player is on the ground to process another jump* | N/A | | ||
| | Ship | N/A | skipped for now | skipped for now | | ||
| | Ball | Sets the y-velocity to 3.186G then toggles the gravity | N/A | N/A | | ||
| | Ufo | Sets the y-velocity to 7G | N/A | N/A | | ||
| | Wave | N/A | Sets the y-velocity to 4.186G | Sets the velocity to -4.186G | | ||
| | Robot | N/A | Sets the y-velocity to 5.31G | Decelerates according to the tps and speed* | | ||
| | Spider | See section "Spider" below | N/A | N/A | | ||
| | Swingcopter | Multiplies the y-velocity by 0.8 then toggles the gravity | N/A | N/A | | ||
|
|
||
| ### 1x Speed Portal | ||
|
|
||
| | Gamemode | Click | Hold | Release | | ||
| | ----------- | --------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------- | | ||
| | Cube | Sets the y-velocity to 11.18G | continuously checks if the player is on the ground to process another jump* | N/A | | ||
| | Ship | N/A | skipped for now | skipped for now | | ||
| | Ball | Sets the y-velocity to 3.354G then toggles the gravity | N/A | N/A | | ||
| | Ufo | Sets the y-velocity to 7G | N/A | N/A | | ||
| | Wave | N/A | Sets the y-velocity to 5.193G | Sets the velocity to -5.193G | | ||
| | Robot | N/A | Sets the y-velocity to 5.59G | Decelerates according to the tps and speed* | | ||
| | Spider | See section "Spider" below | N/A | N/A | | ||
| | Swingcopter | Multiplies the y-velocity by 0.8 then toggles the gravity | N/A | N/A | | ||
|
|
||
| ### 2x Speed Portal | ||
|
|
||
| | Gamemode | Click | Hold | Release | | ||
| | ----------- | --------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------- | | ||
| | Cube | Sets the y-velocity to 11.42G | continuously checks if the player is on the ground to process another jump* | N/A | | ||
| | Ship | N/A | skipped for now | skipped for now | | ||
| | Ball | Sets the y-velocity to 3.426G then toggles the gravity | N/A | N/A | | ||
| | Ufo | Sets the y-velocity to 7G | N/A | N/A | | ||
| | Wave | N/A | Sets the y-velocity to 6.457G | Sets the velocity to -6.457G | | ||
| | Robot | N/A | Sets the y-velocity to 5.71G | Decelerates according to the tps and speed* | | ||
| | Spider | See section "Spider" below | N/A | N/A | | ||
| | Swingcopter | Multiplies the y-velocity by 0.8 then toggles the gravity | N/A | N/A | | ||
|
|
||
| ### 3x Speed Portal | ||
|
|
||
| | Gamemode | Click | Hold | Release | | ||
| | ----------- | --------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------- | | ||
| | Cube | Sets the y-velocity to 11.23G | continuously checks if the player is on the ground to process another jump* | N/A | | ||
| | Ship | N/A | skipped for now | skipped for now | | ||
| | Ball | Sets the y-velocity to 3.369G then toggles the gravity | N/A | N/A | | ||
| | Ufo | Sets the y-velocity to 7G | N/A | N/A | | ||
| | Wave | N/A | Sets the y-velocity to 7.8G | Sets the velocity to -7.8G | | ||
| | Robot | N/A | Sets the y-velocity to 5.615G | Decelerates according to the tps and speed* | | ||
| | Spider | See section "Spider" below | N/A | N/A | | ||
| | Swingcopter | Multiplies the y-velocity by 0.8 then toggles the gravity | N/A | N/A | | ||
|
|
||
| ### 4x Speed Portal | ||
|
|
||
| | Gamemode | Click | Hold | Release | | ||
| | ----------- | --------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------- | | ||
| | Cube | Sets the y-velocity to 11.23G | continuously checks if the player is on the ground to process another jump* | N/A | | ||
| | Ship | N/A | skipped for now | skipped for now | | ||
| | Ball | Sets the y-velocity to 3.369G then toggles the gravity | N/A | N/A | | ||
| | Ufo | Sets the y-velocity to 7G | N/A | N/A | | ||
| | Wave | N/A | Sets the y-velocity to 9.6G | Sets the velocity to -9.6G | | ||
| | Robot | N/A | Sets the y-velocity to 5.615G | Decelerates according to the tps and speed* | | ||
| | Spider | See section "Spider" below | N/A | N/A | | ||
| | Swingcopter | Multiplies the y-velocity by 0.8 then toggles the gravity | N/A | N/A | | ||
|
|
||
| *Every gamemode is constantly affected by an acceleration similar to the mechanism of real life gravity which is dependent on the speed portal and tps. Robot hold disables that gravity while holding and sets the yvel to 5.31G until release. This "gravity" affects the velocity on a tick by tick basis so that is part of one of the many game loops. for cube click, it first sets the velocity then later on processes gravity in that same tick so it would not be exactly 11.18G on the first tick for 1x speed, but rather it would be 11.18G - acceleration (in the case of 240tps that would be 11.18 - 0.216 or 10.964). However, on the second jump of a hold or a buffer click, the gravity is processed before the buffered jump meaning the player would experience the full jump force on the first tick which is what causes the common effect of the player jumping slightly higher on the second jump. More info on gravity acceleration can be seen on this desmos graph: https://www.desmos.com/calculator/chaw9hqeew (keep in mind that ship is still not fully understood so don't rely on it for ship) | ||
|
|
||
| ### Spider | ||
|
|
||
| Spider is relatively complex compared to the other gamemodes. When the player clicks, the blue hitbox searches in the direction of -G (meaning normal gravity would search upwards and vice versa) for the nearest unobstructed solid platform. "Unobstructed" means there is no hazard in the way. To my knowledge, this is the only time where hazards affect the blue hitbox and not the red hitbox. Once it finds an unobstructed platform, it simply teleports to it and switches the gravity. If the platform was obstructed, then it teleports to the first obstruction then, as expected, kills the player. However, just because the platform was unobstructed to the smaller blue hitbox does not mean that it is unobstructed to the red hitbox. If there is a hazard that touches the red hitbox after it teleports, then it kills the player despite it not touching the blue hitbox as it was teleporting. This all happens in the span of one tick. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Player hitboxes | ||
| a table of the hitbox size of every gamemode in units, including red hitbox and blue, and also including the size of the hitboxed in the mini gamemode | ||
|
|
||
| **as reference, 1 block/1 grid on the editor is 30 units** | ||
|
|
||
|
|
||
| | Gamemode | Normal blue | Mini blue | Normal red | Mini red | | ||
| |----------|-------------|-----------|------------|----------| | ||
| | Cube | 9 | 10 | 30 | 18 | | ||
| | Ship | 9 | 10 | 30 | 18 | | ||
| | Ball | 9 | 10 | 30 | 18 | | ||
| | UFO | 9 | 10 | 30 | 18 | | ||
| | Wave | 3 | 3 | 10 | 6 | | ||
| | Robot | 9 | 10 | 30 | 18 | | ||
| | Spider | 9 | 10 | 27.5 | 16.5 (?) | | ||
| | Swing | 9 | 10 | 30 | 18 | | ||
jojo989 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the "robot" entries mention deceleration which would be a complementary thing to include somewhere