Actions

Difference between revisions of "Sonic Physics Guide"

From Sonic Retro

(Page reshuffling)
m (Physics: Order)
Line 62: Line 62:
 
:*[[SPG:Slope Physics#Falling and Slipping Down Slopes|''Falling and Slipping Down Slopes'']]
 
:*[[SPG:Slope Physics#Falling and Slipping Down Slopes|''Falling and Slipping Down Slopes'']]
 
:*[[SPG:Slope Physics#Landing On The Ground|''Landing On The Ground'']]
 
:*[[SPG:Slope Physics#Landing On The Ground|''Landing On The Ground'']]
 +
 +
'''[[SPG:Running|Running]]'''
 +
:Horizontal input & general physics of the Player while walking/running.
 +
 +
'''[[SPG:Rolling|Rolling]]'''
 +
:Horizontal input & general physics of the Player while rolling.
  
 
'''[[SPG:Air State|Air State]]'''
 
'''[[SPG:Air State|Air State]]'''
 
:Horizontal input & general physics of the Player while they are in the air.
 
:Horizontal input & general physics of the Player while they are in the air.
 
'''[[SPG:Running|Running]]'''
 
:Horizontal input & general physics of the Player while walking/running.
 
  
 
'''[[SPG:Jumping|Jumping]]'''
 
'''[[SPG:Jumping|Jumping]]'''
 
:Jump physics, jumping at angles, and how controllable jump height is achieved.
 
:Jump physics, jumping at angles, and how controllable jump height is achieved.
 
'''[[SPG:Rolling|Rolling]]'''
 
:Horizontal input & general physics of the Player while rolling.
 
  
 
'''[[SPG:Getting Hit|Getting Hit]]
 
'''[[SPG:Getting Hit|Getting Hit]]
Line 91: Line 91:
  
 
<div class="large-3 columns">
 
<div class="large-3 columns">
 +
 
===Gameplay===
 
===Gameplay===
 
'''[[SPG:Main Game Loop|Main Game Loop]]'''
 
'''[[SPG:Main Game Loop|Main Game Loop]]'''

Revision as of 08:23, 24 June 2023

ROM Hacks make the process of developing a functional Sonic game with unique art, enemies, and modifications much easier, since the game engine and basic mechanics are already functional. However, if the game requires a different game engine, modifying existing low-level assembly may be inappropriate, and some game designers might choose to program their own unique game engine. The physics of a game engine are rules that describe how to transform the Player's input (either in the form of buttons, keyboard, or even a mouse if the designer feels inclined) into appropriate changes in the position of the sprites in the game (such as the Sonic sprite, or alternatively, how enemy sprites will respond). These physics guides will hopefully make the process of simulating the rules used in Sonic games easier.

Since the rules themselves are independent of how they are implemented, many people choose programming languages such as Java, C, C++, Python, or a Lisp dialect to implement game physics. In addition, people can choose to use more specialized applications like Adobe Flash (Animate), GameMaker Studio 2, or a Clickteam program like Multimedia Fusion 2.

Hopefully, these guides will provide adequate information to facilitate implementation.

Physics Guides

Basics

A prerequisite for much of the info on this guide, including common variables, how angles work, how object sizes are displayed, and more.

Calculations (Technical)

A detailed explanation of how values like speeds, positions, and angles are stored and calculated in the original games. While it is not necessary to emulate these things to create an extremely accurate recreation, it can be useful to know for absolute pinpoint accuracy.

Characters

Information about specific characters and their constants, variables, sizes, and jump height.

Collision

Solid Tiles

Terrain Part 1: A detailed description of the individual building blocks of terrain and how they are processed detected.

Solid Terrain

Terrain Part 2: How Solid Tiles and collison layers are used to construct slopes, loops, and other structures.

Slope Collision

Slopes Part 1: How the Player object uses its sensor arrangement to detect and react to sloped terrain.

Hitboxes

Object hitboxes, the Player's hitbox, and other ways objects directly interact with the player other than solidity.

Solid Objects

Object solidity, jump through platforms, and sloped variants of each.

Physics

Slope Physics

Slopes Part 2: How the Player moves with momentum over angled surfaces, and 360° movement along extreme slopes such as walls and ceilings.

Running

Horizontal input & general physics of the Player while walking/running.

Rolling

Horizontal input & general physics of the Player while rolling.

Air State

Horizontal input & general physics of the Player while they are in the air.

Jumping

Jump physics, jumping at angles, and how controllable jump height is achieved.

Getting Hit

What happens when the Player gets hit.

Rebound

The Player's physics bouncing off enemies and other destroy-able items.

Underwater

The Player's physics underwater, and how their remaining air is depleted.

Super Speeds

The Player's abilities when super.

Gameplay

Main Game Loop

The order that objects update each frame, and order of specific events like Player collision and movement.

Game Objects

Mechanics and sizes for things like rings, pushable blocks, buttons, and springs. How they are constructed, function, and interact with the Player.

Game Enemies

Badnik and bosses behaviour, collision, and specific interaction with the Player.

Ring Loss

Ring dispersal mechanics and physics when lost.

Special Abilities

General special abilities such as spindashing, and also detailing how character specific moves work.

Elemental Shields

Elemental Shield abilities, powers, and moves.

Special Stages

Special stages including the rotating mazes from Sonic 1.

Presentation

Camera

Camera mechanics when following the Player.

Animations

Animations system, and specific animation timings & rules.

Special

Overlay Scripts

Lua scripts which overlay the game in an emulator for an interactive visual of collision.