Lots of fixes. 2 BUGS FOUND (read)

Added white border to flag sprite.  Removed debug.log testing code. Fixed hat respawn bug. Positioned all flags/end zones in every map properly. Extensively tested each gamemode with 3 players and found 2 bugs I cannot seem to fix.

First bug I found is the Win Screen that displays during FreeForAll always only shows Player 1 as the winner, regardless of the actual winner. The Win Screen fails to update to the proper player and color after a player wins. This only happens while playing FreeForAll, on any map other than Clouds. The Clouds map, and every other gamemode and map combination works just fine.

The second bug I found could be considered a feature if we wanted. During a Keep Away game, when the Hat is inactive for too long, it appears to spaz over the screen for a second right before respawning. I'm not sure if this is an animation bug or a spawnpoint bug in the code.

Other than these two bugs, every map has been extensively tested and tweaked to work properly for every gamemode.
This commit is contained in:
djkellerman
2025-04-18 00:34:33 -04:00
parent c2463da317
commit 0838aebf89
10 changed files with 2274 additions and 1194 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -97,8 +97,9 @@ GameObject:
m_Component:
- component: {fileID: 3508504517010197326}
- component: {fileID: 2472279949341049392}
- component: {fileID: 1226630484593389857}
- component: {fileID: 7175913768620688938}
- component: {fileID: 1226630484593389857}
- component: {fileID: 2402318339000397793}
m_Layer: 0
m_Name: Obstacle Course End
m_TagString: Untagged
@@ -168,18 +169,6 @@ BoxCollider2D:
m_AutoTiling: 0
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!114 &1226630484593389857
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8429222029133414007}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 746e2bd0f68be467eb1b2b19c7c513af, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!50 &7175913768620688938
Rigidbody2D:
serializedVersion: 5
@@ -207,3 +196,27 @@ Rigidbody2D:
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!114 &1226630484593389857
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8429222029133414007}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 746e2bd0f68be467eb1b2b19c7c513af, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2402318339000397793
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8429222029133414007}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 69fc903d39ac3d24aab4ce7a68dba447, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@@ -1296,6 +1296,7 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects:
- {fileID: 4202937858078024592, guid: e3c570bb90d434e809aca2a339dadf5d, type: 3}
- {fileID: 5622895323547684385, guid: e3c570bb90d434e809aca2a339dadf5d, type: 3}
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 1757615392802054825, guid: e3c570bb90d434e809aca2a339dadf5d, type: 3}

View File

@@ -2744,11 +2744,11 @@ MonoBehaviour:
players\nKeep away map\n#Join screen titles\n#Implement music\n#Mountain music\n#Make
city playable\n#One way platform mountain\nLeaderboard scaling city obstacle
course\n#Get rid of placeholder start stop obstacle course\nPlatform friction\nFacing
angle not velocity-based\nDead player constant velocity\n\n*needs help* Respawn
after game over (ALL GAMEMODES)\n\nDylan will do:\n#Fix Time Left! text\n#Obstacle
course end only works on correct gamemode\n#Obstacle course end for mountain\n#Correct
angle not velocity-based\nDead player constant velocity\n\n#Respawn after game
over (ALL GAMEMODES)\n\nDylan will do:\n#Fix Time Left! text\n#Obstacle course
end only works on correct gamemode\n#Obstacle course end for mountain\n#Correct
time limits for keep away maps \n#Obstacle course flag\n#Health bar persists
after death\n\nCreate white border on hat sprite\n"
after death\n#Create white border on hat sprite\n"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}

View File

@@ -37,7 +37,7 @@ namespace Game
if (GameManager.Instance.gameOver) GetComponent<BoxCollider2D>().enabled = false;
if (isDropped && Time.time - lastInteractionTime > respawnTime)
{
RespawnHat();
StartCoroutine(RespawnHat());
}
}
@@ -45,6 +45,7 @@ namespace Game
{
if (collision.gameObject.CompareTag("Platformer Hazard"))
{
isDropped = true;
StartCoroutine(RespawnHat());
}
}

View File

@@ -21,7 +21,6 @@ public class RespawnOnTriggerEnter : MonoBehaviour
{
if (TryGetComponent(out Damageable damageable))
{
print("Voided out " + other.name);
damageable.Damage(9999f);
}
}

View File

@@ -23,10 +23,8 @@ public class WinScreen : MonoBehaviour
public void ShowWinScreen(int player)
{
Debug.Log($"ShowWinScreen called for Player {player}");
if (player - 1 < 0 || player - 1 >= GameManager.playerColors.Count)
{
Debug.LogError("Invalid player index or playerColors not initialized.");
return;
}
@@ -42,7 +40,6 @@ public class WinScreen : MonoBehaviour
Animator animator = GetComponent<Animator>();
if (animator == null)
{
Debug.LogError("Animator component missing on WinScreen.");
return;
}

View File

@@ -191,7 +191,7 @@ namespace Player
/// </summary>
public void HandleDeath()
{
print("Player " + gameObject.name + " died");
print("Player " + gameObject.name + " died");
GameManager.Instance.PlayerDied(this);
animator.SetBool("die", false);
dying = false;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -96,45 +96,6 @@ TextureImporter:
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: iOS
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
@@ -142,10 +103,10 @@ TextureImporter:
name: flag_0
rect:
serializedVersion: 2
x: 69
y: 22
width: 122
height: 208
x: 68
y: 20
width: 124
height: 212
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
@@ -173,8 +134,7 @@ TextureImporter:
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
flag_0: -5154189640090123692
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData: