Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
bd099b5
leaderboards and settings
AdamPassanisi Mar 10, 2019
7dfb959
exit game
AdamPassanisi Mar 18, 2019
6c930d0
Adding menus
AdamPassanisi Mar 23, 2019
49ed265
test
AdamPassanisi Mar 31, 2019
85a92ca
adding menus
AdamPassanisi Apr 1, 2019
d854bb3
/
AdamPassanisi Apr 1, 2019
981ffa9
Menu scalings
AdamPassanisi Apr 24, 2019
e246b2b
player touching platform function
AdamPassanisi Apr 26, 2019
45aa23f
Tring to make player move correctly
AdamPassanisi Apr 26, 2019
a43d157
Adding the login system
AdamPassanisi Apr 26, 2019
520ec53
Changed some of the database queries, added enemy class, and changed …
TwistedRazors Apr 26, 2019
7a50f05
Login system
AdamPassanisi Apr 26, 2019
a29e6ff
Changed some of the database queries, added enemy class, and changed …
TwistedRazors Apr 26, 2019
64c7491
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
TwistedRazors Apr 26, 2019
a445cab
changes
AdamPassanisi Apr 26, 2019
b84f89c
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi Apr 26, 2019
544ba3b
test
AdamPassanisi Apr 26, 2019
487c3df
test
TwistedRazors Apr 26, 2019
e31ad06
test
TwistedRazors Apr 26, 2019
a5b0f4f
test
TwistedRazors Apr 26, 2019
9f593a0
login page navigation
AdamPassanisi Apr 26, 2019
0cedb04
Better login menus
AdamPassanisi Apr 27, 2019
8dfe318
Instructions screen
AdamPassanisi Apr 27, 2019
4361f5d
login page
AdamPassanisi Apr 27, 2019
aec2566
Scaling
AdamPassanisi Apr 27, 2019
4efdf5d
Slight Gravity
AdamPassanisi Apr 27, 2019
fa51093
Added enemy position and some to the enemy class
TwistedRazors Apr 27, 2019
63af3a0
Added enemy position and some to the enemy class
TwistedRazors Apr 27, 2019
e8dd961
Slightly better jumping
AdamPassanisi Apr 27, 2019
abc1519
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi Apr 27, 2019
675862c
Leaderboards button to main menu
AdamPassanisi Apr 27, 2019
c230991
login and tiles
AdamPassanisi Apr 27, 2019
878a005
Changed constructor of enemy class to the same as player class
TwistedRazors Apr 27, 2019
436eca4
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
TwistedRazors Apr 27, 2019
d73b500
Loing/Create account
AdamPassanisi Apr 27, 2019
c3f62df
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi Apr 27, 2019
60cf6d7
Worked on login and create account
TwistedRazors Apr 27, 2019
7780d47
Worked on login and create account
TwistedRazors Apr 27, 2019
ec9fecf
Create Account
AdamPassanisi Apr 27, 2019
cbe19af
Merge branch 'master' into NewBranch
deepakdamera Apr 28, 2019
08c58df
corrections after resolving conflicts..
Apr 28, 2019
3dc3b7f
removed duplicates
Apr 28, 2019
3bb4c73
changes
AdamPassanisi Apr 28, 2019
e5453d7
merge
AdamPassanisi Apr 28, 2019
675f8d0
push
AdamPassanisi Apr 28, 2019
0aa28d2
create
AdamPassanisi Apr 28, 2019
35b8cd0
create account (no confrim yet)
AdamPassanisi Apr 28, 2019
28983a5
some enemy, timer
Apr 28, 2019
ebdae1a
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
Apr 28, 2019
53cdac0
re-fixed jump
AdamPassanisi Apr 28, 2019
2ae2169
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi Apr 28, 2019
c7f8d85
working on hashing
AdamPassanisi Apr 28, 2019
2c735ac
Hashed password
AdamPassanisi Apr 28, 2019
34bd47c
change
Apr 28, 2019
3e53a21
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
Apr 28, 2019
82ae440
theo+enemy attack
Apr 29, 2019
b600c2f
Starting Leaderboard
AdamPassanisi Apr 29, 2019
d8fb1d1
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi Apr 29, 2019
14bc94b
Scaled jumping/framespeed -> .75f
AdamPassanisi Apr 29, 2019
b5a4b5c
edit
Apr 29, 2019
a064ee4
merge 0.75f
Apr 29, 2019
a7bfb2a
Leaderboards showing level 1
AdamPassanisi Apr 29, 2019
b4c1d3c
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi Apr 29, 2019
1791134
Login works with hash now
AdamPassanisi Apr 29, 2019
caa2e80
scrolling / middle pos
Apr 29, 2019
fd05d32
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
Apr 29, 2019
a256d5c
Tells user if username/password is too short
AdamPassanisi Apr 29, 2019
6b16e1d
better scrolling and tile movement
AdamPassanisi Apr 29, 2019
b526f4d
Trying to add a finish line
AdamPassanisi Apr 29, 2019
712c9fc
background
AdamPassanisi Apr 29, 2019
329144f
Changed one of the queries and some variable names in the account
TwistedRazors Apr 29, 2019
af0ece4
Changed one of the queries and some of the variables in the account c…
TwistedRazors Apr 29, 2019
a0455f2
enemy correction
Apr 30, 2019
6ab1e64
db & enemy updates
Apr 30, 2019
435679b
adding finishline / door (L1)
Apr 30, 2019
0034047
Login/Create account handles numbers
AdamPassanisi Apr 30, 2019
ed04e7f
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi Apr 30, 2019
4c5dd7e
hasEnteredtheDoor
Apr 30, 2019
4a01e94
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
Apr 30, 2019
49790cd
edit
Apr 30, 2019
8e30ad5
Beating level adds score to leaderbaord, fixed log in password problem
AdamPassanisi Apr 30, 2019
9f27af0
tweeked enemy hitbox, game exits if player is hit
AdamPassanisi Apr 30, 2019
8ec1894
Added a new game function to the database queries file
TwistedRazors Apr 30, 2019
f40f990
enemy tries to run you over, pumps the brakes when you hit halfway
AdamPassanisi Apr 30, 2019
756475e
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi Apr 30, 2019
773d731
log in takes user to main menu
AdamPassanisi Apr 30, 2019
85647e6
passwords show as astericks
AdamPassanisi May 1, 2019
b8e4c2d
lobby music / reset()
May 1, 2019
2b14baf
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
May 1, 2019
e3f0154
edit on lobby audio
May 1, 2019
be3a340
adding level 2
AdamPassanisi May 1, 2019
dd7f23a
content merge
AdamPassanisi May 1, 2019
af84087
Added save game call when user beats the first level to update the da…
TwistedRazors May 1, 2019
41d798c
gameover screen
AdamPassanisi May 1, 2019
3fe8560
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi May 1, 2019
3e88cd9
better gameover/ level complete
AdamPassanisi May 1, 2019
7ff992f
added victory and jump sounds
May 1, 2019
50fc520
check
May 1, 2019
058e436
recheck merge.
May 1, 2019
70d584d
reseting enemy
May 1, 2019
95b0141
lvl 2
AdamPassanisi May 1, 2019
fb98993
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi May 1, 2019
ecfc59e
deathSound
May 1, 2019
5a7e43b
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
May 1, 2019
2a73b55
Second enemy in lvl 1
AdamPassanisi May 1, 2019
5a3852f
merge
AdamPassanisi May 1, 2019
3ec4a2f
fixed sound effects for enemies
AdamPassanisi May 1, 2019
2d4960a
lvl 2 tiles moving
AdamPassanisi May 1, 2019
d5a5186
hopefully fixed scrolling/slight level 2
AdamPassanisi May 1, 2019
603e716
shows attack animation better
AdamPassanisi May 1, 2019
40bd5c4
change in audio
May 1, 2019
1ecb2a2
merge
May 1, 2019
00cf366
level 2
AdamPassanisi May 1, 2019
3f86eb5
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi May 1, 2019
8f7a83a
better reset on game over
AdamPassanisi May 1, 2019
0eebc42
Scrollable leaderboard
AdamPassanisi May 2, 2019
c26ea2a
Changed the draw string to show the correct score added to database a…
TwistedRazors May 2, 2019
a6aedb1
Modified the continue game function in the database queries class
TwistedRazors May 2, 2019
c5d60ef
Minor code management
TwistedRazors May 2, 2019
ac2db18
Level 2 support for leaderboards
AdamPassanisi May 2, 2019
38add23
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi May 2, 2019
0934e8b
Credits/Comments
May 3, 2019
c939bdb
Pause screen
AdamPassanisi May 3, 2019
2cd7881
merge
AdamPassanisi May 3, 2019
162adfb
Changed query and included automated testing
TwistedRazors May 3, 2019
9600bd6
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
TwistedRazors May 3, 2019
49758f5
removes login/create account button when user is logged in
AdamPassanisi May 3, 2019
26a36c6
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi May 3, 2019
77c9540
Create Sources
deepakdamera May 3, 2019
230971d
continue game when user is logged in
AdamPassanisi May 3, 2019
29c9749
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi May 3, 2019
b7cfb75
Added call to new game query when user clicks new game button
TwistedRazors May 3, 2019
14557a9
Executable file
TwistedRazors May 3, 2019
26f5d58
Delete Platformer.exe
TwistedRazors May 3, 2019
d8cc356
Cleaned code up some
AdamPassanisi May 3, 2019
2b89e1c
Merge branch 'NewBranch' of https://github.com/AdamPassanisi/Platform…
AdamPassanisi May 3, 2019
6532d39
Folder containing executable file and readme on how to run the file
AdamPassanisi May 3, 2019
b867ef6
merged branches
AdamPassanisi May 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Credits/Sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Credits:

