Jump to content

Heads Up Display: Difference between revisions

From OpenBOR
Created page with "== Introduction == OpenBOR includes a fully functional HUD system out of the box. No single hard-coded HUD system could accommodate every visual design creators may want across all game genres. OpenBOR’s native HUD nevertheless supports most needs associated with beat ’em up and platformer games. For more advanced HUD designs, creators are encouraged to use subscreens and direct-drawing primitives. These tools make it possible to create virtually any graphical effe..."
 
 
(8 intermediate revisions by the same user not shown)
Line 5: Line 5:


For more advanced HUD designs, creators are encouraged to use subscreens and direct-drawing primitives. These tools make it possible to create virtually any graphical effect or heads-up display required by different visual styles and game genres.
For more advanced HUD designs, creators are encouraged to use subscreens and direct-drawing primitives. These tools make it possible to create virtually any graphical effect or heads-up display required by different visual styles and game genres.
== Timer ==
Elements to control the default game time count down display. For game time mechanics, see [[Time#Game Time|Time]].
=== Timer Font ===
Timer text is hard-coded to font 3 (meaning <code>data/sprites/font4.png</code> - remember loaded fonts are 0 indexed). Edit or swap this font file to change the timer text appearance.
=== Disable Timer Display ===
<span id="notime"></span>
<syntaxhighlight lang="text">
notime {int disable}
#default
notime 0
</syntaxhighlight>Level header - If <code>1</code>, the timer remains active, but does not display on screen.
=== Timer Location and Border ===
<syntaxhighlight lang="text">
timeloc {int x} {int y} {int w} {int h} {int border}
#default
timeloc 149 4 21 20 0
</syntaxhighlight>Levels - Positions the timer on screen.
* '''x -''' Horizontal position.
* '''y -''' Vertical position.
* '''w -''' Width of border around time text.
* '''h -''' Height of border around time text.
* '''border -''' <code>1</code> disables border.
=== Timer Icon ===
<syntaxhighlight lang="text">
timeicon {string path} {x} {y}
#default
timeicon none 0 0
</syntaxhighlight>Levels - Adds a static image one layer step behind the timer. Meant as a timer icon, but may be used independently to place a static image anywhere on screen.
* '''{path} -''' Path to the image file for icon.
* '''{x} -''' Horizontal offset from top left of screen.
* {'''y} -''' Vertical offset from top left of screen.
[[Category:HUD]]

Latest revision as of 12:56, 12 July 2026

Introduction

OpenBOR includes a fully functional HUD system out of the box.

No single hard-coded HUD system could accommodate every visual design creators may want across all game genres. OpenBOR’s native HUD nevertheless supports most needs associated with beat ’em up and platformer games.

For more advanced HUD designs, creators are encouraged to use subscreens and direct-drawing primitives. These tools make it possible to create virtually any graphical effect or heads-up display required by different visual styles and game genres.

Timer

Elements to control the default game time count down display. For game time mechanics, see Time.

Timer Font

Timer text is hard-coded to font 3 (meaning data/sprites/font4.png - remember loaded fonts are 0 indexed). Edit or swap this font file to change the timer text appearance.

Disable Timer Display

notime {int disable}

#default
notime 0

Level header - If 1, the timer remains active, but does not display on screen.

Timer Location and Border

timeloc {int x} {int y} {int w} {int h} {int border}

#default
timeloc 149 4 21 20 0

Levels - Positions the timer on screen.

  • x - Horizontal position.
  • y - Vertical position.
  • w - Width of border around time text.
  • h - Height of border around time text.
  • border - 1 disables border.

Timer Icon

timeicon {string path} {x} {y}

#default
timeicon none 0 0

Levels - Adds a static image one layer step behind the timer. Meant as a timer icon, but may be used independently to place a static image anywhere on screen.

  • {path} - Path to the image file for icon.
  • {x} - Horizontal offset from top left of screen.
  • {y} - Vertical offset from top left of screen.