Skip to content

Commit

Permalink
Finished Product
Browse files Browse the repository at this point in the history
- Multiple gamemodes added
- Base 50% rewritten.
  • Loading branch information
qalle-git committed Dec 22, 2020
1 parent 742a11f commit 9b9ecd1
Show file tree
Hide file tree
Showing 282 changed files with 55,052 additions and 565 deletions.
Binary file modified .vs/HonccaFest/v16/.suo
Binary file not shown.
Binary file modified .vs/HonccaFest/v16/Server/sqlite3/storage.ide
Binary file not shown.
46 changes: 24 additions & 22 deletions HonccaFest/Arcade/MonoArcade.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// MonoArcade.cs
// Version 1.00
// 2020-11-12
// MonoArcade.cs
// Version 1.01
// 2020-12-14
// Author Simon Grönberg
// LBS Kreativa Gymnasiet

Expand Down Expand Up @@ -40,6 +40,7 @@ public bool GetInputDown()
WasPressed = false;
return true;
}
WasPressed = false;
return false;

}
Expand All @@ -51,6 +52,7 @@ public bool GetInputUp()
WasReleased = false;
return true;
}
WasReleased = false;
return false;
}
public bool GetInputState()
Expand Down Expand Up @@ -85,7 +87,7 @@ int GetAxisValue()
protected override void Update()
{

if (GetAxisValue() * Sign > 0 && (!IsDown || DateTime.Now > PressedTime + TimeSpan.FromSeconds(0.5)))
if (GetAxisValue() * Sign > 0 && (!IsDown))
{
IsDown = true;
PressedTime = DateTime.Now;
Expand Down Expand Up @@ -118,7 +120,7 @@ public KeyButtonState(Keys buttonKey)
protected override void Update()
{

if (Keyboard.GetState().IsKeyDown(Key) && (!IsDown || DateTime.Now > PressedTime + TimeSpan.FromSeconds(0.5)))
if (Keyboard.GetState().IsKeyDown(Key) && (!IsDown))
{
IsDown = true;
PressedTime = DateTime.Now;
Expand Down Expand Up @@ -398,7 +400,6 @@ public static void ActivateDebug(bool player0, bool player1, bool player2, bool
player[1] = new ArcadePlayer(1, Keys.A, Keys.D, Keys.W, Keys.S, Keys.Q, Keys.E, Keys.Z, Keys.X, true);
player[2] = new ArcadePlayer(2, Keys.F, Keys.H, Keys.T, Keys.G, Keys.R, Keys.Y, Keys.V, Keys.B, true);
player[3] = new ArcadePlayer(3, Keys.J, Keys.L, Keys.I, Keys.K, Keys.U, Keys.O, Keys.M, Keys.N, true);

if (player0)
{
player[0].AddToGame();
Expand All @@ -415,7 +416,6 @@ public static void ActivateDebug(bool player0, bool player1, bool player2, bool
{
player[3].AddToGame();
}

Debug = true;
}
/// <summary>
Expand All @@ -432,10 +432,10 @@ public static bool IsDebugging()
static MonoArcade()
{
AppDomain.CurrentDomain.ProcessExit += Destructor;
player[0] = new ArcadePlayer(0, Keys.Left, Keys.Right, Keys.Up, Keys.Down, Keys.Enter, Keys.RightShift, Keys.RightControl, Keys.Back, true);
player[1] = new ArcadePlayer(1, Keys.A, Keys.D, Keys.W, Keys.S, Keys.Q, Keys.E, Keys.Z, Keys.X, true);
player[2] = new ArcadePlayer(2, Keys.F, Keys.H, Keys.T, Keys.G, Keys.R, Keys.Y, Keys.V, Keys.B, true);
player[3] = new ArcadePlayer(3, Keys.J, Keys.L, Keys.I, Keys.K, Keys.U, Keys.O, Keys.M, Keys.N, true);
player[0] = new ArcadePlayer(0, Keys.Left, Keys.Right, Keys.Up, Keys.Down, Keys.LeftShift, Keys.Space, Keys.LeftControl, Keys.LeftAlt, true);
player[1] = new ArcadePlayer(1, Keys.D, Keys.G, Keys.R, Keys.F, Keys.W, Keys.Q, Keys.A, Keys.S, true);
player[2] = new ArcadePlayer(2, Keys.J, Keys.L, Keys.I, Keys.K, Keys.O, Keys.Enter, Keys.RightControl, Keys.RightShift, true);
player[3] = new ArcadePlayer(3, Keys.V, Keys.U, Keys.Y, Keys.N, Keys.M, Keys.H, Keys.B, Keys.E, true);
Load();
}
/// <summary>
Expand Down Expand Up @@ -470,7 +470,7 @@ static void Load()
/// </summary>
public static void Save()
{
Console.WriteLine("Saving...");
System.Console.WriteLine("Saving...");
StreamWriter sw = new StreamWriter(filePath);
for (int i = 0; i < 4; i++)
{
Expand All @@ -483,7 +483,7 @@ public static void Save()
/// </summary>
/// <param name="playerId">the playerId to check</param>
/// <returns>true if the playerId is within bounds</returns>
static bool CheckPlayerId(int playerId)
static bool checkPlayerId(int playerId)
{
if (playerId >= 0 && playerId < 4)
{
Expand All @@ -501,13 +501,13 @@ static bool CheckPlayerId(int playerId)
/// <summary>
public static bool GetKeyDown(int playerId, ArcadeButton button)
{
if (CheckPlayerId(playerId))
if (checkPlayerId(playerId))
{
return player[playerId].GetKeyDown(button);
}
else
{
throw new ArgumentException("Arcade.GetKeyDown: PlayerId out of bounds");
throw new System.ArgumentException("Arcade.GetKeyDown: PlayerId out of bounds");
}

}
Expand All @@ -520,13 +520,13 @@ public static bool GetKeyDown(int playerId, ArcadeButton button)
/// <summary>
public static bool GetKeyUp(int playerId, ArcadeButton button)
{
if (CheckPlayerId(playerId))
if (checkPlayerId(playerId))
{
return player[playerId].GetKeyUp(button);
}
else
{
throw new ArgumentException("Arcade.GetKeyUp: PlayerId out of bounds");
throw new System.ArgumentException("Arcade.GetKeyUp: PlayerId out of bounds");
}

}
Expand All @@ -539,7 +539,7 @@ public static bool GetKeyUp(int playerId, ArcadeButton button)
/// <summary>
public static bool GetKey(int playerId, ArcadeButton button)
{
if (CheckPlayerId(playerId))
if (checkPlayerId(playerId))
{
return player[playerId].GetKey(button);
}
Expand Down Expand Up @@ -573,7 +573,7 @@ public static bool PlayerIsIngame(int playerId)
/// <returns>the score</returns>
public static int GetScore(int playerId)
{
if (CheckPlayerId(playerId))
if (checkPlayerId(playerId))
{
return player[playerId].GetScore();
}
Expand All @@ -590,7 +590,7 @@ public static int GetScore(int playerId)
/// <param name="score">the number which the score should be set to</param>
public static void SetScore(int playerId, int score)
{
if (CheckPlayerId(playerId))
if (checkPlayerId(playerId))
{
player[playerId].SetScore(score);
}
Expand All @@ -607,7 +607,7 @@ public static void SetScore(int playerId, int score)
/// <param name="score">the amount of points to add to the score</param>
public static void AddScore(int playerId, int score)
{
if (CheckPlayerId(playerId))
if (checkPlayerId(playerId))
{
player[playerId].AddScore(score);
}
Expand All @@ -624,7 +624,7 @@ public static void AddScore(int playerId, int score)
/// <param name="score">the amount of points the score should be decreased with</param>
public static void SubtractScore(int playerId, int score)
{
if (CheckPlayerId(playerId))
if (checkPlayerId(playerId))
{
player[playerId].SubtractScore(score);
}
Expand All @@ -634,4 +634,6 @@ public static void SubtractScore(int playerId, int score)
}

}


}
142 changes: 140 additions & 2 deletions HonccaFest/Content/Content.mgcb
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,78 @@
/processorParam:TextureFormat=Compressed
/build:Fonts/scoreFont.spritefont

#begin Songs/duck_tag.mp3
/importer:Mp3Importer
/processor:SongProcessor
/processorParam:Quality=Best
/build:Songs/duck_tag.mp3

#begin Songs/engines_revved.mp3
/importer:Mp3Importer
/processor:SongProcessor
/processorParam:Quality=Best
/build:Songs/engines_revved.mp3

#begin Songs/loading.mp3
/importer:Mp3Importer
/processor:SongProcessor
/processorParam:Quality=Best
/build:Songs/loading.mp3

#begin Songs/lose_stinger.mp3
/importer:Mp3Importer
/processor:SongProcessor
/processorParam:Quality=Best
/build:Songs/lose_stinger.mp3

#begin Songs/new_eyes.mp3
/importer:Mp3Importer
/processor:SongProcessor
/processorParam:Quality=Best
/build:Songs/new_eyes.mp3

#begin Songs/wandering_maze.mp3
/importer:Mp3Importer
/processor:SongProcessor
/processorParam:Quality=Best
/build:Songs/wandering_maze.mp3

#begin Sounds/cannon_sound.wav
/importer:WavImporter
/processor:SoundEffectProcessor
/processorParam:Quality=Best
/build:Sounds/cannon_sound.wav

#begin Sounds/coin_sound.wav
/importer:WavImporter
/processor:SoundEffectProcessor
/processorParam:Quality=Best
/build:Sounds/coin_sound.wav

#begin Sounds/finish_sound.wav
/importer:WavImporter
/processor:SoundEffectProcessor
/processorParam:Quality=Best
/build:Sounds/finish_sound.wav

#begin Sounds/quack_sound.wav
/importer:WavImporter
/processor:SoundEffectProcessor
/processorParam:Quality=Best
/build:Sounds/quack_sound.wav

#begin Sprites/cannonBallSprite.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Sprites/cannonBallSprite.png

#begin Sprites/characterSelectionArrow.png
/importer:TextureImporter
/processor:TextureProcessor
Expand All @@ -64,6 +130,42 @@
/processorParam:TextureFormat=Color
/build:Sprites/checkmark.png

#begin Sprites/duckyRoadBase.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Sprites/duckyRoadBase.png

#begin Sprites/filledRectangle.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Sprites/filledRectangle.png

#begin Sprites/honccaLogo.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Sprites/honccaLogo.png

#begin Sprites/joystick.png
/importer:TextureImporter
/processor:TextureProcessor
Expand Down Expand Up @@ -112,6 +214,42 @@
/processorParam:TextureFormat=Color
/build:Sprites/transparentRectangle.png

#begin SpriteSheets/cannonSprite.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:SpriteSheets/cannonSprite.png

#begin SpriteSheets/car spritesheet.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:SpriteSheets/car spritesheet.png;SpriteSheets/carSpritesheet.png

#begin SpriteSheets/coinSpritesheet.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:SpriteSheets/coinSpritesheet.png

#begin SpriteSheets/fireballSprite.png
/importer:TextureImporter
/processor:TextureProcessor
Expand All @@ -124,7 +262,7 @@
/processorParam:TextureFormat=Color
/build:SpriteSheets/fireballSprite.png;SpriteSheets/fireballSpritesheet.png

#begin SpriteSheets/playerOneCharacter.png
#begin SpriteSheets/loadingCircle.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
Expand All @@ -134,7 +272,7 @@
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:SpriteSheets/playerOneCharacter.png
/build:SpriteSheets/loadingCircle.png

#begin SpriteSheets/playerSpritesheet.png
/importer:TextureImporter
Expand Down
Binary file added HonccaFest/Content/Songs/duck_tag.mp3
Binary file not shown.
Binary file added HonccaFest/Content/Songs/engines_revved.mp3
Binary file not shown.
Binary file added HonccaFest/Content/Songs/loading.mp3
Binary file not shown.
Binary file added HonccaFest/Content/Songs/lose_stinger.mp3
Binary file not shown.
Binary file added HonccaFest/Content/Songs/new_eyes.mp3
Binary file not shown.
Binary file added HonccaFest/Content/Songs/wandering_maze.mp3
Binary file not shown.
Binary file added HonccaFest/Content/Sounds/cannon_sound.wav
Binary file not shown.
Binary file added HonccaFest/Content/Sounds/coin_sound.wav
Binary file not shown.
Binary file added HonccaFest/Content/Sounds/finish_sound.wav
Binary file not shown.
Binary file added HonccaFest/Content/SpriteSheets/cannonSprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HonccaFest/Content/SpriteSheets/loadingCircle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified HonccaFest/Content/SpriteSheets/playerSpritesheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HonccaFest/Content/Sprites/cannonBallSprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HonccaFest/Content/Sprites/duckyRoadBase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HonccaFest/Content/Sprites/filledRectangle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HonccaFest/Content/Sprites/honccaLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified HonccaFest/Content/Tiles/tileSet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HonccaFest/Content/Tiles/tileSet_original.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified HonccaFest/Content/bin/DesktopGL/Content/Tiles/tileSet.xnb
Binary file not shown.
Binary file not shown.
Binary file added HonccaFest/Content/bin/DesktopGL/Songs/duck_tag.xnb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added HonccaFest/Content/bin/DesktopGL/Songs/loading.xnb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added HonccaFest/Content/bin/DesktopGL/Songs/new_eyes.xnb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified HonccaFest/Content/bin/DesktopGL/Tiles/tileSet.xnb
Binary file not shown.
Loading

0 comments on commit 9b9ecd1

Please sign in to comment.