Home

Awesome

splashy is a simple and basic library for LÖVE, that allows the easy implementation of splash screens to any project.

Installation

To install, extract the splashy folder to somewhere in your project (usually a /libs folder)

Then setup your main.lua like this:

splashy = require 'path/to/splashy/folder'

function love.draw()

	splashy.draw()

end

function love.update(dt)

	splashy.update(dt)

end

Then you'll have a barebones installation complete!

Demo

You can see the code demo of the library here.

Interface

Splash Creation

splashy.addSplash(image, duration, index, color, scale)

On Complete

splashy.onComplete(func)

There are 2 main ways of using this:

splashy.onComplete(function() print("This is ran one time after all splashes are finished.") end)
splashy.onComplete(printFinishText)

function printFinishText()

	print("This is ran one time after all splashes are finished.")

end

Using this function is useful for switching gamestate.

Splash Skipping

This function skips the current splash screen onto the next one:

splashy.skipSplash()

Whilst this one skips all splashes, running the onComplete function:

splashy.skipAll()

Custom Resolutions

Use this function to set the screen resolution that will be used in the internal calculations. This is useful if you use a screen scaling library, like push or TLfres.

splashy.setScreenSize (width, height)

Credits

tween.lua is used for the tweening/fading.

Check LICENCE.md for more info.

Changelog

v1.0:

Notes

This library has/is a learning experience for me, if theres any problems be sure to raise them in the issues.

Pull requests are welcome :)