Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Scripts/Boss/RobotnikTemplate.gd
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,5 @@ func _on_SmokeTimer_timeout():
expl.z_index = 10
# add object
get_parent().add_child(expl)
# set position reletive to us
# set position relative to us
expl.global_position = global_position+Vector2(randf_range(-32,32),randf_range(-32,32))
2 changes: 1 addition & 1 deletion Scripts/Enemies/MotoBug.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func _ready():
direction = -sign(scale.x)

func _physics_process(delta):
# Dirction checks
# Direction checks
$Motobug.scale.x = abs($Motobug.scale.x)*-direction
$FloorCheck.position.x = abs($FloorCheck.position.x)*direction
$FloorCheck.force_raycast_update()
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Gimmicks/Bridge.gd
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func _physics_process(delta):
playerTouch = true

if (playerTouch):
# set buffer for colissions
# set buffer for collisions
buffer = 1
var averagePlayerOffset = 0
for i in player:
Expand Down
4 changes: 2 additions & 2 deletions Scripts/Gimmicks/CNZBarrel.gd
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ var spinning_period = 128.0 / 60.0
# impartFactor determines how much the motion of the platform impacts the player when they jump off
@export var impartFactor = 0.8

# Calcuated based on max velocity, load energy is the amount of energy at which the Loaded constants have full influence
# Calculated based on max velocity, load energy is the amount of energy at which the Loaded constants have full influence
var loadEnergy

# Were one or more players holding up on the last pass through process
Expand Down Expand Up @@ -183,7 +183,7 @@ func _process(delta):
for index in range(players.size() - 1, -1, -1):
# Determine inputs, once it's available change player animations
# Note that we only care if one player is holding a direction even if they
# are fighting eachother and only the direction of current travel matters.
# are fighting each other and only the direction of current travel matters.
var player = get_player(index)
var playerHeldUp = false
var playerHeldDown = false
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Gimmicks/Fan.gd
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func _physics_process(delta):
# causing a warning. Perhaps intended for multi-directional fans being added later?
#var getDir = Vector2.UP.rotated(global_rotation)

# disconect floor
# disconnect floor
if i.ground:
i.disconect_from_floor()

Expand Down
2 changes: 1 addition & 1 deletion Scripts/Gimmicks/Hanger.gd
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const _CONTACT_TIME_LIMIT = ceil(12.0 * (1000.0 / 60.0))
# at making contact.
@export var setCenter = false

# If false, the player can grab the bar while moving upwards. Otherise the bar
# If false, the player can grab the bar while moving upwards. Otherwise the bar
# is only caught while the player is falling.
@export var onlyActiveMovingDown = true

Expand Down
6 changes: 3 additions & 3 deletions Scripts/Gimmicks/HorizontalBar.gd
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ var playersEntryVel = []


# If player enters with low absolute velocity, enter shimmy mode (unless turned off)
# If player enters from below with high enough volocity, enter launch up mode
# If player enters from below with high enough velocity, enter launch up mode
# If player enters from above with high enough velocity, enter launch down mode
enum PLAYER_MODE {MONITORING, SHIMMY, LAUNCH_UP, LAUNCH_DOWN}

Expand Down Expand Up @@ -193,7 +193,7 @@ func _process_player_shimmy_animation(player):
player.animator.play("hangShimmy", -1, shimmySpeed / 60.0, false)

func _process_player_launch_up(player, playerIndex):
# If brakes are allowed, we want to allow slamming the breaks a little faster than the upwarda nimation normally plas out.
# If brakes are allowed, we want to allow slamming the breaks a little faster than the upward animation normally plays out.
if (player.animator.get_current_animation_position() >= player.animator.get_current_animation_length() * 0.91)\
and (player.get_y_input() > 0) and (allowBrake):
playersMode[playerIndex] = PLAYER_MODE.SHIMMY
Expand Down Expand Up @@ -226,7 +226,7 @@ func _process_player_launch_up(player, playerIndex):
remove_player(player)

