RyanHub – file viewer
filename: include/constants.h
branch: main
back to repo
// GAMESTATES 
enum STATE { START, SERVER, CLIENT, DEBUG, WIN, LOSS };
const int maxHealth = 50;
const int MOUSE_SENS = 2;
const GLfloat MOVE_SPEED = 0.05f;
const GLfloat PLAYER_SIZE = 0.01f; // half of player diameter

// NETWORK
const int IN_OUT_BUFF_SIZE = 4096;

// RENDERING
const int MAX_VERTEX_BUFFER_SIZE = 1'000'000;
const int MAX_INDEX_BUFFER_SIZE = 1'000'000;
const int SCREEN_X = 1280, SCREEN_Y = 720;
const int CenterHorizontal = SCREEN_X / 2, CenterVertical = SCREEN_Y / 2;
const int VERTICES_SIZE = 24;
const GLuint indices[] = { 0, 1, 2, 2, 3, 0 };

// WORLD
const int mapX = 8;				// map width
const int mapY = 8;				// map height
const int mapS = mapX*mapY;     // map size
const int RAY_NUM = 60;			// ALSO FOV
const float angularSlice = 2.0f / RAY_NUM;
const float tileSize = 0.05f;
const int map[] = {
 1,1,1,1,1,1,1,1,
 1,0,0,0,0,0,0,1,
 1,0,1,0,0,1,0,1,
 1,0,0,0,0,0,0,1,
 1,0,0,0,0,0,0,1,
 1,0,1,0,0,1,0,1,
 1,0,0,0,0,0,0,1,
 1,1,1,1,1,1,1,1,
};

// PLAYERS
constexpr int STARTING_PARAMETER_COUNT = 2;
const GLfloat defaultClientPos[STARTING_PARAMETER_COUNT] = { -0.92f, 0.92f }; // x, y
const GLfloat defaultServerPos[STARTING_PARAMETER_COUNT] = { -0.68f, 0.68f };