Movment
Weekly update DevLog 1 Movement.
The movement system for Knight Dash is pretty simplistic consisting only of one user input witch is jumping, the player is pushed along as new platforms form with a small gap in between your job as the player is to time your jumps to get over the gaps and not fall down them.
The way I made the player move was by giving the player object's ridged body a velocity, this perpetually pushes the player forward it also allows for an increase of speed as the game goes on as to add more difficulty. this is also how I added jumping when the keys "space, W or the up arrow" are pressed it added the velocity named jumpForce to the ridged body's y axis sending the player upwards the player object has an innate gravity modifier witch is how the player falls.
The next thing that I added was a Boolean statement using the "IsTouchingLayers" statement and adding the platforms into the ground layer and the player into the player layer so the player can only jump when the player layer is touching the ground layer , this was a very key part as if the game didn't have this statement or something like it then you could jump forever making the game have no difficulty or reason to play.
I couldn't make it to the Tutorial classes so I didn't get any feedback from the other students in the tutorial group so here are a couple problems I faced while implementing the movement. The biggest problem was that when you were jumping the player would sometimes get stuck on the lip of the platform and as the way I implemented the player moving forward kept the player moving forward so it stuck up against the edge, The fix I found for this was by creating and adding a Physics Material 2D with a friction and bounciness of 0 so if the player hits a side it slides right down.
Knight Dash
A game concept for an upcoming assignment
More posts
- DoccumentationOct 17, 2021
- Google form link for FeedbackOct 07, 2021
- Game ConceptAug 27, 2021
Leave a comment
Log in with itch.io to leave a comment.