Game Constants

Numeric constants defined in include/def.hpp. These control rendering dimensions, world limits, gameplay parameters, and UI sizing.

Window and Rendering

ConstantValueDescription
LXIMAGE640Game window width (pixels)
LYIMAGE480Game window height (pixels)
POSDRAWX0Draw origin X
POSDRAWY0Draw origin Y

World Grid

ConstantValueDescription
MAXCELX100Max world cells horizontally
MAXCELY100Max world cells vertically

Sprite Dimensions

ConstantValueDescription
DIMOBJX64Object sprite width (px)
DIMOBJY64Object sprite height (px)
DIMBLUPIX60Blupi character sprite width (px)
DIMBLUPIY60Blupi character sprite height (px)
DIMEXPLOX128Explosion sprite width (px)
DIMEXPLOY128Explosion sprite height (px)
DIMBUTTONX40UI button width (px)
DIMBUTTONY40UI button height (px)
DIMJAUGEX124Gauge bar width (px)
DIMJAUGEY22Gauge bar height (px)
DIMTEXTX16Max character sprite width (px)
DIMTEXTY16Max character sprite height (px)
DIMLITTLEX16Small character sprite width (px)
DIMLITTLEY12Small character sprite height (px)

Multiplayer and Game Limits

ConstantValueDescription
MAXGAMER8Maximum total gamer profiles
MAXNETPLAYER4Maximum network players
MAXTEAM4Maximum teams
MAXNETMESSAGE20Max pending network messages
MAXSESSION100Max DirectPlay sessions shown in browser
MAXMOVEOBJECT200Max simultaneously active moving objects
MAXNOTIF5Max simultaneous on-screen notifications
MAXFIFOPOS10FIFO position queue size
MAXCHAT6Max chat messages visible at once
MAXSAVE6Max save game slots
MAXDEMO9999Max demo frames recorded/played back
MAXINDEX20Max index entries (purpose TBD)
MAXMESSAGEPERPACKET5Max game events per network packet
MAXBUTTON40Max UI buttons on screen at once

Camera Scrolling

ConstantValueDescription
SCROLL_SPEED8Camera scroll speed (pixels per tick)
SCROLL_MARGX80Horizontal scroll trigger margin (px from edge)
SCROLL_MARGY40Vertical scroll trigger margin (px from edge)

Character Physics Offsets

ConstantValueDescription
BLUPIFLOOR2Floor contact offset (px)
BLUPIOFFY6Y offset when standing on floor
BLUPISURF12Water surface offset (px)
BLUPISUSPEND12Bar-hanging Y offset (px)
OVERHEIGHT80Hovercraft flight height above ground (px)
MAXQUART441Quarter cell count (21×21 grid)

Key Color Flags (CLE_*)

Bit flags used in DescSave::blupiCle to track which colored keys the player holds.

ConstantValueDescription
CLE_RED1 (bit 0)Red key held
CLE_GREEN2 (bit 1)Green key held
CLE_BLUE4 (bit 2)Blue key held

Gauge Slots (JAUGE_*)

Indices for the two on-screen gauge slots tracked in DescSave::jaugeHide[].

ConstantValueDescription
JAUGE_AIR0Air/oxygen gauge (used underwater)
JAUGE_POWER1Power-up gauge (shield, lollipop, etc.)

Mouse Cursor Types (MOUSETYPEGRA etc.)

ConstantValueDescription
MOUSETYPEGRA1Graphical game cursor
MOUSETYPEWIN2Windows system cursor
MOUSETYPEWINPOS3Windows system cursor with position tracking