loopier / animatron

Animatron for Godot 4.x <
15 stars 1 forks source link

= Animatron :toc: left

Animatron is an experimental environment (very much "work in progress") that enables creation of "visual poetry" in the form of animations and images, created in real-time through live coding. It's implemented using the open-source https://godotengine.org/[Godot engine], and communicates with any "client" application or live coding language — such as https://supercollider.github.io/[SuperCollider] — via the network, using the Open Sound Control (OSC) protocol on port 56101.

== Tutorial

Once you have installed it, you can read the link:docs/tutorial.adoc[tutorial].

== Reference

See link:docs/help.adoc[OSC interface reference].

== Installation

  1. Download the latest version for your platform from the https://github.com/loopier/animatron/releases[release page].
  2. Run the executable.

If you are on MacOS you may encounter some installation issues. See how to solve them <<MacOS,below>>.

To use Animatron you'll need some animations to work with.

Animations are just collections of .png files or spritesheets (like the ones used in videogames).

When using image collections, it gathers them from named folders, using the folder name as the animation identifier.

The default directory to store animations is: user://assets/animations where user:// depends on the system you're on:

For example, on Linux, having a collection of .png images in this directory ~/.local/share/animatron/assets/animations/whatever/ would allow us to create an actor with:

/load whatever
/create myactor whatever

This works with symlinks as well (shortcuts), so you don't need to have the actual folders in that path.

If you want to use images that are in other directories, you can change the assets path with:

/assets/path path/to/your/custom/directory

We strongly recommend using your own animations, but you can find some of ours in https://my.hidrive.com/share/jzod7tz1uq[this link].

== Usage

=== MacOS Run Animatron.app by double-clicking it. The first time you run it, it may be prevented from opening by the macOS Gatekeeper. In this case, you should right-click (or Control-click) the app and select Open. If a security warning dialog appears, click the Open button to explicitly give permission to run it (only do this if you're sure you've downloaded Animatron from a reliable source). Once you've given your permission, it will remember it for future runs.

If Animatron.app fails to run even after following the above steps, it may have the "quarantine" extended attribute set. This can happen if the program you used to download it (e.g. Safari, Chrome, Telegram) is not trusted. If you are sure it's from a safe place, you may remove the quarantine flag by opening the Terminal app and changing to the directory where you have Animatron.app. From that directory, run the following command:

$ cd ~/Downloads   # change to wherever you have the app installed
$ xattr -d -r com.apple.quarantine Animatron.app

=== NixOS To run the binary you need to install steam-run in NixOS configuration, it won't work if you add it to home-manager configuration.

> sudo nvim /etc/nixos/configuration.nixos
...
programs.steam.enable = true;

environment.systemPackages = [
pkgs.steam-run
];
...

Then the binary can be run with

 > steam-run path/to/Animatron.x86_64

== Configuration

Animatron can be run with default and user configurations, stored in .ocl files.

And .ocl file is a text file full of OSC commands.

Modify user://config/config.ocl to create a custom default configuration that will be loaded and executed every time you start Animatron.

Config files can also be passed as arguments, which Animatron will run when booting:

   $ animatron -- --file=path/to/your/config/file.ocl

Note the empty -- before --file=....

Passing a config file as an argument is a simple way to boot Animatron ready for specific sessions.

== Versions

This repo is a remake of https://github.com/loopier/animatron-godot3[Animatron] for Godot 4.x and above. Some stuff might be unstable.