A 2D game engine for libretro
Lutro is a 2D game framework that aims for simplicity and extreme portability.
Using lutro, you can develop any kind of 2D retro games, like NES or Genesis games, and run them on a wide range of platforms through RetroArch.
Lutro makes it easy to write games by using Lua and following the LÖVE API.
Portability is achieved through the libretro API: Lutro is just loaded as a plugin in a frontend like RetroArch which takes care of display, audio and inputs.
Lutro follows the LÖVE API. If you are already familiar with this framework, it should be easy to get started.
function love.load()
font = love.graphics.newImageFont("font.png", "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
love.graphics.setFont(font)
end
function love.draw()
love.graphics.print("HELLO 123", 16, 32)
end
function love.load()
whale = love.graphics.newImage("whale.png")
end
function love.draw()
love.graphics.draw(whale, 32, 32)
end
function love.load()
sound = love.audio.newSource("music.ogg", "stream")
love.audio.play(sound)
end
You can also read the sample games if you prefer to learn by example.
Lutro supports less feature than LÖVE, but is more portable (see the list of supported platforms). Being able to run lutro games in a libretro frontend open some new possibilities like Run-ahead, Rewind and Rollback netcode.
We wanted a software rendered version to target some platforms without a GPU.
Also we want to expose some new API inpsired by emulators like savestates.
The fact that LÖVE main loop is implemented in Lua is incompatible with retro_run from libretro, it prevents executing the game step by step.
No, some calls are not implemented at all. Only the strict minimum to be able to produce retro games have been implemented. Some parts of the input code has also been modified to follow the libretro API more closely.
Yes, lutro is distributed under the MIT license, you can use it freely, including for commercial projects.
You launch them using RetroArch or Ludo or any other libretro frontend. Lutro works like an emulator, and your game is the ROM.
See Getting started.
Yes, but it's not very easy. A few games have been ported from LÖVE, like Sienna or In Your Face City Trains.