👑
Impulse documentation
  • Getting started
  • Examples
    • Console
    • Window
  • enviornment
    • Globals
      • Lua globals
      • Impulse globals
    • Libraries
      • Win32
      • Direct X
      • Renderer
      • Input
      • Crypt
      • Memory
      • File system
      • Debug
  • Enumerations
    • Key codes
    • Cursor style
    • Primitive topology
  • Data types
    • Vector2
    • Vector3
    • Vertex
    • Color
    • Draw command
Powered by GitBook

Impulse links

  • GitHub
  • Project
  • Discord

© 2025 Impulse

On this page
  1. Examples

Console

Simple centered console that says 'Hello World!'

Console.lua
local screen_size: vector2 = win32.get_screen_size( )

local console_ref: number = win32.create_console("console", 
    (screen_size.x / 2) - ((screen_size.x / 1.5) / 2), -- x
    (screen_size.y / 2) - ((screen_size.y / 1.5) / 2), -- y
    screen_size.x / 1.5, -- width
    screen_size.y / 1.5 -- height
)

print("Hello World!")
PreviousGetting startedNextWindow

Last updated 3 months ago