func _process_player_launch_down(player, playerIndex):
# If brakes are allowed, we want to allow slamming the breaks a little faster than the upwarda nimation normally plas out.
# If brakes are allowed, we want to allow slamming the breaks a little faster than the upward animation normally plays out.
if (player.animator.get_current_animation_position() >= player.animator.get_current_animation_length() * 0.91)\
and (player.get_y_input() < 0) and (allowBrake):
playersMode[playerIndex] = PLAYER_MODE.SHIMMY
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Gimmicks/ScrewPlatform.gd
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func _physics_process(delta):
else:
activePlayers.erase(i)

# increase move offset by how fast hte player is moving
# increase move offset by how fast the player is moving
moveOffset += -goDirection

if $Screw.position.y > bottom*8:
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Gimmicks/SpinningBarrel.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extends CharacterBody2D

# Depricated, to be removed, use at own risk
# Deprecated, to be removed, use at own risk

var playerList = []
var playerOffset = [0]
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Gimmicks/Teleporter.gd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func _physics_process(delta):
if animator.current_animation == "Beam":
if animator.current_animation_position > 1.0:
Global.players[0].animator.play("roll")
# shift x and y poses seperately so that the movement's not normalized
# shift x and y poses separately so that the movement's not normalized
Global.players[0].global_position.x = move_toward(Global.players[0].global_position.x,global_position.x,delta*60)
Global.players[0].global_position.y -= delta*30
# set physics object shift mode to allowTranslate
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Gimmicks/VerticalBar.gd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ enum {CONSTANT, MULTIPLY}

var players = [] # Tracks the players that are active within the gimmick
var players_speed = [] # Tracks the player's speed on entering the loop (used for multiply mode)
var players_cur_loops = [] # Tracks how many loops the player has been throught eh animation
var players_cur_loops = [] # Tracks how many loops the player has been throughout the animation
var players_pass_hit = [] # Tracks whether the player has hit the release point of the animation

var pass_hit = false
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Gimmicks/VerticalPylon.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extends Node2D
@export var vert_size = 96
## How fast the player should be launched from the pylon when pressing jump
@export var launch_speed = 960
## How fast the player should be launching veritcally from the pylon after jumping
## How fast the player should be launching vertically from the pylon after jumping
## off
@export var launch_vertical_speed = 110
## How fast the player climbs up/down the pylon
Expand Down
4 changes: 2 additions & 2 deletions Scripts/Gimmicks/WaterBar.gd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var breakPart = preload("res://Entities/Misc/falling_block_plat.tscn")

# How many seconds before the bar breaks
@export var strength = 3.0
# Used for reseting the bar strength
# Used for resetting the bar strength
@onready var startStrength = strength

var players = [] # Tracks the players that are active within the gimmick
Expand Down Expand Up @@ -89,7 +89,7 @@ func _physics_process(delta):
# set the velocity
part.velocity = Vector2(releaseDirection*(220-abs(remap(i,0,spriteSplits,-100,80))),remap(i,0,spriteSplits,-100,50))
queue_free() # delete
# reset strenght
# reset strength
else:
strength = startStrength

Expand Down
2 changes: 1 addition & 1 deletion Scripts/Gimmicks/WindCurrent.gd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func _physics_process(_delta):
# determine the direction of the arrow based on scale and rotation
var getDir = Vector2.RIGHT.rotated(global_rotation)

# disconect floor
# disconnect floor
if i.ground:
i.disconect_from_floor()

Expand Down
2 changes: 1 addition & 1 deletion Scripts/Gimmicks/ZoomTubePath.gd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func _ready():
hitbox.set_shape(shape)
enteranceArea.add_child(hitbox)

# create enterance area
# create entrance area
add_child(enteranceArea)
enteranceArea.collision_layer = 0
enteranceArea.collision_mask = 0
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Global/ControlerMenu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func _on_SaveInputs_pressed():
file.set_value("controls","A"+str(actionCount)+i,j.axis)
file.set_value("controls","V"+str(actionCount)+i,j.axis_value)
file.set_value("controls","A"+str(actionCount)+i+"Device",j.device)
# incease counters (prevents conflicts)
# increase counters (prevents conflicts)
actionCount += 1
# save config and close
file.save("user://Config.cfg")
Expand Down
8 changes: 4 additions & 4 deletions Scripts/Global/Global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ var checkPointTime = 0
# the starting room, this is loaded on game resets, you may want to change this
var startScene = preload("res://Scene/Presentation/Title.tscn")
var nextZone = load("res://Scene/Zones/BaseZone.tscn") # change this to the first level in the game (also set in "reset_values")
# use this to store the current state of the room, changing scene will clear everythin
# use this to store the current state of the room, changing scene will clear everything
var stageInstanceMemory = null
var stageLoadMemory = null