Lobby Audio:PUBG Mobile Main Menu Music Theme - Gboy Tyro Remix
In-game Sound Effects: soundbible.org


Code / Monogame Animation
Oyyou Tutorials
25 changes: 25 additions & 0 deletions Platformer/Account.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,33 @@ public Account(string userID)

}

// Takes in a string and a 'salt'
// Concatenates them to one string and returns its SHA256 hash
public static String GenerateHash(String password, String salt)
{
HashAlgorithm algorithm = new SHA256Managed();

byte[] b = algorithm.ComputeHash(Encoding.UTF8.GetBytes(password+salt));

StringBuilder hashed = new System.Text.StringBuilder();


foreach (byte Byte in b)
{
hashed.Append(Byte.ToString("x2"));
}

return hashed.ToString();

}


// genereate hash
// salts to be randomised
public static byte[] GenerateSaltedHash(byte[] plainText, byte[] salt)
{
HashAlgorithm algorithm = new SHA256Managed();


byte[] plainTextWithSaltBytes =
new byte[plainText.Length + salt.Length];
Expand All @@ -55,6 +77,9 @@ public static byte[] GenerateSaltedHash(byte[] plainText, byte[] salt)
plainTextWithSaltBytes[plainText.Length + i] = salt[i];
}




return algorithm.ComputeHash(plainTextWithSaltBytes);
}

