diff --git a/src/player.c b/src/player.c index 1350afd..3f73ce4 100644 --- a/src/player.c +++ b/src/player.c @@ -6,30 +6,42 @@ #include "raylib.h" // let's a go! - +float curhorvel=0.0f; //current horizonatal velocity void UpdatePlayerControls(void) { // if there isn't a player, you probably can't do much - if (!player) + if (!player){ return; - + } + if(curhorvel==0.0f){ + curhorvel=10.0f*scale; + } // if a key pressed, push player to the left if (IsKeyDown(KEY_A)) { + if(curhorvel #include "world.h" +// the beeg one. hooooooooooooooooh boy + const float scale = 43.7445319335f; const float g = 9.81f * scale; -const float PLAYER_FORCE = 3500.0f; -const float JUMP_FORCE = 22000.0f; +const float PMV = 10000.0*scale; //Player Max Velocity +const float PLAYER_SPEED_FACTOR =1.3f; +const float JUMP_FORCE = 300.0f*scale; const float AIR_DRAG = 0.999f; @@ -79,7 +82,9 @@ Entity *SpawnEntity( return NULL; } - +// say bye bye to EVERYTHINGGGG AHAHAHAHAHAAH +// im a little mad with power +// this is literally just a helper function to clear the entities and player void ClearWorld(void) { for (int i = 0; i < MAX_ENTITIES; i++) @@ -90,6 +95,7 @@ void ClearWorld(void) player = NULL; } +// used in main.c to start the actual engine behaviors. spawns the player, and a few other boxes for funsies. void InitWorld(void) { ClearWorld(); @@ -119,6 +125,7 @@ void InitWorld(void) simTime = 0.0f; } +// helper function: count number of entities. Something somewhere uses this. I think it's probably for entity counting. Don't quote me on that. int CountEntities(void) { int count = 0; diff --git a/src/world.h b/src/world.h index 2a99cb9..b4461f9 100644 --- a/src/world.h +++ b/src/world.h @@ -12,6 +12,10 @@ extern bool isSimulating; extern float simTime; +extern const float PMV; + +extern const float PLAYER_SPEED_FACTOR; + void ApplyForce(Entity *e, Vector2 force); bool IsGrounded(Entity *e); diff --git a/wrldbox b/wrldbox index 6271465..357c77b 100755 Binary files a/wrldbox and b/wrldbox differ