1
0
mirror of https://github.com/JohnBreaux/Boat-Battle.git synced 2025-02-04 12:28:35 +00:00

Game logic (#14)

* Create game classes

* Pushing what I've done of the game logic.

* Commented my code

Deals with ship placement on board and ship rotation on board

* Comment game logic code, and edit for style.

* Added Clear board button and Confirm Placement button

* Fix up some stuff

* Pass

* I accidentally the buttons + Fix some hitbox mistakes.

* Improve hitbox leniency, and don't allow ships to rotate into each other.

* Fixed Dialog Box that pops up for Confirm Placement

* Update Gameplay.tscn

* Partial fire functionality added.

Currently hides all ship placement UI and makes visible all fire functionality. The crosshair currently does not snap to a grid. The ships are saved in an area of location objects holding the length, orientation, and coordinates of the ship.

* Crosshair now snaps into place

* Created Sprites for 2Ship and 3ShipA

* Created Sprite for Ship3B

* Created Sprite for Ship4

* Created Sprite for Ship5

* Created Sprite for "Hit"

* Created Sprites for Ship2 Destroyed and Ship3A Destroyed

* Created Sprite for Ship3B Destroyed

* Created Sprite for Ship4 Destroyed

* Created Sprite for Ship5 Destroyed

* Created Sprite for "Miss"

* Fixed blurry pixel art

Changed texture rendering

* Added temporary title screen text

* Major restructuring to better support object-oriented design of the main game logic and UI. This was necessary, I swear.

* Accidentally offset the Setup menu by a handful of pixels. Whoops.

* Setup: remove unused signal

* Comment on which parts of Game are only there for testing purposes.

* Fixed up the Title Screen text

imported font

* Fixed Crosshair pixel rendering

* Consolidate backgrounds

* Added more SFX sounds

* Created Sprite for Light Mode

* Fix null deref when entering singleplayer after exiting multiplayer

* Hien's work

* Revert "Hien's work"

This reverts commit f099ed6c80.

* Stuff

* Make git happy by pushing gdengine imports

* Put Background in main

* Removed option background

* Added Confirmation Dialog for Forfeit

* Revert "Merge branch 'game-logic' of https://github.com/StatewideInk/Group12 into game-logic"

This reverts commit 104ffaab0a, reversing
changes made to 63dec75688.

* Fix title screen never going (whoops

* Oops I made the background invisible

* removed option background again

* Added dark/light mode functionality

* Added signal for audio SFX

* Load the theme on startup

* Added Confirmation dialog for Forfeit

* Fixed Texture Rendering for Light Mode Background

* Sounds no longer scale linearly

* Remove unused resourse main.tres

* Added victory screen

Added a victory screen. Since there is no current way to win, there is a 'win' button added to the top left of the game screen. Once clicked, victory text will appear and the player will be given the option to return to the main menu.

* restart button is invisible

Co-authored-by: John Breaux <JohnBreaux@my.unt.edu>
Co-authored-by: JohnBreaux <89870642+JohnBreaux@users.noreply.github.com>
Co-authored-by: hpham474 <HienPham@my.unt.edu>
Co-authored-by: Chance Atkinson <chancewatkinson@gmail.com>
This commit is contained in:
tommy-l-ngo
2021-11-14 00:43:05 -06:00
committed by GitHub
parent 99bb051920
commit 06b8711a08
134 changed files with 1355 additions and 1607 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/2longShipS.png-801d61680041dba5398a94c57d0e9262.stex"
path="res://.import/2Ship.png-f56f600f71c287a0900c4554ec6e9837.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/2longShipS.png"
dest_files=[ "res://.import/2longShipS.png-801d61680041dba5398a94c57d0e9262.stex" ]
source_file="res://assets/game/2Ship.png"
dest_files=[ "res://.import/2Ship.png-f56f600f71c287a0900c4554ec6e9837.stex" ]
[params]
@@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
@@ -30,5 +30,5 @@ process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/2Ship_Destroyed.png-3b174719764d2b2b3ae9a0fec7d0ff67.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/2Ship_Destroyed.png"
dest_files=[ "res://.import/2Ship_Destroyed.png-3b174719764d2b2b3ae9a0fec7d0ff67.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/4longShipS.png-8dc80f51885d7a7242ed523ee285aaa0.stex"
path="res://.import/3ShipA.png-1fe0003af4adcd83b8c94b2b9d6e5b6d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/4longShipS.png"
dest_files=[ "res://.import/4longShipS.png-8dc80f51885d7a7242ed523ee285aaa0.stex" ]
source_file="res://assets/game/3ShipA.png"
dest_files=[ "res://.import/3ShipA.png-1fe0003af4adcd83b8c94b2b9d6e5b6d.stex" ]
[params]
@@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
@@ -30,5 +30,5 @@ process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/3ShipA_Destroyed.png-95908b7b74da915910232dfaef45af1c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/3ShipA_Destroyed.png"
dest_files=[ "res://.import/3ShipA_Destroyed.png-95908b7b74da915910232dfaef45af1c.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/3longShipAS.png-c88b2d866e65fe50f618c22da6c0a5d4.stex"
path="res://.import/3ShipB.png-28ed039caa6839d715648812af8f65e4.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/3longShipAS.png"
dest_files=[ "res://.import/3longShipAS.png-c88b2d866e65fe50f618c22da6c0a5d4.stex" ]
source_file="res://assets/game/3ShipB.png"
dest_files=[ "res://.import/3ShipB.png-28ed039caa6839d715648812af8f65e4.stex" ]
[params]
@@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
@@ -30,5 +30,5 @@ process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/3ShipB_Destroyed.png-78d0de82a039cc20026f662e8052d260.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/3ShipB_Destroyed.png"
dest_files=[ "res://.import/3ShipB_Destroyed.png-78d0de82a039cc20026f662e8052d260.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/4Ship.png-1102455fdea5ccc9870ef475ee45f60a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/4Ship.png"
dest_files=[ "res://.import/4Ship.png-1102455fdea5ccc9870ef475ee45f60a.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/4Ship_Destroyed.png-acd8cae1448d0240f60f78c6681833bd.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/4Ship_Destroyed.png"
dest_files=[ "res://.import/4Ship_Destroyed.png-acd8cae1448d0240f60f78c6681833bd.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/5Ship.png-78bcea6c287110425f92a7d06eaf0b2b.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/5Ship.png"
dest_files=[ "res://.import/5Ship.png-78bcea6c287110425f92a7d06eaf0b2b.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/5Ship_Destroyed.png-26b685facbe48d12dffaa45c142d98de.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/5Ship_Destroyed.png"
dest_files=[ "res://.import/5Ship_Destroyed.png-26b685facbe48d12dffaa45c142d98de.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/5longShipS.png-9d546ec87dabd586e250ea5c5229aa8f.stex"
path="res://.import/Hit.png-87d7e3b710f3d0b308b047fd65cd9a0a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/5longShipS.png"
dest_files=[ "res://.import/5longShipS.png-9d546ec87dabd586e250ea5c5229aa8f.stex" ]
source_file="res://assets/game/Hit.png"
dest_files=[ "res://.import/Hit.png-87d7e3b710f3d0b308b047fd65cd9a0a.stex" ]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Miss.png-ddfb2f437f6e39c5895f51ba5ab8423e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/Miss.png"
dest_files=[ "res://.import/Miss.png-ddfb2f437f6e39c5895f51ba5ab8423e.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/3longShipBS.png-16d8048d7e635bcebbedc6038f4faaa5.stex"
path="res://.import/RedCrosshair.png-ed59a214d85db7c21233257c8daddbef.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/game/3longShipBS.png"
dest_files=[ "res://.import/3longShipBS.png-16d8048d7e635bcebbedc6038f4faaa5.stex" ]
source_file="res://assets/game/RedCrosshair.png"
dest_files=[ "res://.import/RedCrosshair.png-ed59a214d85db7c21233257c8daddbef.stex" ]
[params]
@@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
@@ -30,5 +30,5 @@ process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
detect_3d=false
svg/scale=1.0

View File

@@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
@@ -30,5 +30,5 @@ process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
detect_3d=false
svg/scale=1.0