summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSimon Chiang <[email protected]>2021-04-23 09:46:41 -0600
committerAmir Rajan <[email protected]>2021-05-26 16:08:45 -0500
commitd5115606c96b0fe0affd72e6e0b72edce7e51042 (patch)
tree5d750d974dc947163dc4cb37a0c9bbac9266a207
parent1404fd05a99cf745c33a4316b9d5e1562083c3ae (diff)
downloaddragonruby-game-toolkit-contrib-d5115606c96b0fe0affd72e6e0b72edce7e51042.tar.gz
dragonruby-game-toolkit-contrib-d5115606c96b0fe0affd72e6e0b72edce7e51042.zip
Typo fixes
-rw-r--r--deploy_template/mygame/documentation/02-labels.md4
-rw-r--r--deploy_template/mygame/documentation/03-solids-and-borders.md4
-rw-r--r--deploy_template/mygame/documentation/04-lines.md4
-rw-r--r--deploy_template/mygame/documentation/05-sprites.md2
-rw-r--r--docs/todo/03-solids-and-borders.md4
-rw-r--r--docs/todo/04-lines.md4
-rw-r--r--docs/todo/05-sprites.md4
-rw-r--r--docs/todo/08-controllers.md2
-rw-r--r--dragon/assert.rb8
-rw-r--r--dragon/config.rb2
-rw-r--r--dragon/controller_config.rb2
-rw-r--r--dragon/directional_input_helper_methods.rb2
-rw-r--r--dragon/docs.rb2
-rw-r--r--dragon/geometry.rb2
-rw-r--r--dragon/help.rb2
-rw-r--r--dragon/ios_wizard.rb4
-rw-r--r--dragon/mouse_docs.rb12
-rw-r--r--dragon/numeric.rb8
-rw-r--r--dragon/outputs_docs.rb8
-rw-r--r--dragon/readme_docs.rb8
-rw-r--r--dragon/remote_hotload_client.rb2
-rw-r--r--samples/01_rendering_basics/01_labels/app/main.rb6
-rw-r--r--samples/02_input_basics/01_keyboard/app/main.rb4
-rw-r--r--samples/02_input_basics/03_mouse_point_to_rect/app/main.rb2
-rw-r--r--samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb4
-rw-r--r--samples/03_rendering_sprites/04_color_and_rotation/app/main.rb4
-rw-r--r--samples/04_physics_and_collisions/01_simple/app/main.rb6
-rw-r--r--samples/04_physics_and_collisions/02_moving_objects/app/main.rb2
-rw-r--r--samples/04_physics_and_collisions/04_box_collision/app/main.rb6
-rw-r--r--samples/04_physics_and_collisions/05_box_collision_2/app/main.rb4
-rw-r--r--samples/04_physics_and_collisions/06_jump_physics/app/main.rb2
-rw-r--r--samples/04_physics_and_collisions/07_jump_physics/app/main.rb2
-rw-r--r--samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb8
-rw-r--r--samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb2
-rw-r--r--samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb18
-rw-r--r--samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb2
-rw-r--r--samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb4
-rw-r--r--samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb2
-rw-r--r--samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb2
-rw-r--r--samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb6
-rw-r--r--samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb2
-rw-r--r--samples/05_mouse/01_mouse_click/app/main.rb2
-rw-r--r--samples/05_mouse/02_mouse_move/app/main.rb4
-rw-r--r--samples/05_mouse/03_mouse_move_paint_app/app/main.rb2
-rw-r--r--samples/06_save_load/01_save_load_game/app/main.rb8
-rw-r--r--samples/07_advanced_rendering/03_render_target_viewports/app/main.rb4
-rw-r--r--samples/09_performance/02_sprites_as_entities/app/main.rb2
-rw-r--r--samples/09_performance/04_sprites_as_classes/app/main.rb2
-rw-r--r--samples/09_performance/05_static_sprites_as_classes/app/main.rb2
-rw-r--r--samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb2
-rw-r--r--samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb2
-rw-r--r--samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb2
-rw-r--r--samples/13_path_finding_algorithms/06_heuristic/app/main.rb2
-rw-r--r--samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb2
-rw-r--r--samples/99_genre_arcade/snakemoji/app/main.rb6
-rw-r--r--samples/99_genre_arcade/twinstick/app/main.rb2
-rw-r--r--samples/99_genre_crafting/craft_game_starting_point/app/main.rb32
-rw-r--r--samples/99_genre_lowrez/nokia_3310/app/main.rb6
-rw-r--r--samples/99_genre_lowrez/resolution_64x64/app/main.rb6
-rw-r--r--samples/99_genre_platformer/clepto_frog/app/main.rb2
-rw-r--r--samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb2
-rw-r--r--samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb2
-rw-r--r--samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb2
-rw-r--r--samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb2
-rw-r--r--samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb2
-rw-r--r--samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb2
-rw-r--r--samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb2
-rw-r--r--samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb2
-rw-r--r--samples/99_genre_rpg_tactical/isometric_grid/app/main.rb8
69 files changed, 146 insertions, 146 deletions
diff --git a/deploy_template/mygame/documentation/02-labels.md b/deploy_template/mygame/documentation/02-labels.md
index ea2642e..8cfa35e 100644
--- a/deploy_template/mygame/documentation/02-labels.md
+++ b/deploy_template/mygame/documentation/02-labels.md
@@ -43,7 +43,7 @@ args.outputs.labels << [640, 360, "Hello world", 0, 1]
## RGBA - Colors and Alpha
-Labels can have colors. The value for the color is an number between
+Labels can have colors. The value for the color is a number between
`0` and `255`.
A green label with 50% opacity.
@@ -100,7 +100,7 @@ args.outputs.labels << {
## Duck Typing (Advanced)
You can also create a class with line properties and render it as a primitive.
-ALL properties must on the class. ADDITIONALLY, a method called
+ALL properties must be on the class. ADDITIONALLY, a method called
`primitive_marker` must be defined on the class.
Here is an example:
diff --git a/deploy_template/mygame/documentation/03-solids-and-borders.md b/deploy_template/mygame/documentation/03-solids-and-borders.md
index d309e40..fb51e3a 100644
--- a/deploy_template/mygame/documentation/03-solids-and-borders.md
+++ b/deploy_template/mygame/documentation/03-solids-and-borders.md
@@ -33,7 +33,7 @@ args.outputs.borders << [100, 100, 160, 90]
## RGBA - Colors and Alpha
-The value for the color and alpha is an number between `0` and `255`. The
+The value for the color and alpha is a number between `0` and `255`. The
alpha property is optional and will be set to `255` if not specified.
Creates a green solid rectangle with an opacity of 50%.
@@ -93,7 +93,7 @@ args.outputs.borders << {
## Duck Typing (Advanced)
You can also create a class with solid/border properties and render it as a primitive.
-ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker`
+ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker`
must be defined on the class.
Here is an example:
diff --git a/deploy_template/mygame/documentation/04-lines.md b/deploy_template/mygame/documentation/04-lines.md
index 03c1abc..20faa44 100644
--- a/deploy_template/mygame/documentation/04-lines.md
+++ b/deploy_template/mygame/documentation/04-lines.md
@@ -35,7 +35,7 @@ args.outputs.lines << [ 0, 360, 1280, 360]
## RGBA - Colors and Alpha
-The value for the color and alpha is an number between `0` and `255`. The
+The value for the color and alpha is a number between `0` and `255`. The
alpha property is optional and will be set to `255` if not specified.
Creates a green horizontal line through the center of the scene with an opacity of 50%.
@@ -75,7 +75,7 @@ args.outputs.lines << {
## Duck Typing (Advanced)
You can also create a class with line properties and render it as a primitive.
-ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker`
+ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker`
must be defined on the class.
Here is an example:
diff --git a/deploy_template/mygame/documentation/05-sprites.md b/deploy_template/mygame/documentation/05-sprites.md
index e4d5cbb..973ff29 100644
--- a/deploy_template/mygame/documentation/05-sprites.md
+++ b/deploy_template/mygame/documentation/05-sprites.md
@@ -203,7 +203,7 @@ args.outputs.sprites << {
## Duck Typing (Advanced)
You can also create a class with sprite properties and render it as a primitive.
-ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker`
+ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker`
must be defined on the class.
Here is an example:
diff --git a/docs/todo/03-solids-and-borders.md b/docs/todo/03-solids-and-borders.md
index 0ed2fc9..34acc96 100644
--- a/docs/todo/03-solids-and-borders.md
+++ b/docs/todo/03-solids-and-borders.md
@@ -33,7 +33,7 @@ args.outputs.borders << [100, 100, 160, 90]
## RGBA - Colors and Alpha
-The value for the color and alpha is an number between `0` and `255`. The
+The value for the color and alpha is a number between `0` and `255`. The
alpha property is optional and will be set to `255` if not specified.
Creates a green solid rectangle with an opacity of 50%.
@@ -93,7 +93,7 @@ args.outputs.borders << {
## Duck Typing (Advanced)
You can also create a class with solid/border properties and render it as a primitive.
-ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker`
+ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker`
must be defined on the class.
Here is an example:
diff --git a/docs/todo/04-lines.md b/docs/todo/04-lines.md
index 03c1abc..20faa44 100644
--- a/docs/todo/04-lines.md
+++ b/docs/todo/04-lines.md
@@ -35,7 +35,7 @@ args.outputs.lines << [ 0, 360, 1280, 360]
## RGBA - Colors and Alpha
-The value for the color and alpha is an number between `0` and `255`. The
+The value for the color and alpha is a number between `0` and `255`. The
alpha property is optional and will be set to `255` if not specified.
Creates a green horizontal line through the center of the scene with an opacity of 50%.
@@ -75,7 +75,7 @@ args.outputs.lines << {
## Duck Typing (Advanced)
You can also create a class with line properties and render it as a primitive.
-ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker`
+ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker`
must be defined on the class.
Here is an example:
diff --git a/docs/todo/05-sprites.md b/docs/todo/05-sprites.md
index e8030ab..773a007 100644
--- a/docs/todo/05-sprites.md
+++ b/docs/todo/05-sprites.md
@@ -29,7 +29,7 @@ args.outputs.sprites << [100, 100, 32, 64, "sprites/player.png"]
## Rotation / Angle
-Unlike `solids` and `borders`, sprites can be rotated. This is how you rotate a sprite 90 degress.
+Unlike `solids` and `borders`, sprites can be rotated. This is how you rotate a sprite 90 degrees.
Note: All angles in DragonRuby Game Toolkit are represented in degrees (not radians).
@@ -180,7 +180,7 @@ args.outputs.sprites << {
## Duck Typing (Advanced)
You can also create a class with sprite properties and render it as a primitive.
-ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker`
+ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker`
must be defined on the class.
Here is an example:
diff --git a/docs/todo/08-controllers.md b/docs/todo/08-controllers.md
index aa85ee8..9ed9199 100644
--- a/docs/todo/08-controllers.md
+++ b/docs/todo/08-controllers.md
@@ -33,7 +33,7 @@ end
# Truthy Keys
-You can access all triggered keys through `thruthy_keys` on `keyboard`, `controller_one`, and `controller_two`.
+You can access all triggered keys through `truthy_keys` on `keyboard`, `controller_one`, and `controller_two`.
This is how you would write all keys to a file. The game must be in the foreground and have focus for this data
to be recorded.
diff --git a/dragon/assert.rb b/dragon/assert.rb
index bc21add..5ba344d 100644
--- a/dragon/assert.rb
+++ b/dragon/assert.rb
@@ -24,10 +24,10 @@ To add an assertion open up this class and write:
class Assert
def custom_assertion actual, expected, message = nil
- # this tell Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive).
+ # this tells Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive).
@assertion_performed = true
- # perform your custom logic here and rais an exception to denote a failure.
+ # perform your custom logic here and raise an exception to denote a failure.
raise "Some Error. #{message}."
end
@@ -37,14 +37,14 @@ end
attr :assertion_performed
=begin
-Us this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive).
+Use this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive).
=end
def ok!
@assertion_performed = true
end
=begin
-Assert if a value is a thruthy value. All assert method take an optional final parameter that is the message to display to the user.
+Assert if a value is a truthy value. All assert methods take an optional final parameter that is the message to display to the user.
@example
diff --git a/dragon/config.rb b/dragon/config.rb
index de57085..a2887dc 100644
--- a/dragon/config.rb
+++ b/dragon/config.rb
@@ -127,7 +127,7 @@ module GTK
def previous_part
if @current_part > 0
- # remove the binding that we previous had here so it can be reused.
+ # remove the binding that we previously had here so it can be reused.
bindstr = @bindings[@current_part - 1]
@bindings[@current_part - 1] = nil
@used_bindings[bindstr] = nil
diff --git a/dragon/controller_config.rb b/dragon/controller_config.rb
index 091fa1e..c315ab5 100644
--- a/dragon/controller_config.rb
+++ b/dragon/controller_config.rb
@@ -125,7 +125,7 @@ module GTK
def previous_part
if @current_part > 0
- # remove the binding that we previous had here so it can be reused.
+ # remove the binding that we previously had here so it can be reused.
bindstr = @bindings[@current_part - 1]
@bindings[@current_part - 1] = nil
@used_bindings[bindstr] = nil
diff --git a/dragon/directional_input_helper_methods.rb b/dragon/directional_input_helper_methods.rb
index a587212..44913ba 100644
--- a/dragon/directional_input_helper_methods.rb
+++ b/dragon/directional_input_helper_methods.rb
@@ -13,7 +13,7 @@ module GTK
error_message = <<-S
* ERROR
-The GTK::DirectionalKeys module should only be included in objects that respond to the following api heirarchy:
+The GTK::DirectionalKeys module should only be included in objects that respond to the following api hierarchy:
- (#{ directional_methods.join("|") })
- key_held.(#{ directional_methods.join("|") })
diff --git a/dragon/docs.rb b/dragon/docs.rb
index cc80d7e..e6f6e2d 100644
--- a/dragon/docs.rb
+++ b/dragon/docs.rb
@@ -46,7 +46,7 @@ module DocsOrganizer
unsorted.each do |k|
puts <<-S
* WARNING: #{klass.name} is not included in DocsOrganizer::class_sort_order. Please place this
-module in it's correct topilogical order.
+module in it's correct topological order.
S
end
diff --git a/dragon/geometry.rb b/dragon/geometry.rb
index 9385022..c2974db 100644
--- a/dragon/geometry.rb
+++ b/dragon/geometry.rb
@@ -129,7 +129,7 @@ S
end
- # Returns a primitive that is anchored/repositioned based off its retangle.
+ # Returns a primitive that is anchored/repositioned based off its rectangle.
# @gtk
def anchor_rect anchor_x, anchor_y
current_w = self.w
diff --git a/dragon/help.rb b/dragon/help.rb
index aee60d8..9644347 100644
--- a/dragon/help.rb
+++ b/dragon/help.rb
@@ -57,7 +57,7 @@ S
* :sprite (if :primitive_marker returns :sprite)
** :x, :y, :w, :h
** :angle, :angle_anchor_x, :angle_anchor_y
-default for angle: 0 (0 to 360 degress)
+default for angle: 0 (0 to 360 degrees)
default for angle_anchor_(x|y): 0 (decimal value between 0 and 1.0, 0.5 means center)
** :r, :g, :b, :a
** :tile_x, :tile_y
diff --git a/dragon/ios_wizard.rb b/dragon/ios_wizard.rb
index d2c3dc5..9383749 100644
--- a/dragon/ios_wizard.rb
+++ b/dragon/ios_wizard.rb
@@ -227,7 +227,7 @@ class IOSWizard
def determine_team_identifier
@team_name = (team_identifier_from_provisioning_profile @opts[:env])
- log_info "Team Identifer is: #{@team_name}"
+ log_info "Team Identifier is: #{@team_name}"
end
def determine_app_name
@@ -357,7 +357,7 @@ class IOSWizard
"** 1. Open Xcode.",
"** 2. Log into your developer account. Xcode -> Preferences -> Accounts.",
{ w: 700, h: 98, path: get_reserved_sprite("login-xcode.png") },
- "** 3. After loggin in, select Manage Certificates...",
+ "** 3. After logging in, select Manage Certificates...",
{ w: 700, h: 115, path: get_reserved_sprite("manage-certificates.png") },
"** 4. Add a certificate for Apple Development.",
{ w: 700, h: 217, path: get_reserved_sprite("add-cert.png") },
diff --git a/dragon/mouse_docs.rb b/dragon/mouse_docs.rb
index ef4b923..523d5ce 100644
--- a/dragon/mouse_docs.rb
+++ b/dragon/mouse_docs.rb
@@ -46,12 +46,12 @@ The ~GTK::MousePoint~ has the following properties.
- ~x~: Integer representing the mouse's x.
- ~y~: Integer representing the mouse's y.
- ~point~: Array with the ~x~ and ~y~ values.
-- ~w~: Width of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
-- ~h~: Height of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
-- ~left~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
-- ~right~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
-- ~top~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
-- ~bottom~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
+- ~w~: Width of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
+- ~h~: Height of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
+- ~left~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
+- ~right~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
+- ~top~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
+- ~bottom~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
- ~created_at~: The tick (~args.state.tick_count~) that this structure was created.
- ~global_created_at~: The global tick (~Kernel.global_tick_count~) that this structure was created.
diff --git a/dragon/numeric.rb b/dragon/numeric.rb
index 93bacae..3cf1314 100644
--- a/dragon/numeric.rb
+++ b/dragon/numeric.rb
@@ -256,7 +256,7 @@ S
self * Math::PI.fdiv(180)
end
- # Converts a number representing an angle in radians to degress.
+ # Converts a number representing an angle in radians to degrees.
#
# @gtk
def to_degrees
@@ -273,21 +273,21 @@ S
GTK::Geometry.to_square(self, x, y, anchor_x, anchor_y)
end
- # Returns a normal vector for a number that represents an angle in degress.
+ # Returns a normal vector for a number that represents an angle in degrees.
#
# @gtk
def vector max_value = 1
[vector_x(max_value), vector_y(max_value)]
end
- # Returns the y component of a normal vector for a number that represents an angle in degress.
+ # Returns the y component of a normal vector for a number that represents an angle in degrees.
#
# @gtk
def vector_y max_value = 1
max_value * Math.sin(self.to_radians)
end
- # Returns the x component of a normal vector for a number that represents an angle in degress.
+ # Returns the x component of a normal vector for a number that represents an angle in degrees.
#
# @gtk
def vector_x max_value = 1
diff --git a/dragon/outputs_docs.rb b/dragon/outputs_docs.rb
index cd4a20c..b2dc57d 100644
--- a/dragon/outputs_docs.rb
+++ b/dragon/outputs_docs.rb
@@ -80,7 +80,7 @@ wide and 90 pixels tall.
** Rendering a solid using an Array with colors and alpha
-The value for the color and alpha is an number between ~0~ and ~255~. The
+The value for the color and alpha is a number between ~0~ and ~255~. The
alpha property is optional and will be set to ~255~ if not specified.
Creates a green solid rectangle with an opacity of 50%.
@@ -116,7 +116,7 @@ be provided in any order.
** Rendering a solid using a Class
You can also create a class with solid/border properties and render it as a primitive.
-ALL properties must on the class. *Additionally*, a method called ~primitive_marker~
+ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~
must be defined on the class.
Here is an example:
@@ -171,7 +171,7 @@ wide and 90 pixels tall.
** Rendering a sprite using an Array with colors and alpha
-The value for the color and alpha is an number between ~0~ and ~255~. The
+The value for the color and alpha is a number between ~0~ and ~255~. The
alpha property is optional and will be set to ~255~ if not specified.
Creates a green circle sprite with an opacity of 50%.
@@ -209,7 +209,7 @@ be provided in any order.
** Rendering a solid using a Class
You can also create a class with solid/border properties and render it as a primitive.
-ALL properties must on the class. *Additionally*, a method called ~primitive_marker~
+ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~
must be defined on the class.
Here is an example:
diff --git a/dragon/readme_docs.rb b/dragon/readme_docs.rb
index aedf976..78e0320 100644
--- a/dragon/readme_docs.rb
+++ b/dragon/readme_docs.rb
@@ -430,7 +430,7 @@ Console type: ~$wizards.ios.start~ and you will be guided through the
deployment process.
To deploy to Android, you need to have an Android emulator/device, and
-a environment that is able to run Android SDK. ~dragonruby-publish~
+an environment that is able to run Android SDK. ~dragonruby-publish~
will create an APK for you. From there, you can sign the APK and
install it to your device. The signing and installation procedure
varies from OS to OS. Here's an example of what the command might look
@@ -453,7 +453,7 @@ The following tenants of DragonRuby are what set us apart from other
game engines. Given that Game Toolkit is a relatively new engine,
there are definitely features that are missing. So having a big check
list of "all the cool things" is not this engine's forte. This is
-compensated with a strong commitment to the following principals.
+compensated with a strong commitment to the following principles.
** Challenge The Status Quo
@@ -1145,7 +1145,7 @@ challenges in creating something that is compatible.
You can use DragonRuby's replay capabilities to troubleshoot:
1. DragonRuby is hot loaded which gives you a very fast feedback loop (if the game throws an exception, it's because of the code you just added).
-2. Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recoding by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~.
+2. Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recording by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~.
3. DragonRuby also ships with a unit testing facility. You can invoke the following command to run a test: ~./dragonruby . --eval some_ruby_file.rb --no-tick~.
4. Get into the habit of adding debugging facilities within the game itself. You can add drawing primitives to ~args.outputs.debug~ that will render on top of your game but will be ignored in a production release.
5. Debugging something that runs at 60fps is (imo) not that helpful. The exception you are seeing could have been because of a change that occurred many frames ago.
@@ -1158,7 +1158,7 @@ Let's check the official source for the answer to this question:
isrubydead.com: [[https://isrubydead.com/]].
On a more serious note, Ruby's _quantity_ levels aren't what they used
-to be. And that's totally fine. Every one chases the new and shiny.
+to be. And that's totally fine. Everyone chases the new and shiny.
What really matters is _quality/maturity_. Here is the latest (StackOverflow
Survey sorted by highest paid developers)[https://insights.stackoverflow.com/survey/2019#top-paying-technologies].
diff --git a/dragon/remote_hotload_client.rb b/dragon/remote_hotload_client.rb
index 87693cd..ce8f175 100644
--- a/dragon/remote_hotload_client.rb
+++ b/dragon/remote_hotload_client.rb
@@ -47,7 +47,7 @@ module GTK
def local_state
@local_state ||= OpenEntity.new
@local_state.hotload_client ||= @local_state.new_entity(:hotload_client,
- notes: "This enitity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.",
+ notes: "This entity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.",
changes: { },
changes_queue: [],
reloaded_files_times: [])
diff --git a/samples/01_rendering_basics/01_labels/app/main.rb b/samples/01_rendering_basics/01_labels/app/main.rb
index c3e1afc..8a5e866 100644
--- a/samples/01_rendering_basics/01_labels/app/main.rb
+++ b/samples/01_rendering_basics/01_labels/app/main.rb
@@ -2,12 +2,12 @@
APIs listing that haven't been encountered in a previous sample apps:
-- args.outputs.labels: An array. Values in this array generate labels
+- args.outputs.labels: An array. Values in this array generate labels on
the screen.
- args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual
720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720).
- Numeric#shift_(left|right|up|down): Shifts the Numeric in the correct direction
- by adding or subracting.
+ by adding or subtracting.
=end
@@ -27,7 +27,7 @@ APIs listing that haven't been encountered in a previous sample apps:
# The tick method is called by DragonRuby every frame
# args contains all the information regarding the game.
def tick args
- tick_instructions args, "Sample app shows different version of label sizes and alignments. And how to use hashes instead of arrays."
+ tick_instructions args, "Sample app shows different versions of label sizes and alignments. And how to use hashes instead of arrays."
# Here are some examples of simple labels, with the minimum number of parameters
# Note that the default values for the other parameters are 0, except for Alpha which is 255 and Font Style which is the default font
args.outputs.labels << [400, 620, "Here is a label with just an x, y, and text"]
diff --git a/samples/02_input_basics/01_keyboard/app/main.rb b/samples/02_input_basics/01_keyboard/app/main.rb
index 3c5e1b4..d0321ef 100644
--- a/samples/02_input_basics/01_keyboard/app/main.rb
+++ b/samples/02_input_basics/01_keyboard/app/main.rb
@@ -4,7 +4,7 @@ APIs listing that haven't been encountered in a previous sample apps:
- args.inputs.keyboard.key_up.KEY: The value of the properties will be set
to the frame that the key_up event occurred (the frame correlates
- to args.state.tick_count). Otherwise the value will be nil.
+ to args.state.tick_count). Otherwise the value will be nil.
- args.state.PROPERTY: The state property on args is a dynamic
structure. You can define ANY property here with ANY type of
arbitrary nesting. Properties defined on args.state will be retained
@@ -28,7 +28,7 @@ def tick args
args.outputs.labels << [460, row_to_px(args, 2), "Keyboard input: args.inputs.keyboard.key_up.h", small_font]
args.outputs.labels << [460, row_to_px(args, 3), "Press \"h\" on the keyboard.", small_font]
- # Input on a specifc key can be found through args.inputs.keyboard.key_up followed by the key
+ # Input on a specific key can be found through args.inputs.keyboard.key_up followed by the key
if args.inputs.keyboard.key_up.h
args.state.h_pressed_at = args.state.tick_count
end
diff --git a/samples/02_input_basics/03_mouse_point_to_rect/app/main.rb b/samples/02_input_basics/03_mouse_point_to_rect/app/main.rb
index 7dd627f..1e30943 100644
--- a/samples/02_input_basics/03_mouse_point_to_rect/app/main.rb
+++ b/samples/02_input_basics/03_mouse_point_to_rect/app/main.rb
@@ -36,7 +36,7 @@ APIs that haven't been encountered in a previous sample apps:
# This is useful to determine if a click occurred in a rect
def tick args
- tick_instructions args, "Sample app shows how to determing if a click happened inside a rectangle."
+ tick_instructions args, "Sample app shows how to determine if a click happened inside a rectangle."
x = 460
diff --git a/samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb b/samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb
index c5622e8..1f88366 100644
--- a/samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb
+++ b/samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb
@@ -69,7 +69,7 @@ end
# This function shows how to animate a sprite that executes
# only once when the "f" key is pressed.
def one_time_animation args
- # This is just a label the shows instructions within the game.
+ # This is just a label that shows instructions within the game.
args.outputs.labels << [220, 350, "(press f to animate)"]
# If "f" is pressed on the keyboard...
@@ -104,7 +104,7 @@ def one_time_animation args
# This line sets the frame index to zero, if
# the animation duration has passed (frame_index returned nil).
- # Remeber: we are not looping forever here.
+ # Remember: we are not looping forever here.
sprite_index ||= 0
# Present the sprite.
diff --git a/samples/03_rendering_sprites/04_color_and_rotation/app/main.rb b/samples/03_rendering_sprites/04_color_and_rotation/app/main.rb
index 072feaf..7e0fc3c 100644
--- a/samples/03_rendering_sprites/04_color_and_rotation/app/main.rb
+++ b/samples/03_rendering_sprites/04_color_and_rotation/app/main.rb
@@ -117,7 +117,7 @@ def create_sprite path, options = {}
source_w: -1,
source_h: -1,
- # flip horiztonally, flip vertically
+ # flip horizontally, flip vertically
flip_h: false,
flip_v: false,
@@ -153,7 +153,7 @@ end
def calc_wrap state
# car returns to left side of screen if it disappears on right side of screen
- # sprite.width refers to tile's size, which is multipled by scale (4) to make it bigger
+ # sprite.width refers to tile's size, which is multiplied by scale (4) to make it bigger
state.x = -state.sprite.width * state.sprite.scale if state.x - 20 > 1280
# car wraps around to right side of screen if it disappears on the left side
diff --git a/samples/04_physics_and_collisions/01_simple/app/main.rb b/samples/04_physics_and_collisions/01_simple/app/main.rb
index 5e3f9b7..9075d89 100644
--- a/samples/04_physics_and_collisions/01_simple/app/main.rb
+++ b/samples/04_physics_and_collisions/01_simple/app/main.rb
@@ -10,7 +10,7 @@
# This sample app shows collisions between two boxes.
-# Runs methods needed for game to run properly.
+# Runs methods needed for the game to run properly.
def tick args
tick_instructions args, "Sample app shows how to move a square over time and determine collision."
defaults args
@@ -33,7 +33,7 @@ def defaults args
end
def render args
- # If the game state denotes that a collision has occured,
+ # If the game state denotes that a collision has occurred,
# render a solid square, otherwise render a border instead.
if args.state.center_box_collision
args.outputs.solids << args.state.center_box
@@ -47,7 +47,7 @@ end
# Generally in a pipeline for a game engine, you have rendering,
# game simulation (calculation), and input processing.
-# This fuction represents the game simulation.
+# This function represents the game simulation.
def calc args
position_moving_box args
determine_collision_center_box args
diff --git a/samples/04_physics_and_collisions/02_moving_objects/app/main.rb b/samples/04_physics_and_collisions/02_moving_objects/app/main.rb
index e3e9261..9c39363 100644
--- a/samples/04_physics_and_collisions/02_moving_objects/app/main.rb
+++ b/samples/04_physics_and_collisions/02_moving_objects/app/main.rb
@@ -56,7 +56,7 @@
=end
-# Calls methods needed for game to run properly
+# Calls methods needed for the game to run properly
def tick args
tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump."
defaults args
diff --git a/samples/04_physics_and_collisions/04_box_collision/app/main.rb b/samples/04_physics_and_collisions/04_box_collision/app/main.rb
index af85fef..e407f0d 100644
--- a/samples/04_physics_and_collisions/04_box_collision/app/main.rb
+++ b/samples/04_physics_and_collisions/04_box_collision/app/main.rb
@@ -42,7 +42,7 @@ class PoorManPlatformerPhysics
# Sets default values for variables.
# The ||= sign means that the variable will only be set to the value following the = sign if the value has
- # not already been set before. Intialization happens only in the first frame.
+ # not already been set before. Initialization happens only in the first frame.
def defaults
state.tile_size = 64
state.gravity = -0.2
@@ -161,7 +161,7 @@ class PoorManPlatformerPhysics
# Calls methods needed to determine collisions between player and world_collision rects.
def calc_box_collision
- return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key
+ return unless state.world_lookup.keys.length > 0 # return unless hash has at least 1 key
collision_floor!
collision_left!
collision_right!
@@ -189,7 +189,7 @@ class PoorManPlatformerPhysics
return unless state.dx < 0 # return unless player is moving left
player_rect = [state.x - 0.1, state.y, state.tile_size, state.tile_size]
- # Goes through world_collision_rects to find all intersections beween the player's left side and the
+ # Goes through world_collision_rects to find all intersections between the player's left side and the
# right side of a world_collision_rect.
left_side_collisions = state.world_collision_rects
.find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }
diff --git a/samples/04_physics_and_collisions/05_box_collision_2/app/main.rb b/samples/04_physics_and_collisions/05_box_collision_2/app/main.rb
index 126759a..42ccf22 100644
--- a/samples/04_physics_and_collisions/05_box_collision_2/app/main.rb
+++ b/samples/04_physics_and_collisions/05_box_collision_2/app/main.rb
@@ -91,7 +91,7 @@ class MetroidvaniaStarter
state.sprite_selected ||= 1
state.map_saved_at ||= 0
- # Sets all the cordinate values for the sprite selection screen into a grid
+ # Sets all the coordinate values for the sprite selection screen into a grid
# Displayed when 's' is pressed by player to access sprites
if state.sprite_coords == [] # if sprite_coords is an empty array
count = 1
@@ -223,7 +223,7 @@ class MetroidvaniaStarter
# Calls methods that determine whether the player collides with any world_collision_rects.
def calc_box_collision
- return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key
+ return unless state.world_lookup.keys.length > 0 # return unless hash has at least 1 key
collision_floor
collision_left
collision_right
diff --git a/samples/04_physics_and_collisions/06_jump_physics/app/main.rb b/samples/04_physics_and_collisions/06_jump_physics/app/main.rb
index da01e91..9d7a976 100644
--- a/samples/04_physics_and_collisions/06_jump_physics/app/main.rb
+++ b/samples/04_physics_and_collisions/06_jump_physics/app/main.rb
@@ -36,7 +36,7 @@ class VerticalPlatformer
s.new_entity_strict(:platform, hash) # platform key
end
- # calls methods needed for game to run properly
+ # calls methods needed for the game to run properly
def tick
defaults
render
diff --git a/samples/04_physics_and_collisions/07_jump_physics/app/main.rb b/samples/04_physics_and_collisions/07_jump_physics/app/main.rb
index da01e91..9d7a976 100644
--- a/samples/04_physics_and_collisions/07_jump_physics/app/main.rb
+++ b/samples/04_physics_and_collisions/07_jump_physics/app/main.rb
@@ -36,7 +36,7 @@ class VerticalPlatformer
s.new_entity_strict(:platform, hash) # platform key
end
- # calls methods needed for game to run properly
+ # calls methods needed for the game to run properly
def tick
defaults
render
diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb
index 9254ee4..db6687a 100644
--- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb
+++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb
@@ -110,8 +110,8 @@ class Block
#Find the vector that is perpendicular to the slope
perpVect = { x: x, y: y }
- mag = (perpVect.x**2 + perpVect.y**2)**0.5 # find the magniude of the perpVect
- perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)} # divide the perpVect by the magniude to make it a unit vector
+ mag = (perpVect.x**2 + perpVect.y**2)**0.5 # find the magnitude of the perpVect
+ perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)} # divide the perpVect by the magnitude to make it a unit vector
previousPosition = { # calculate an ESTIMATE of the previousPosition of the ball
x:args.state.ball.center.x-args.state.ball.velocity.x,
@@ -140,7 +140,7 @@ class Block
dampener = 0.3
ynew *= dampener * 0.5
- #If the bounce is very low, that means the ball is rolling and we don't want to dampenen the X velocity
+ #If the bounce is very low, that means the ball is rolling and we don't want to dampen the X velocity
if ynew > -0.1
xnew *= dampener
end
@@ -152,7 +152,7 @@ class Block
args.state.ball.velocity.x = -xnew
args.state.ball.velocity.y = -ynew
- #Set the position of the ball to the previous position so it doesn't warp throught the block
+ #Set the position of the ball to the previous position so it doesn't warp through the block
args.state.ball.center.x = previousPosition.x
args.state.ball.center.y = previousPosition.y
end
diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb
index f5883ad..22d3711 100644
--- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb
+++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb
@@ -60,7 +60,7 @@ begin :default_methods
center = args.grid.w / 2
for i in (0...5)
- #Create a ramp of blocks. Not going to be perfect because of the float to integer conversion and anisotropic to isotropic coversion
+ #Create a ramp of blocks. Not going to be perfect because of the float to integer conversion and anisotropic to isotropic conversion
args.state.blocks.append(Block.new((center + 100 + (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, rotation))
args.state.blocks.append(Block.new((center - 100 - (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, -rotation))
end
diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb
index 52045de..daf95ec 100644
--- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb
+++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb
@@ -1,11 +1,11 @@
class Peg
def initialize(x, y, block_size)
- @x = x # x cordinate of the LEFT side of the peg
- @y = y # y cordinate of the RIGHT side of the peg
+ @x = x # x coordinate of the LEFT side of the peg
+ @y = y # y coordinate of the RIGHT side of the peg
@block_size = block_size # diameter of the peg
@radius = @block_size/2.0 # radius of the peg
- @center = { # cordinatees of the CENTER of the peg
+ @center = { # coordinatees of the CENTER of the peg
x: @x+@block_size/2.0,
y: @y+@block_size/2.0
}
@@ -116,8 +116,8 @@ class Peg
}
perpVect = {x: pointB.x - pointA.x, y:pointB.y - pointA.y} # perpVect is to be VECTOR of the perpendicular tangent
- mag = (perpVect.x**2 + perpVect.y**2)**0.5 # find the magniude of the perpVect
- perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)} # divide the perpVect by the magniude to make it a unit vector
+ mag = (perpVect.x**2 + perpVect.y**2)**0.5 # find the magnitude of the perpVect
+ perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)} # divide the perpVect by the magnitude to make it a unit vector
perpVect = {x: -perpVect.y, y: perpVect.x} # swap the x and y and multiply by -1 to make the vector perpendicular
args.state.display_value = perpVect
if perpVect.y > 0 #ensure perpVect points upward
@@ -130,12 +130,12 @@ class Peg
}
yInterc = pointA.y + -slope*pointA.x
- if slope == INFINITY # the perpVect presently either points in the correct dirrection or it is 180 degrees off we need to correct this
+ if slope == INFINITY # the perpVect presently either points in the correct direction or it is 180 degrees off we need to correct this
if previousPosition.x < pointA.x
perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
yInterc = -INFINITY
end
- elsif previousPosition.y < slope*previousPosition.x + yInterc # check if ball is bellow or above the collider to determine if perpVect is - or +
+ elsif previousPosition.y < slope*previousPosition.x + yInterc # check if ball is below or above the collider to determine if perpVect is - or +
perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
end
@@ -148,7 +148,7 @@ class Peg
fbx = velocityMag * Math.cos(theta_ball) #the x component of the ball's velocity
fby = velocityMag * Math.sin(theta_ball) #the y component of the ball's velocity
- repelMag = getRepelMagnitude( # the magniude of the collision vector
+ repelMag = getRepelMagnitude( # the magnitude of the collision vector
args,
fbx,
fby,
@@ -173,7 +173,7 @@ class Peg
if args.state.ball.center.y > @center.y # if the ball is above the middle of the peg we need to temporarily ignore some of the gravity
args.state.ball.velocity.y = ynew + GRAVITY * 0.01
else
- args.state.ball.velocity.y = ynew - GRAVITY * 0.01 # if the ball is bellow the middle of the peg we need to temporarily increase the power of the gravity
+ args.state.ball.velocity.y = ynew - GRAVITY * 0.01 # if the ball is below the middle of the peg we need to temporarily increase the power of the gravity
end
args.state.ball.center.x+= args.state.ball.velocity.x # update the position of the ball so it never looks like the ball is intersecting the circle
diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb
index 9cb1954..0b302f3 100644
--- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb
+++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb
@@ -42,7 +42,7 @@ class Vector2d
Vector2d.new(@x/mag, @y/mag)
end
- #TODO delet?
+ #TODO delete?
def distABS vect
(((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()
end
diff --git a/samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb b/samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb
index 9571669..679f3a4 100644
--- a/samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb
+++ b/samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb
@@ -82,7 +82,7 @@ class LinearCollider
#if at least on point is in the rectangle then collision? is true - otherwise false
for point in points
#Check whether a given point lies inside a rectangle or not:
- #if the sum of the area of traingls, PAB, PBC, PCD, PAD equal the area of the rec, then an intersection has occured
+ #if the sum of the area of traingls, PAB, PBC, PCD, PAD equal the area of the rec, then an intersection has occurred
areaRec = triArea.call(rpointA, rpointB, rpointC)+triArea.call(rpointA, rpointC, rpointD)
areaSum = [
triArea.call(point, rpointA, rpointB),triArea.call(point, rpointB, rpointC),
@@ -148,7 +148,7 @@ class LinearCollider
perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
yInterc = -INFINITY
end
- elsif previousPosition.y < slope*previousPosition.x + yInterc #check if ball is bellow or above the collider to determine if perpVect is - or +
+ elsif previousPosition.y < slope*previousPosition.x + yInterc #check if ball is below or above the collider to determine if perpVect is - or +
perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
end
diff --git a/samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb b/samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb
index b2905fb..228eb9d 100644
--- a/samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb
+++ b/samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb
@@ -29,7 +29,7 @@ end
begin :default_methods
def init_blocks args
block_size = args.state.board_width / 8
- #Space inbetween each block
+ #Space in between each block
block_offset = 4
args.state.squares ||=[
diff --git a/samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb b/samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb
index 9cb1954..0b302f3 100644
--- a/samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb
+++ b/samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb
@@ -42,7 +42,7 @@ class Vector2d
Vector2d.new(@x/mag, @y/mag)
end
- #TODO delet?
+ #TODO delete?
def distABS vect
(((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()
end
diff --git a/samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb b/samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb
index 69ada5b..0a20583 100644
--- a/samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb
+++ b/samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb
@@ -1,4 +1,4 @@
-#The LinearCollider (theoretically) produces collisions upon a line segment defined point.y two x,y cordinates
+#The LinearCollider (theoretically) produces collisions upon a line segment defined point.y two x,y coordinates
class LinearCollider
@@ -6,13 +6,13 @@ class LinearCollider
#last [Array of length 2] end of the line segment as a x,y cordinate
#inorder for the LinearCollider to be functional the line segment must be said to have a thickness
- #(as it is unlikly that a colliding object will land exactly on the linesegment)
+ #(as it is unlikely that a colliding object will land exactly on the linesegment)
#extension defines if the line's thickness extends negatively or positively
#extension :pos extends positively
#extension :neg extends negatively
- #thickness [float] how thick the line should be (should always be atleast as large as the magnitude of the colliding object)
+ #thickness [float] how thick the line should be (should always be at least as large as the magnitude of the colliding object)
def initialize (pointA, pointB, extension=:neg, thickness=10)
@pointA = pointA
@pointB = pointB
diff --git a/samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb b/samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb
index 97cf286..37ea141 100644
--- a/samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb
+++ b/samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb
@@ -43,7 +43,7 @@ class Vector2d
Vector2d.new(@x/mag, @y/mag)
end
- #TODO delet?
+ #TODO delete?
def distABS vect
(((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()
end
diff --git a/samples/05_mouse/01_mouse_click/app/main.rb b/samples/05_mouse/01_mouse_click/app/main.rb
index c1a6e29..80b91df 100644
--- a/samples/05_mouse/01_mouse_click/app/main.rb
+++ b/samples/05_mouse/01_mouse_click/app/main.rb
@@ -120,7 +120,7 @@ class TicTacToe
space.piece = state.current_turn
# This ternary operator statement allows us to change the current player's turn.
- # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it become's x's turn.
+ # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it becomes x's turn.
state.current_turn = state.current_turn == :x ? :o : :x
end
diff --git a/samples/05_mouse/02_mouse_move/app/main.rb b/samples/05_mouse/02_mouse_move/app/main.rb
index b015277..684928b 100644
--- a/samples/05_mouse/02_mouse_move/app/main.rb
+++ b/samples/05_mouse/02_mouse_move/app/main.rb
@@ -198,13 +198,13 @@ class ProtectThePuppiesFromTheZombies
state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection
state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies
- if killed_this_frame.length > 0 # if atleast one zombie was killed in the frame
+ if killed_this_frame.length > 0 # if at least one zombie was killed in the frame
state.flash_at = state.tick_count # flash_at set to the frame when the zombie was killed
# Don't forget, the rendered flash lasts for 10 frames after the zombie is killed (look at render_flash method)
end
# Sets the tick_count (passage of time) as the value of the death_at variable for each killed zombie.
- # Death_at stores the frame a zombie was killed.
+ # Death_at stores the frame where a zombie was killed.
killed_this_frame.each do |z|
z.death_at = state.tick_count
end
diff --git a/samples/05_mouse/03_mouse_move_paint_app/app/main.rb b/samples/05_mouse/03_mouse_move_paint_app/app/main.rb
index b177fd6..be983a8 100644
--- a/samples/05_mouse/03_mouse_move_paint_app/app/main.rb
+++ b/samples/05_mouse/03_mouse_move_paint_app/app/main.rb
@@ -40,7 +40,7 @@
=end
# This sample app shows an empty grid that the user can paint on.
-# To paint, the user must keep their mouse presssed and drag it around the grid.
+# To paint, the user must keep their mouse pressed and drag it around the grid.
# The "clear" button allows users to clear the grid so they can start over.
class PaintApp
diff --git a/samples/06_save_load/01_save_load_game/app/main.rb b/samples/06_save_load/01_save_load_game/app/main.rb
index cc52770..2d2bc41 100644
--- a/samples/06_save_load/01_save_load_game/app/main.rb
+++ b/samples/06_save_load/01_save_load_game/app/main.rb
@@ -48,7 +48,7 @@
class TextedBasedGame
- # Contains methods needed for game to run properly.
+ # Contains methods needed for the game to run properly.
# Increments tick count by 1 each time it runs (60 times in a single second)
def tick
default
@@ -59,7 +59,7 @@ class TextedBasedGame
# Sets default values.
# The ||= ensures that a variable's value is only set to the value following the = sign
- # if the value has not already been set before. Intialization happens only in the first frame.
+ # if the value has not already been set before. Initialization happens only in the first frame.
def default
state.engine_tick_count ||= 0
state.active_module ||= :room
@@ -286,7 +286,7 @@ class TextedBasedGamePresenter
end
# instructions for users on how to add the missing method_to_call to the code
- puts "It looks like #{method_to_call} doesn't exists on TextedBasedGamePresenter. Please add this method:"
+ puts "It looks like #{method_to_call} doesn't exist on TextedBasedGamePresenter. Please add this method:"
puts "Just copy the code below and put it in the #{TextedBasedGamePresenter} class definition."
puts ""
puts "```"
@@ -345,7 +345,7 @@ class TextedBasedGamePresenter
@game
end
- # Initalizes the game and creates an empty list of buttons.
+ # Initializes the game and creates an empty list of buttons.
def initialize
@game = TextedBasedGame.new self
@button_list ||= {}
diff --git a/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb b/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb
index 5c38d6c..0dd6c18 100644
--- a/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb
+++ b/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb
@@ -25,7 +25,7 @@
would print "How are you, Ruby?" to the console.
(Remember, string interpolation only works with double quotes!)
- - Ternary operator (?): Similar to if statement; first evalulates whether a statement is
+ - Ternary operator (?): Similar to if statement; first evaluates whether a statement is
true or false, and then executes a command depending on that result.
For example, if we had a variable
grade = 75
@@ -39,7 +39,7 @@
720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720).
- Numeric#shift_(left|right|up|down): Shifts the Numeric in the correct direction
- by adding or subracting.
+ by adding or subtracting.
- ARRAY#inside_rect?: An array with at least two values is considered a point. An array
with at least four values is considered a rect. The inside_rect? function returns true
diff --git a/samples/09_performance/02_sprites_as_entities/app/main.rb b/samples/09_performance/02_sprites_as_entities/app/main.rb
index 21babda..203dbe0 100644
--- a/samples/09_performance/02_sprites_as_entities/app/main.rb
+++ b/samples/09_performance/02_sprites_as_entities/app/main.rb
@@ -1,5 +1,5 @@
# Sprites represented as Entities using the queue ~args.outputs.sprites~
-# yields nicer access apis over Hashes, but require a bit more code upfront.
+# yields nicer access apis over Hashes, but requires a bit more code upfront.
# The hash sample has to use star[:s] to get the speed of the star, but
# an entity can use .s instead.
def random_x args
diff --git a/samples/09_performance/04_sprites_as_classes/app/main.rb b/samples/09_performance/04_sprites_as_classes/app/main.rb
index 2b43a98..d69dc66 100644
--- a/samples/09_performance/04_sprites_as_classes/app/main.rb
+++ b/samples/09_performance/04_sprites_as_classes/app/main.rb
@@ -22,7 +22,7 @@ class Star
end
end
-# calls methods needed for game to run properly
+# calls methods needed for the game to run properly
def tick args
# sets console command when sample app initially opens
if Kernel.global_tick_count == 0
diff --git a/samples/09_performance/05_static_sprites_as_classes/app/main.rb b/samples/09_performance/05_static_sprites_as_classes/app/main.rb
index cbfe00a..f87b110 100644
--- a/samples/09_performance/05_static_sprites_as_classes/app/main.rb
+++ b/samples/09_performance/05_static_sprites_as_classes/app/main.rb
@@ -23,7 +23,7 @@ class Star
end
end
-# calls methods needed for game to run properly
+# calls methods needed for the game to run properly
def tick args
# sets console command when sample app initially opens
if Kernel.global_tick_count == 0
diff --git a/samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb b/samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb
index 4d8719d..31f5c9f 100644
--- a/samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb
+++ b/samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb
@@ -47,7 +47,7 @@ class Star
end
end
-# calls methods needed for game to run properly
+# calls methods needed for the game to run properly
def tick args
# sets console command when sample app initially opens
if Kernel.global_tick_count == 0
diff --git a/samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb b/samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb
index 7f98509..c8e1633 100644
--- a/samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb
+++ b/samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb
@@ -251,7 +251,7 @@ class BreadthFirstSearch
outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line
# The circle needs to be offset so that the center of the circle
# overlaps the line instead of the upper right corner of the circle
- # The circle's x value is also moved based on the current seach step
+ # The circle's x value is also moved based on the current search step
circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing)
circle_y = (slider.y - slider.offset)
circle_rect = [circle_x, circle_y, 37, 37]
diff --git a/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb b/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb
index 810ff7b..d4c9c1c 100644
--- a/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb
+++ b/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb
@@ -168,7 +168,7 @@ class DetailedBreadthFirstSearch
outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line
# The circle needs to be offset so that the center of the circle
# overlaps the line instead of the upper right corner of the circle
- # The circle's x value is also moved based on the current seach step
+ # The circle's x value is also moved based on the current search step
circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing)
circle_y = (slider.y - slider.offset)
circle_rect = [circle_x, circle_y, 37, 37]
diff --git a/samples/13_path_finding_algorithms/06_heuristic/app/main.rb b/samples/13_path_finding_algorithms/06_heuristic/app/main.rb
index af466a5..10beba3 100644
--- a/samples/13_path_finding_algorithms/06_heuristic/app/main.rb
+++ b/samples/13_path_finding_algorithms/06_heuristic/app/main.rb
@@ -242,7 +242,7 @@ class Heuristic_With_Walls
outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line
# The circle needs to be offset so that the center of the circle
# overlaps the line instead of the upper right corner of the circle
- # The circle's x value is also moved based on the current seach step
+ # The circle's x value is also moved based on the current search step
circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing)
circle_y = (slider.y - slider.offset)
circle_rect = [circle_x, circle_y, 37, 37]
diff --git a/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb b/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb
index 5fc0804..7b8f653 100644
--- a/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb
+++ b/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb
@@ -275,7 +275,7 @@ class Heuristic
outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line
# The circle needs to be offset so that the center of the circle
# overlaps the line instead of the upper right corner of the circle
- # The circle's x value is also moved based on the current seach step
+ # The circle's x value is also moved based on the current search step
circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing)
circle_y = (slider.y - slider.offset)
circle_rect = [circle_x, circle_y, 37, 37]
diff --git a/samples/99_genre_arcade/snakemoji/app/main.rb b/samples/99_genre_arcade/snakemoji/app/main.rb
index 3bffa22..648b728 100644
--- a/samples/99_genre_arcade/snakemoji/app/main.rb
+++ b/samples/99_genre_arcade/snakemoji/app/main.rb
@@ -10,8 +10,8 @@
# https://gist.github.com/scorp200
#############LICENSE############
# Feel free to use this anywhere and however you want
-# You can sell this to EA for $1,000,000 if you want, its completely free.
-# Just rememeber you are helping this... thing... to spread...
+# You can sell this to EA for $1,000,000 if you want, it's completely free.
+# Just remember you are helping this... thing... to spread...
# ALSO! I am not liable for any mental, physical or financial damage caused.
#############LICENSE############
@@ -156,7 +156,7 @@ def defaults 🎮
🎮.🐍 ||= []
#Direction the head moves to
🎮.🚗 ||= [0, 0]
- #Next_Direction, during input check only change this variable and then when game updates asign this to Direction
+ #Next_Direction, during input check only change this variable and then when game updates assign this to Direction
🎮.🚦 ||= [*🎮.🚗]
#Your score
🎮.💰 ||= 0
diff --git a/samples/99_genre_arcade/twinstick/app/main.rb b/samples/99_genre_arcade/twinstick/app/main.rb
index 4edef92..2ce1d50 100644
--- a/samples/99_genre_arcade/twinstick/app/main.rb
+++ b/samples/99_genre_arcade/twinstick/app/main.rb
@@ -64,7 +64,7 @@ def move_enemies args
theta = Math.atan2(enemy.y - args.state.player.y, enemy.x - args.state.player.x)
# Convert the angle to a vector pointing at the player
dx, dy = theta.to_degrees.vector 5
- # Move the enemy towards thr player
+ # Move the enemy towards the player
enemy.x -= dx
enemy.y -= dy
end
diff --git a/samples/99_genre_crafting/craft_game_starting_point/app/main.rb b/samples/99_genre_crafting/craft_game_starting_point/app/main.rb
index d7478e4..549e73d 100644
--- a/samples/99_genre_crafting/craft_game_starting_point/app/main.rb
+++ b/samples/99_genre_crafting/craft_game_starting_point/app/main.rb
@@ -1,13 +1,13 @@
# ==================================================
# A NOTE TO JAM CRAFT PARTICIPANTS:
-# The comments and code in here are just as small piece of DragonRuby's capabilities.
+# The comments and code in here are just a small piece of DragonRuby's capabilities.
# Be sure to check out the rest of the sample apps. Start with README.txt and go from there!
# ==================================================
# def tick args is the entry point into your game. This function is called at
# a fixed update time of 60hz (60 fps).
def tick args
- # The defaults function intitializes the game.
+ # The defaults function initializes the game.
defaults args
# After the game is initialized, render it.
@@ -38,7 +38,7 @@ def defaults args
# Bottom left is 0, 0. Top right is 1280, 720.
# The inventory area is at the top of the screen
# the number 80 is the size of all the sprites, so that is what is being
- # used to decide the with and height
+ # used to decide the width and height
args.state.sprite_size = 80
args.state.inventory_border.w = args.state.sprite_size * 10
@@ -49,7 +49,7 @@ def defaults args
# define the borders for where the crafting area is located
# the crafting area is below the inventory area
# the number 80 is the size of all the sprites, so that is what is being
- # used to decide the with and height
+ # used to decide the width and height
args.state.craft_border.x = 10
args.state.craft_border.y = 220
args.state.craft_border.w = args.state.sprite_size * 3
@@ -92,12 +92,12 @@ def defaults args
},
]
- # after initializing the oridinal positions, derive the pixel
+ # after initializing the ordinal positions, derive the pixel
# locations assuming that the width and height are 80
args.state.items.each { |item| set_inventory_position args, item }
end
- # define all the oridinal positions of the inventory slots
+ # define all the ordinal positions of the inventory slots
if !args.state.inventory_area
args.state.inventory_area = [
{ ordinal_x: 0, ordinal_y: 0 },
@@ -132,7 +132,7 @@ def defaults args
{ ordinal_x: 9, ordinal_y: 2 },
]
- # after initializing the oridinal positions, derive the pixel
+ # after initializing the ordinal positions, derive the pixel
# locations assuming that the width and height are 80
args.state.inventory_area.each { |i| set_inventory_position args, i }
@@ -144,7 +144,7 @@ def defaults args
# To bring up DragonRuby's Console, press the ~ key within the game.
end
- # define all the oridinal positions of the craft slots
+ # define all the ordinal positions of the craft slots
if !args.state.craft_area
args.state.craft_area = [
{ ordinal_x: 0, ordinal_y: 0 },
@@ -158,7 +158,7 @@ def defaults args
{ ordinal_x: 2, ordinal_y: 2 },
]
- # after initializing the oridinal positions, derive the pixel
+ # after initializing the ordinal positions, derive the pixel
# locations assuming that the width and height are 80
args.state.craft_area.each { |c| set_craft_position args, c }
end
@@ -244,7 +244,7 @@ def input args
found[:location] = :held
end
- # if the mouse is clicked and an item is currently beign held....
+ # if the mouse is clicked and an item is currently being held....
elsif args.state.held_item
# determine if a slot within the craft area was clicked
craft_area = args.state.craft_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }
@@ -255,7 +255,7 @@ def input args
# if the click was within a craft area
if craft_area
# check to see if an item is already there and ignore the click if an item is found
- # item_at_craft_slot is a helper method that returns an item or nil for a given oridinal
+ # item_at_craft_slot is a helper method that returns an item or nil for a given ordinal
# position
item_already_there = item_at_craft_slot args, craft_area[:ordinal_x], craft_area[:ordinal_y]
@@ -263,8 +263,8 @@ def input args
if !item_already_there
# if the quantity they are currently holding is greater than 1
if args.state.held_item[:quantity] > 1
- # remove one item (creating a seperate item of the same type), and place it
- # at the oridinal position and location of the craft area
+ # remove one item (creating a separate item of the same type), and place it
+ # at the ordinal position and location of the craft area
# the .merge method on Hash creates a new Hash, but updates any values
# passed as arguments to merge
new_item = args.state.held_item.merge(quantity: 1,
@@ -272,7 +272,7 @@ def input args
ordinal_x: craft_area[:ordinal_x],
ordinal_y: craft_area[:ordinal_y])
- # after the item is crated, place it into the args.state.items collection
+ # after the item is created, place it into the args.state.items collection
args.state.items << new_item
# then subtract one from the held item
@@ -281,7 +281,7 @@ def input args
# if the craft area is available and there is only one item being held
elsif args.state.held_item[:quantity] == 1
# instead of creating any new items just set the location of the held item
- # to the oridinal position of the craft area, and then nil out the
+ # to the ordinal position of the craft area, and then nil out the
# held item state so that a new item can be picked up
args.state.held_item[:location] = :craft
args.state.held_item[:ordinal_x] = craft_area[:ordinal_x]
@@ -326,7 +326,7 @@ end
def calc args
# make sure that the real position of the inventory
# items are updated every frame to ensure that they
- # are placed correctly given their location and oridinal positions
+ # are placed correctly given their location and ordinal positions
# instead of using .map, here we use .each (since we are not returning a new item and just updating the items in place)
args.state.items.each do |item|
# based on the location of the item, invoke the correct pixel conversion method
diff --git a/samples/99_genre_lowrez/nokia_3310/app/main.rb b/samples/99_genre_lowrez/nokia_3310/app/main.rb
index d275ada..683539e 100644
--- a/samples/99_genre_lowrez/nokia_3310/app/main.rb
+++ b/samples/99_genre_lowrez/nokia_3310/app/main.rb
@@ -67,7 +67,7 @@ def tick args
# =======================================================================
- # ==== HOW TO ANIMATE A SPRITE (SEPERATE PNGS) ==========================
+ # ==== HOW TO ANIMATE A SPRITE (SEPARATE PNGS) ==========================
# =======================================================================
# Remove the "#" at the beginning of the line below
# how_to_animate_a_sprite args
@@ -248,7 +248,7 @@ def how_to_render_sprites args
end
# =============================================================================
-# ==== HOW TO ANIMATE A SPRITE (SEPERATE PNGS) ==========================
+# ==== HOW TO ANIMATE A SPRITE (SEPARATE PNGS) ==========================
# =============================================================================
def how_to_animate_a_sprite args
# STEP 1: Define when you want the animation to start. The animation in this case will start in 3 seconds
@@ -472,7 +472,7 @@ def how_to_determine_collision args
text: "Collision!",
alignment_enum: 1)
else
- # if collision occurred, render the words no collision.
+ # if no collision occurred, render the words no collision.
args.nokia.labels << args.nokia
.default_label
.merge(x: 42,
diff --git a/samples/99_genre_lowrez/resolution_64x64/app/main.rb b/samples/99_genre_lowrez/resolution_64x64/app/main.rb
index a30d75a..9208120 100644
--- a/samples/99_genre_lowrez/resolution_64x64/app/main.rb
+++ b/samples/99_genre_lowrez/resolution_64x64/app/main.rb
@@ -62,7 +62,7 @@ def tick args
# =======================================================================
- # ==== HOW TO ANIMATE A SPRITE (SEPERATE PNGS) ==========================
+ # ==== HOW TO ANIMATE A SPRITE (SEPARATE PNGS) ==========================
# Remove the "#" at the beginning of the line below
# how_to_animate_a_sprite args
# =======================================================================
@@ -242,7 +242,7 @@ def how_to_render_sprites args
end
## # =============================================================================
-## # ==== HOW TO ANIMATE A SPRITE (SEPERATE PNGS) ==========================
+## # ==== HOW TO ANIMATE A SPRITE (SEPARATE PNGS) ==========================
## # =============================================================================
def how_to_animate_a_sprite args
# STEP 1: Define when you want the animation to start. The animation in this case will start in 3 seconds
@@ -462,7 +462,7 @@ def how_to_determine_collision args
text: "Collision!",
alignment_enum: 1)
else
- # if collision occurred, render the words no collision.
+ # if no collision occurred, render the words no collision.
args.lowrez.labels << args.lowrez
.default_label
.merge(x: 31,
diff --git a/samples/99_genre_platformer/clepto_frog/app/main.rb b/samples/99_genre_platformer/clepto_frog/app/main.rb
index a4eb069..e1ddffb 100644
--- a/samples/99_genre_platformer/clepto_frog/app/main.rb
+++ b/samples/99_genre_platformer/clepto_frog/app/main.rb
@@ -485,7 +485,7 @@ class CleptoFrog
return if state.world_lookup.keys.length > 0
return unless state.world.length > 0
- # Searches through the world and finds the cordinates that exist
+ # Searches through the world and finds the coordinates that exist
state.world_lookup = {}
state.world.each do |x, y, w, h|
state.world_lookup[[x, y, w || state.tile_size, h || state.tile_size]] = true
diff --git a/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb b/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb
index 2921076..0d23668 100644
--- a/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb
+++ b/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb
@@ -1,5 +1,5 @@
# Hey there! Welcome to Four Decisions. Here is how you
-# create your decision tree. Remove =being and =end from the text to
+# create your decision tree. Remove =begin and =end from the text to
# enable the game (just save the file). Change stuff and see what happens!
def game
diff --git a/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb b/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb
index 9da0f38..953b121 100644
--- a/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb
+++ b/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb
@@ -53,7 +53,7 @@ def tick args
end
end
-# Runs methods needed for game to function properly
+# Runs methods needed for the game to function properly
# Creates a rectangular border around the screen
def tick_game args
defaults args
diff --git a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb
index bd5f521..15a381b 100644
--- a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb
+++ b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb
@@ -14,7 +14,7 @@ def tick_game args
# set up your game
# initialize the game/game defaults. ||= means that you only initialize it if
- # the value isn't alread initialized
+ # the value isn't already initialized
args.state.player.x ||= 0
args.state.player.y ||= 0
diff --git a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb
index f129e25..579e133 100644
--- a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb
+++ b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb
@@ -97,7 +97,7 @@ def tile_extended x, y, w, h, r, g, b, a, tile_row_column_or_key
if !row
member_name = member_name_as_code tile_row_column_or_key
- raise "Unabled to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb."
+ raise "Unable to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb."
end
# Sprite provided by Rogue Yun
diff --git a/samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb b/samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb
index 66ff027..c2c364b 100644
--- a/samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb
+++ b/samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb
@@ -339,7 +339,7 @@ class Game
state.enemies.find { |e| e.x == x && e.y == y && !e.is_dead }
end
- #M oves the user based on their keyboard input and sets values for target cell
+ # Moves the user based on their keyboard input and sets values for target cell
def input_target_cell
if inputs.keyboard.key_down.up # if "up" key is in "down" state
[state.x, state.y + 1, 0, 1] # user moves up
diff --git a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb
index bd5f521..15a381b 100644
--- a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb
+++ b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb
@@ -14,7 +14,7 @@ def tick_game args
# set up your game
# initialize the game/game defaults. ||= means that you only initialize it if
- # the value isn't alread initialized
+ # the value isn't already initialized
args.state.player.x ||= 0
args.state.player.y ||= 0
diff --git a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb
index f129e25..579e133 100644
--- a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb
+++ b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb
@@ -97,7 +97,7 @@ def tile_extended x, y, w, h, r, g, b, a, tile_row_column_or_key
if !row
member_name = member_name_as_code tile_row_column_or_key
- raise "Unabled to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb."
+ raise "Unable to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb."
end
# Sprite provided by Rogue Yun
diff --git a/samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb b/samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb
index 7ed8d60..bc4d7fd 100644
--- a/samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb
+++ b/samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb
@@ -338,7 +338,7 @@ class Game
state.enemies.find { |e| e.x == x && e.y == y && !e.is_dead }
end
- #M oves the user based on their keyboard input and sets values for target cell
+ # Moves the user based on their keyboard input and sets values for target cell
def input_target_cell
if inputs.keyboard.key_down.up # if "up" key is in "down" state
[state.x, state.y + 1, 0, 1] # user moves up
diff --git a/samples/99_genre_rpg_tactical/isometric_grid/app/main.rb b/samples/99_genre_rpg_tactical/isometric_grid/app/main.rb
index 28bea32..6c8368d 100644
--- a/samples/99_genre_rpg_tactical/isometric_grid/app/main.rb
+++ b/samples/99_genre_rpg_tactical/isometric_grid/app/main.rb
@@ -10,10 +10,10 @@ class Isometric
def defaults
state.quantity ||= 6 #Size of grid
- state.tileSize ||= [262 / 2, 194 / 2] #width and heigth of orange tiles
+ state.tileSize ||= [262 / 2, 194 / 2] #width and height of orange tiles
state.tileGrid ||= [] #Holds ordering of tiles
state.currentSpriteLocation ||= -1 #Current Sprite hovering location
- state.tileCords ||= [] #Physical, rendering cordinates
+ state.tileCords ||= [] #Physical, rendering coordinates
state.initCords ||= [640 - (state.quantity / 2 * state.tileSize[0]), 330] #Location of tile (0, 0)
state.sideSize ||= [state.tileSize[0] / 2, 242 / 2] #Purple & green cube face size
state.mode ||= :delete #Switches between :delete and :insert
@@ -50,7 +50,7 @@ class Isometric
end
end
- #Calculates physical cordinates for tiles
+ #Calculates physical coordinates for tiles
if state.tileCords == []
state.tileCords = state.tileGrid.map do
|val|
@@ -101,7 +101,7 @@ class Isometric
#Shows the tile itself. Important that it's rendered after the two above!
outputs.sprites << state.tileCords.map do
|val|
- if val[2] == true #Chcekcs if tile needs to be rendered
+ if val[2] == true #Checks if tile needs to be rendered
if val[5] == state.currentSpriteLocation
[val[0], val[1], state.tileSize[0], state.tileSize[1], 'sprites/selectedTile.png']
else