2 unstable releases
0.5.0 | Jan 25, 2022 |
---|---|
0.4.0 | Jan 23, 2022 |
#353 in Games
98KB
2.5K
SLoC
Smaug
Smaug is a tool to manage your DragonRuby Game Toolkit projects.
Installation
Manual Installation
You can download the latest version from the release page.
Linux
Arch Linux
Smaug is on the AUR.
Mac
Install with homebrew.
brew tap ereborstudios/tap
brew install smaug
Windows
Install with scoop.
scoop bucket add ereborstudios https://github.com/ereborstudios/scoop-bucket.git
scoop install smaug
Other Operating Systems
We do not maintain packages for any other operating systems. You can use Cargo as a package manager.
- Install rust through your package manager or with rustup
- Run
cargo install smaug-bin
Usage
smaug 0.4.0
Matt Pruitt <matt@guitsaru.com>
Create games and share packages with the DragonRuby community
USAGE:
smaug.exe [FLAGS] <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
--json Returns JSON
-q, --quiet Silence all output
-v, --verbose Displays more information
-V, --version Prints version information
SUBCOMMANDS:
add Add a dependency to Smaug.toml
bind Create bindings for c extensions (Pro only)
build Builds your DragonRuby project.
config Displays your current project's Smaug configuration
docs Opens DragonRuby docs in your web browser
dragonruby Manages your local DragonRuby installation.
help Prints this message or the help of the given subcommand(s)
init Initializes an existing project as a Smaug project.
install Installs dependencies from Smaug.toml.
new Start a new DragonRuby project
package Manages your DragonRuby package.
publish Publish your DragonRuby project to Itch.io
run Runs your DragonRuby project.
Starting a new DragonRuby project
- Download a copy of the DragonRuby Game Toolkit from either Itch.io (standard) or the DragonRuby website (pro).
- Install your downloaded copy of DragonRuby:
smaug dragonruby install ~/Downloads/dragonruby-linux-amd64.zip
. - Create a new project:
smaug new my-game
thencd my-game
. - Edit your project's configuration at
Smaug.toml
. - Run your game:
smaug run
. - Build your game:
smaug build
.- Builds will be stored in
my-game/builds
.
- Builds will be stored in
- Publish your game:
smaug publish
.
Migrate an existing DragonRuby project
The following instructions assume your project lives at ~/projects/dragonruby-linux-amd64/mygame
.
- Move your game's directory outside of the DragonRuby directory:
mv ~/projects/dragonruby-linux-amd64/mygame ~/projects/mygame
. - Install your version of DragonRuby:
smaug dragonruby install ~/projects/dragonruby-linux-amd64
. - Add smaug to your project:
smaug init ~/projects/mygame
. cd ~/projects/mygame
- Edit your project's configuration at
Smaug.toml
. - Run your game:
smaug run
. - Build your game:
smaug build
.- Builds will be stored in
my-game/builds
.
- Builds will be stored in
- Publish your game:
smaug publish
.
Install a package
- Edit
Smaug.toml
:[dependencies] draco = "0.6.1"
- Run
smaug install
- Add
require "app/smaug.rb"
to the top of yourmain.rb
.
Package Sources
# Smaug Registry
name = "version"
# Directory
name = "path/to/package"
# Zip File
name = "path/to/package.zip"
# Online Zip File
name = "https://example.com/package.zip"
# Git Repository
name = "https://github.com/example/package"
# Git Repository Tag
name = { repo = "https://github.com/example/package", tag = "v1.0" }
Creating a package
- Run
dragonruby package init
from your package's directory. - Edit your package's new
Smaug.toml
file to configure the package. - Add each of the files that are needed for the DragonRuby project.
requires = [ "lib/library.rb", "lib/library/other.rb" ]
- Publish your changes.
Install Files
You can install files into the game project from your package.
[package.installs]
# "location in package" = "location in game project"
"tiles/grass.png" = "app/sprites/grass.png"
Dependencies
~26–40MB
~687K SLoC