Better friction, kinda.

master
kdx 2 years ago
parent a5c414dd4c
commit 8a4bc582a9
  1. 1
      .gitignore
  2. 2
      include/player.h
  3. 4
      src/player.c

1
.gitignore vendored

@ -6,3 +6,4 @@ JTMM2.g*a
levels/0.jtmm2
src/gen_levels.c
*.sublime-*
JTMM2_preview_*.zip

@ -1,8 +1,6 @@
#ifndef _DEF_PLAYER
#define _DEF_PLAYER
#include <stdbool.h>
#include "vec.h"
typedef struct Player {

@ -10,8 +10,8 @@
/* TODO: Determine FRICTION and ACCELERATION from UPS. */
#define MAX_SPD (64 * PXS)
#define FRICTION 0.9
#define ACCELERATION (MAX_SPD * (1 - FRICTION))
#define FRICTION (0.95)
#define ACCELERATION (int)(MAX_SPD * (1 - FRICTION))
#define GRAVITY PXS
#define JUMP_SPD (-128 * PXS)
#define GRACE_UNITS (int)(UPS / 5)

Loading…
Cancel
Save