Tove2d: Animated Vector Graphics for LÖVE


Animated vector graphics for LÖVE.


TÖVE is a vector drawing canvas for LÖVE, think HTML5's <canvas> or OpenFL's Graphics. Which you can animate. Efficiently.


There have been various libraries for drawing vector graphics out there, but few of them are built for drawing or even animating complex scenes and most of them stopped at the most basic features.

As an example, take the HTML5 <canvas> tag: it's great in terms of quality, yet it's slow for animation or games, as it doesn't know how to keep its graphics data retained on the GPU: indeed, it will do a full redraw of the whole scene on each frame.

You can use WebGL, but then you lose vector graphics. There have been attempts to fix this by implementing vector graphics on top of WebGL, such as PIXI SVG and the ThreeJS SVG Loader. TÖVE is exactly like these, only more comprehensive. And for LÖVE.


Getting Started

Releases are available for macOS, Linux and Windows:

Some tutorials and general information on TÖVE are found in TÖVE's documentation.

Be sure to check out TÖVE's API documentation, which gives you detailed information on classes and functions.

Note: on Windows, in order to run the demos, you need to call setup.bat once (this will fix the links to the lib and asset folders, so you can run e.g. love demos/blob).

Building TÖVE Yourself

On Linux and macOS

git clone --recurse-submodules
cd tove2d
love demos/hearts

On Windows

# in git bash:
git clone --recurse-submodules
cd tove2d

# in regular cmd shell:
cd path/to/tove2d
setup.bat /C

Take a look inside setup.bat to learn more about installing a compiler environment.


Use scons --arch=sandybridge or scons --arch=haswell to compile for a custom CPU architecture. On Windows, this enables AVX extensions, which mainly speeds up the rasterizer dithering code.

On POSIX, in addition, you can enable hardware intrinsics for 16-bit floating point operations by using scons --f16c. These intrinsics might give small performance benefits in the gpux mode.

Since enabling custom options causes crashes on some CPUs (, I strongly recommend sticking to the defaults, as they ensure that your binary will run on many CPUs.


I keep my ideas of what might eventually end up in TÖVE in TÖVE's Public Trello Board.


TÖVE is licensed under the MIT license.

Details and the licenses of the included third party code are found in the LICENSE file.


TÖVE owes a lot to Mikko Mononen's excellent NanoSVG. Not only does TÖVE call NanoSVG in various places, it has also inherited some of its code.

TÖVE's API was inspired by EaselJS and PlotDevice.

The graphics you see in the tutorials and demos are by Mike Mac, Kenney and Chris Hildenbrand. The font in the demos is "amatic" by Vernon Adams.

About the Name

TÖVE is a portmanteau of LÖVE, Towards Vector Graphics and Tove Jansson, the Swedish author and illustrator of the Moomins.

Similar Projects

Download Details:

Author: poke1024
Source Code: 
License: View license

#lua #game #development #vector

Tove2d: Animated Vector Graphics for LÖVE
1.10 GEEK