a-game

2D platformer written from scratch.
git clone git://git.amin.space/a-game.git
Log | Files | Refs | README | LICENSE

commit e1f5747d5b32081cc29bc8a2a8072c77ee508a1f
parent 3a4df3bbd702c5d1ce1abd94636459f0489525f6
Author: amin <dev@aminmesbah.com>
Date:   Sat,  9 Nov 2019 06:54:31 +0000

Tune jumping a bit

FossilOrigin-Name: 7d55d193c5cfac31784441da8628dda2edff14567b2c31d71089d88ca12a2990
Diffstat:
Msrc/game.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/game.c b/src/game.c @@ -237,7 +237,7 @@ void game_update_and_render(struct GameMemory *game_memory, struct GameInput *ga [DIR_RIGHT] = 6.0f, [DIR_LEFT] = -6.0f, [DIR_UP] = 7.0f, - [DIR_DOWN] = -10.0f, + [DIR_DOWN] = -9.0f, }; f32 acceleration_rate = 50.0f; f32 friction = 0.7f; @@ -392,8 +392,9 @@ void game_update_and_render(struct GameMemory *game_memory, struct GameInput *ga } break; case MOVE_MODE_JUMPING: - max_velocity[DIR_UP] = 100.0f; - player->acceleration.y = 13.0f * acceleration_rate; + // TODO: Specify jumping in terms of jump height + max_velocity[DIR_UP] = 1000.0f; + player->acceleration.y = 30.0f * acceleration_rate; player->move_mode = MOVE_MODE_FALLING; break; case MOVE_MODE_FLOATING: