Deprecated: Creation of dynamic property ET_Core_HTTPInterface::$expects_json is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/core/components/HTTPInterface.php on line 305

Deprecated: Creation of dynamic property ET_Core_HTTPInterface::$owner is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/core/components/HTTPInterface.php on line 307

Deprecated: Creation of dynamic property ET_Core_API_Spam_ReCaptcha::$data_utils is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/core/components/api/Service.php on line 244

Deprecated: Creation of dynamic property ET_Core_API_Spam_ReCaptcha::$API_KEY_REQUIRED is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/core/components/api/Service.php on line 247

Deprecated: Creation of dynamic property ET_Core_PageResource::$location is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/core/components/PageResource.php on line 306

Deprecated: Creation of dynamic property ET_Builder_Module_Field_BoxShadow::$template is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/field/BoxShadow.php on line 17

Deprecated: Creation of dynamic property ET_Core_PageResource::$location is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/core/components/PageResource.php on line 306

Deprecated: Creation of dynamic property ET_Builder_Section::$text_shadow is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Section::$margin_padding is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Section::$_additional_fields_options is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Row::$child_item_text is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Row::$text_shadow is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Row::$margin_padding is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Row::$_additional_fields_options is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Row_Inner::$child_item_text is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Row_Inner::$text_shadow is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Row_Inner::$margin_padding is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Row_Inner::$_additional_fields_options is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Column::$additional_shortcode_slugs is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Column::$advanced_setting_title_text is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Column::$text_shadow is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Column::$margin_padding is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Column::$_additional_fields_options is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property WPForms\Integrations\Divi\WPFormsSelector::$text_shadow is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property WPForms\Integrations\Divi\WPFormsSelector::$margin_padding is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property WPForms\Integrations\Divi\WPFormsSelector::$_additional_fields_options is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303
The Gun Game - Welcome
Deprecated: Creation of dynamic property ET_Core_PageResource::$location is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/core/components/PageResource.php on line 306

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 94

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 94

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 96

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 96

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 102

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 102

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 104

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 104

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 129

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 129

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 131

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 131

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 160

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 160

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 160

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 161

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 161

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 161

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 204

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 204

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 204

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 204

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 206

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 206

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/settings/migration/ColumnOptions.php on line 206

Deprecated: Creation of dynamic property ET_Builder_Module_Field_Border::$template is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/field/Border.php on line 48

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Field_Divider::$count is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/main-structure-elements.php on line 1181

Deprecated: Creation of dynamic property ET_Builder_Module_Fullwidth_Image::$fullwidth is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Fullwidth_Image::$defaults is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Fullwidth_Image::$text_shadow is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Fullwidth_Image::$margin_padding is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Fullwidth_Image::$_additional_fields_options is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Video::$text_shadow is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Video::$margin_padding is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Video::$_additional_fields_options is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Button::$text_shadow is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Button::$margin_padding is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Button::$_additional_fields_options is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/Background.php on line 169

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/Background.php on line 170

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Divider::$defaults is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Divider::$show_divider_options is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Divider::$text_shadow is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Divider::$margin_padding is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Divider::$_additional_fields_options is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Text::$text_shadow is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Text::$margin_padding is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Text::$_additional_fields_options is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Image::$text_shadow is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Image::$margin_padding is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Image::$_additional_fields_options is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1303

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

The Gun Game and how to play

For this project I chose to take a pantomime game I used to play when I was a kid and bring it to life through code and animation.

The Gun Game plays much like rock paper scissors but with some key differences. Each round you and a friend will decide simultaneously between three choices, reload, block, or shoot. Reload will give you one bullet. Shooting will remove one bullet, and blocking will protect you from an incomming bullet.

If both players shoot both lose a bullet and you move on to the next round. Both players will start with zero bullets and have a maximum of six bullets.  To win the game you must shoot your opponent while their reloading.

 

Student Work

Temple University

Instructor: Jenny Kowalski

Tools: JavaScript, HTML, CSS, Photoshop

The wild west theme was inspired by the way me and my friends would act when we played the game. We would hold our hands on our hip and draw our finger guns as if we were real cowboys shooting pistols. For that reason it only made sense to make the playable character a cowboy. The opponent is depicted as a robot because they are an NPC and their moves are entirely dictated by the code being run in the computer.

The aesthetics and animations were driven by an 8-bit style reminiscent of old arcade games. Theres a reason why this style was so common at one point and its because of how easy it is to code.

The Code

This was my first time coding in JavaScript so it is fair to say initially I didint know where to start. The functionality of the game was important to me because I really wanted it to feel like you were actually playing the game.

So to start out I made a chart that mapped out every input and possible outcome. That way I could reference the chart as I was trying different ideas and laying out the foundation making sure that every moving part was accounted for.

After the trial and error phase I found what worked best for processing the inputs and having them effect the outcome of the game were boolean variables. Booleans are a binary variable that basically tell if something is true or false when the code runs. The boolean would then be followed by a command which are known as If Then Statements. A simplified example of this would be, if (the cowboy chooses shoot) then (play the shoot animation). 

This process had a few extra steps for the robot because I had to have the script generate its inputs. I did that by using a random number generator that would determine its choice and then using more booleans to assign rules for specific situations so the robot would behave logically. This allowed for the opponent in the game to be unpredictable at times but also stop the AI from making decisions that wouldn’t make any sense, like shooting when they have no ammo. 

 


Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686

Deprecated: Creation of dynamic property ET_Builder_Module_Helper_MultiViewOptions::$inherited_props is deprecated in /home1/henryoat/public_html/wp-content/themes/Divi/includes/builder/module/helpers/MultiViewOptions.php on line 686