# score instace for add_score()
# score instance for add_score()
var Score = preload("res://Entities/Misc/Score.tscn")
# order for score combo
const SCORE_COMBO = [1,2,3,4,4,4,4,4,4,4,4,4,4,4,4,5]
Expand Down Expand Up @@ -54,7 +54,7 @@ var soundChannel = AudioStreamPlayer.new()
var score = 0
var lives = 3
var continues = 0
# emeralds use bitwise flag operations, the equivelent for 7 emeralds would be 128
# emeralds use bitwise flag operations, the equivalent for 7 emeralds would be 128
var emeralds = 0
# emerald bit flags
enum EMERALD {RED = 1, BLUE = 2, GREEN = 4, YELLOW = 8, CYAN = 16, SILVER = 32, PURPLE = 64}
Expand Down Expand Up @@ -82,7 +82,7 @@ var hardBorderBottom = 100000000
# Animal spawn type reference, see the level script for more information on the types
var animals = [0,1]

# emited when a stage gets started
# emitted when a stage gets started
signal stage_started

# Level memory
Expand Down
6 changes: 3 additions & 3 deletions Scripts/Global/Main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extends Node2D
# last scene is used for referencing the current scene (this is used for stage restarting)
var lastScene = null

# this gets emited when the scene fades, used to load in level details and data to hide it from the player
# this gets emitted when the scene fades, used to load in level details and data to hide it from the player
signal scene_faded
# signal that emits when volume fades
signal volume_set
Expand All @@ -15,7 +15,7 @@ var setVolumeLevel = 0 # where to fade the volume to
var volumeLerp = 0 # current stage between start and set for volume level
var volumeFadeSpeed = 1 # speed for volume changing

# was paused enables menu control when the player pauses manually so they don't get stuck (get_tree().paused may want to be used by other intances)
# was paused enables menu control when the player pauses manually so they don't get stuck (get_tree().paused may want to be used by other instances)
var wasPaused = false
# determines if the current scene can pause
var sceneCanPause = false
Expand Down Expand Up @@ -192,7 +192,7 @@ func _on_Life_finished():

# set the volume level
func set_volume(volume = 0, fadeSpeed = 1):
# set the start volume level to the curren volume
# set the start volume level to the current volume
startVolumeLevel = Global.music.volume_db
# set the volume level to go to
setVolumeLevel = volume
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Level/CharacterSelect.gd
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func _input(event):
# set the level
match(levelID):
0: # Base Zone Act 1
Global.nextZone = load("res://Scene/Zones/BaseZone.tscn") # unnecessary since it's arleady set
Global.nextZone = load("res://Scene/Zones/BaseZone.tscn") # unnecessary since it's already set
1: # Base Zone Act 2
Global.nextZone = load("res://Scene/Zones/BaseZoneAct2.tscn") # Replace me! I don't exist yet!
#2: # Chunk Zone Act 1
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Level/Level.gd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extends Node2D
var wasLoaded = false

func _ready():
# debuging
# debugging
if !Global.is_main_loaded:
return false
# skip if scene was loaded
Expand Down
4 changes: 2 additions & 2 deletions Scripts/Misc/Animal.gd
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func _physics_process(delta):
# gravity
velocity.y += gravity*60

# move, ignore collission since we're only checking floors
# move, ignore collision since we're only checking floors
translate(velocity*delta)

# if on floor and falling then bounce
Expand Down Expand Up @@ -119,6 +119,6 @@ func _process(delta):
func _on_VisibilityNotifier2D_screen_exited():
queue_free()