Expand Down
12 changes: 10 additions & 2 deletions Platformer/Animation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,26 @@ public class Animation
public int CurrFrame { get; set; }
public int FrameCount { get; private set; }
public int FrameHeight { get { return Texture.Height; } }
public int FrameSpeed { get; set; }
public float FrameSpeed { get; set; }
public int FrameWidth { get { return Texture.Width / FrameCount; } }
public bool isLooping { get; set; }


public Texture2D Texture { get; private set; }
public Animation( Texture2D texture, int frameCount)
{
Texture = texture;
FrameCount = frameCount;
isLooping = true;
FrameSpeed = .75f;

FrameSpeed = (int) 0.5f;
}
public Animation(Texture2D texture, int frameCount, float fs)
{
Texture = texture;
FrameCount = frameCount;
isLooping = true;
FrameSpeed = fs;

}

Expand Down
33 changes: 29 additions & 4 deletions Platformer/AnimationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
using System.Text;
using System.Threading.Tasks;

/* Modified code from https://github.com/Oyyou/MonoGame_Tutorials/
Credit Author: Oyyou */

namespace Platformer
{
public class AnimationManager
Expand All @@ -14,7 +17,9 @@ public class AnimationManager

private float _timer;

public Vector2 Position { get; set; }
public int duration;

public Vector2 Position { get; set; }

public AnimationManager(Animation animation)
{
Expand Down Expand Up @@ -45,7 +50,7 @@ public void Play(Animation animation)
_timer = 0;
}

public void Play(Animation animation, int time)
public void Play(Animation animation, int duration)
{
if (_animation == animation)
return;
Expand All @@ -54,10 +59,25 @@ public void Play(Animation animation, int time)

_animation.CurrFrame = 0;

_timer = time;
_timer = duration;
}


// not used
public void PlayReverse(Animation animation, int duration)
{
if (_animation == animation)
return;

_animation = animation;

_animation.CurrFrame = 4;

_timer = duration;
}




public void Stop()
{
Expand All @@ -66,6 +86,8 @@ public void Stop()
_animation.CurrFrame = 0;
}


// the update methods increments frame
public void Update(GameTime gameTime)
{
_timer += (float)gameTime.ElapsedGameTime.TotalSeconds;
Expand All @@ -80,5 +102,8 @@ public void Update(GameTime gameTime)
_animation.CurrFrame = 0;
}
}
}



}
}
Binary file added Platformer/Content/Audio/Heartbeat.wav
Binary file not shown.
Binary file added Platformer/Content/Audio/Jump.wav
Binary file not shown.
Binary file added Platformer/Content/Audio/Lobby.mp3
Binary file not shown.
Binary file added Platformer/Content/Audio/victory.wav
Binary file not shown.
Loading