don't click here

Sonic Physics Guide

Discussion in 'Fangaming Discussion' started by Lapper, Apr 1, 2021.

  1. Lapper

    Lapper

    Lappering Member
    1,703
    632
    93
    England
    Sonic Studio, Sonic Physics Guide, Kyle & Lucy, Freedom Planet 2
    Fixed! And reworded a little.
    Was left over from way back when the guide always referred to Sonic's speed on the ground as X Speed instead of Ground Speed outside of the original Solid Tiles page (as that was the only page that described that whole system & explained slopes originally)
     
  2. Lapper

    Lapper

    Lappering Member
    1,703
    632
    93
    England
    Sonic Studio, Sonic Physics Guide, Kyle & Lucy, Freedom Planet 2
    Recent additions/changes made:
    • Solid Terrain page added (pretty much what foobles was asking for a few posts back)
      • Acts as a part 2 to Solid Tiles page
        • Where part 1 describes what solid tiles are, part 2 describes how they are used to create complex terrain.
      • Describes collision layer switchers, and touches on sprite priority
        • Shows examples of their use, such as Loops and the weaving Waves in Chemical Plant
      • Will add more explanations related to how certain set-pieces or structures are built from Solid Tiles in future.
    [​IMG][​IMG] [​IMG]
     
    Last edited: Nov 23, 2022
  3. Devon

    Devon

    Tech Member
    970
    880
    93
    Some notes about SolidObject:
    • Horizontal collision is considered active when Sonic is inside the object, and also when the distance between the object centers is EQUAL to the minimum distance (when he's just resting up against the object, and not necessarily in it).
    • Sonic CD did make a change to the above by making it so that Sonic must be inside of the object to activate collision... at least when Sonic is right of the object. It's still the same logic as before if he's left of it instead.
      • This in particular has an effect on a monitor's solid collision, where it can be considered 1 pixel larger than the destruction hitbox. Sonic can rest up against the left side of the monitor, even in a ball, and not destroy it. This is not the case when rolling into the right side, where Sonic must be partially inside for the collision to activate, and by then, the destruction hitbox will also be collided with.
    • Vertical collision is uses the same logic as with Sonic CD's horizontal collision check, even in Sonic 1, just replace "left" with "above", and "right" with "below".
    • In either case, in an event where the the distance is equal to the minimum distance needed, and collision is activated, you don't really see it anyways, because it shifts Sonic out of the object by... 0 pixels!
     
  4. foobles

    foobles

    Member
    21
    6
    3
    Pardon another nitpick, but I have some questions/possible correction to the section about springs in the Game Objects chapter.

    It says that horizontal springs only activate when Sonic is grounded, but through my testing in the S3&K debug mode, springs do activate while he is airborne. Maybe they only activate while grounded in Sonic 1? I couldn't verify whether or not it happens in S1 because for some reason, the debug mode would not let me place horizontally facing springs.

    Also, the section on springs says that they affect Sonic's X Speed and Y Speed variables. But this doesn't seem to be the full story because, while grounded, Sonic's X and Y speed variables are overwritten based on his current Ground Speed. Does it also set ground speed so that it works while he is grounded? I tried hitting a horizontal spring while running upside down on a ceiling, and it pushes back in the correct direction. Therefore, if it does affect ground speed, it must take into account which of the 4 direction-modes Sonic is currently in.

    I can do some more research if necessary and try to find an explanation for this, but I thought it was worth mentioning.
     
  5. Lapper

    Lapper

    Lappering Member
    1,703
    632
    93
    England
    Sonic Studio, Sonic Physics Guide, Kyle & Lucy, Freedom Planet 2
    Thanks for pointing these out!

    https://mobile.twitter.com/SonicPhysics/status/1347190381323182080
    It's a thing in Sonic 2 also, but you are correct, Sonic 3 fixes this.

    Also, that second part regarding X Speed is another leftover from early versions of the guide where the concept of Ground Speed wasn't explained/used outside of the early Solid Tiles page. These have been corrected!
     
  6. Lapper

    Lapper

    Lappering Member
    1,703
    632
    93
    England
    Sonic Studio, Sonic Physics Guide, Kyle & Lucy, Freedom Planet 2
    The SPG Sonic 2 Collision Overlay Script is here!
    https://info.sonicretro.org/SPG:Overlay_Scripts


    Just like the first, it shows sensors, terrain tiles, layers, hitboxes, solidity, sizes, variables and more in real-time as you play.

    Credit to Mercury for the solid tile display and assistance.

    Give it a try, using Gens Re-Recording!
     
    Last edited: Jan 29, 2023
  7. Felik

    Felik

    Member
    1,766
    22
    18
    00:07 Something's fishy. I could swear I would get hit every single time I try to jump on shellcracker at that angle
     
  8. Lapper

    Lapper

    Lappering Member
    1,703
    632
    93
    England
    Sonic Studio, Sonic Physics Guide, Kyle & Lucy, Freedom Planet 2
    Yep haha! That's one of the bigger revelations. The claw has to be fully retracted for you to pull that hit off as there is no claw "hurt hitbox" in that state, otherwise you have no choice but to try jump over the large arm hurt hitboxes and hit the right side of the body.
     
    Last edited: Jan 30, 2023
  9. Lapper

    Lapper

    Lappering Member
    1,703
    632
    93
    England
    Sonic Studio, Sonic Physics Guide, Kyle & Lucy, Freedom Planet 2
    Recent additions/changes made:
    • Information on water has been expanded:
      • Underwater page now includes information about remaining air and drowning.
      • Game Objects page now includes the mechanics of the Air Bubble Makers, and the water bubbles themselves.
      • (Credit to Mercury for the research.)
    • Information about underwater speeds has been reformatted.
     
    Last edited: Feb 21, 2023
  10. Lapper

    Lapper

    Lappering Member
    1,703
    632
    93
    England
    Sonic Studio, Sonic Physics Guide, Kyle & Lucy, Freedom Planet 2
    Recent additions/changes made:
    • New Calculations page added
      • https://info.sonicretro.org/SPG:Calculations
      • This page details the specific ways the original games store and process values such as speeds, positions and angles.
      • Only really necessary for going the extra step for accuracy (using decimals and degrees works fine otherwise)
      • Some of this information was originally on the basics page and has found a more relevant home on this new page.
      • More information to be added.
     
    Last edited: Jun 2, 2023 at 7:38 PM