SoftLEASH game engine logo

WIKI

LUA / LÖVE

SOFTLEASH / DOCUMENTATION

Getting Started

Set up your first project, meet the LÖVE game loop, and find your way around SoftLEASH.

A working outline. The snippets below use plain LÖVE and Lua, not the final SoftLEASH API.

Before you start

SoftLEASH is an open-source 2D game engine written in Lua on top of the LÖVE framework. Start small: get a window running, draw something, and build from there.


This is the starting outline for installation, project setup, and your first scene. The final SoftLEASH setup commands and entry points can be added here later.


  1. Install LÖVE and choose a Lua-friendly editor.

  2. Create a project folder with a main.lua file.

  3. Run the folder with LÖVE and try changing the message.


Your first window

Save this as main.lua. These are standard LÖVE callbacks: a small starting point before the engine-specific setup is added.


local g = love.graphics

function love.load()
    love.window.setTitle(
        "Hello, Stray"
    )
    g.setBackgroundColor(
        0.125, 0.137, 0.125
    )
end

function love.draw()
    g.setColor(0.984, 0.773, 0.153)
    g.print("Hello, Stray.", 40, 40)
    g.setColor(0.302, 0.608, 0.902)
    g.rectangle(
        "fill", 40, 88, 180, 12
    )
end
local g = love.graphics

function love.load()
    love.window.setTitle(
        "Hello, Stray"
    )
    g.setBackgroundColor(
        0.125, 0.137, 0.125
    )
end

function love.draw()
    g.setColor(0.984, 0.773, 0.153)
    g.print("Hello, Stray.", 40, 40)
    g.setColor(0.302, 0.608, 0.902)
    g.rectangle(
        "fill", 40, 88, 180, 12
    )
end
local g = love.graphics

function love.load()
    love.window.setTitle(
        "Hello, Stray"
    )
    g.setBackgroundColor(
        0.125, 0.137, 0.125
    )
end

function love.draw()
    g.setColor(0.984, 0.773, 0.153)
    g.print("Hello, Stray.", 40, 40)
    g.setColor(0.302, 0.608, 0.902)
    g.rectangle(
        "fill", 40, 88, 180, 12
    )
end


Find your next step

Explore the engine systems from the left-hand index. Start with Scene Stack and Object Tree, then move on to input, timing, assets, and rendering as your project needs them.


SoftLEASH sample documentation artwork


Sample artwork: replace this image with a project screenshot or an architecture diagram. Images and code blocks can sit anywhere in the document.

SOFTLEASH / A GO DOG! TOOL

DOCUMENTATION IN PROGRESS

DOCUMENTATION IN PROGRESS