Skip to main content

Network settings

Configuration for client-server multiplayer connections using ENet.
SERVER_IP
const char*
default:"127.0.0.1"
IP address for server connections. Default localhost for local multiplayer testing.
SERVER_PORT
const int
default:"7777"
Port number used for hosting and joining multiplayer games.

Display settings

Window and rendering configuration constants.
screenWidth
const int
default:"1280"
Width of the game window in pixels.
screenHeight
const int
default:"720"
Height of the game window in pixels. Window title is set to “WIZARD DUEL”.
FPS
int
default:"60"
Target frames per second set via SetTargetFPS(60). Controls game loop timing.

Camera settings

Camera zoom limits and default values for the 2D camera system.
default zoom
float
default:"7.0f"
Initial camera zoom level when game starts. Higher values zoom in closer to the character.
minimum zoom
float
default:"1.5f"
Minimum allowed camera zoom level. Provides maximum view distance but drains mana.
maximum zoom
float
default:"10.0f"
Maximum allowed camera zoom level. Closest view to the character.
reset zoom
float
default:"9.9f"
Zoom level when pressing KEY_R to reset the camera view.

World parameters

World boundaries and environmental object configuration.
world width
int
default:"2000"
Maximum X-coordinate boundary of the playable world. Character dies if position exceeds this value.
world height
int
default:"2000"
Maximum Y-coordinate boundary of the playable world. Character dies if position falls below 0 or exceeds this value.
number_of_trees
int
default:"115"
Number of tree obstacles spawned randomly throughout the world. Trees block character movement and interact with spell projectiles.

Character defaults

Default values for character attributes and gameplay mechanics.
default health
float
default:"300.0f"
Starting and maximum health points for all characters. Health can exceed this value when using shields (RIGHT_MOUSE_BUTTON).
default mana
float
default:"300.0f"
Starting and maximum mana points for all characters. Used for casting spells and healing.
movement speed
float
default:"0.5f"
Character movement speed per frame when pressing WASD keys.
character dimensions
Rectangle
default:"{ 0, 0, 20, 40 }"
Character collision rectangle with width 20 and height 40 pixels.

Color constants

Predefined color values used throughout the game.
bloodRed
Color
default:"{ 128, 0, 0, 255 }"
Dark red color for the red spell projectile (KEY_ONE). RGBA values: R=128, G=0, B=0, A=255.
spellColor
Color
default:"RED"
Default spell color constant set to Raylib’s RED color.

Build docs developers (and LLMs) love