Better horizontal acceleration courtesy of Alex M.

This commit is contained in:
2026-06-16 14:35:32 -04:00
parent 1e597beeee
commit 4988964f22
4 changed files with 34 additions and 11 deletions

View File

@@ -1,11 +1,14 @@
#include <stddef.h>
#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;