# set active on time out (some spawning scenerios like a capsule sets a delay)
# set active on time out (some spawning scenarios like a capsule sets a delay)
func _on_ActivationTimer_timeout():
active = true
2 changes: 1 addition & 1 deletion Scripts/Misc/ControlBind.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func _ready():
control = get_parent().get_parent()
var _con = connect("pressed",Callable(self,"lock_in_button"))

# input remaping
# input remapping
func _unhandled_input(event):
# check if active
if active:
Expand Down
6 changes: 3 additions & 3 deletions Scripts/Misc/HUD.gd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var gameOver = false
# used for the score countdown
var accumulatedDelta = 0.0

# signal that gets emited once the stage tally is over
# signal that gets emitted once the stage tally is over
signal tally_clear

# character name strings, used for "[player] has cleared", this matches the players character ID so you'll want to add the characters name in here matching the ID if you want more characters
Expand Down Expand Up @@ -115,7 +115,7 @@ func _process(delta):
var hud_time_hundredths:int = int(hud_time * 100) % 100
timeText.text = "%2d'%02d\"%02d" % [hud_time_minutes,hud_time_seconds,hud_time_hundredths]

# cehck that there's player, if there is then track the focus players ring count
# check that there's player, if there is then track the focus players ring count
if (Global.players.size() > 0):
ringText.text = "%3d" % Global.players[focusPlayer].rings

Expand All @@ -124,7 +124,7 @@ func _process(delta):

# Water Overlay

# cehck that this level has water
# check that this level has water
if Global.waterLevel != null:
# get current camera
var cam = GlobalFunctions.getCurrentCamera2D()
Expand Down
6 changes: 3 additions & 3 deletions Scripts/Misc/PauseManager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func _input(event):
match(option): # Options
0: # continue
if Global.main.wasPaused:
# give frame so game doesn't immedaitely unpause
# give frame so game doesn't immediately unpause
await get_tree().process_frame
Global.main.wasPaused = false
get_tree().paused = false
Expand Down Expand Up @@ -145,7 +145,7 @@ func do_lateral_input():
elif inputCue.x != 0 and menu == MENUS.OPTIONS:
var inputDir = inputCue.x

# set audio busses
# set audio buses
var getBus = "SFX"
if option > 0:
getBus = "Music"
Expand All @@ -171,7 +171,7 @@ func do_lateral_input():
lastInput = inputCue

func choose_option(optionSet = option+1, playSound = true):
# reset curren option colour to white
# reset current option colour to white
$PauseMenu/VBoxContainer.get_child(option+1).modulate = Color.WHITE
# change to new option, set the new option colour to yellow
option = wrapi(optionSet,0,menusText[menu].size()-1)
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Objects/Checkpoint.gd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func _ready():


func activate():
# queue flash, incase an animation is already playing
# queue flash, in case an animation is already playing
$Spinner.queue("flash")
active = true
Global.currentCheckPoint = checkPointID
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Objects/CollapsePlatform.gd
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func _ready():
func _physics_process(delta):
# check if to activate
if !active:
# if we can detect any players and they're on the flor, activate
# if we can detect any players and they're on the floor, activate
for i in players:
# do a active check to prevent the sound playing twice
if i.ground and !active:
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Objects/ForceAngleSides.gd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func _physics_process(_delta):
if rightAngle != null:
i.angle = deg_to_rad(rightAngle)

# if greater then angle difference and distance from center is below drop off, disconect from floor
# if greater then angle difference and distance from center is below drop off, disconnect from floor
if abs(i.angle-PrevAngle) >= deg_to_rad(maxAngleDifference) and abs(i.global_position.x-global_position.x) < dropOff:
i.disconect_from_floor()
else:
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Objects/Lava.gd
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func update_graphics():
# clamp size
size.x = max(size.x,1)
size.y = max(size.y,8)
# set the collission shape and graphics scaling
# set the collision shape and graphics scaling
$Collision/CollisionShape2D.shape.size = Vector2(size.x-1,size.y-1)
$LavaTile.region_rect.size = size
$LavaTop.region_rect.size.x = size.x
Expand Down
Loading