Advanced Workflows
Once you have mastered basic syncing and asset packing, you can leverage Tungsten’s power-user features to build a hands-off, fully automated asset pipeline. This guide covers how to optimize your development loop, perform on-the-fly asset conversions, and integrate Tungsten into your CI/CD processes.
Live Watch Mode
Section titled “Live Watch Mode”tungsten watch is the foundation of a modern, efficient developer loop. Instead of manually executing sync for every minor change, Tungsten maintains a persistent connection to your project directory.
Any modification to your assets. Whether you are adding a new icon, updating a texture, or tweaking a sprite. Triggers an immediate, incremental sync. This keeps your local development environment perfectly in sync with the Roblox cloud.
Start the watcher in your terminal:
Image Compression
Section titled “Image Compression”To optimize for performance and reduce loading times for your players, Tungsten can perform local, high-efficiency image compression before uploading your assets. This is an opt-in feature powered by the libcaesium engine, allowing you to strike a balance between visual fidelity and memory footprint.
How it works
Section titled “How it works”Compression is configured on a per-input basis within your tungsten.toml. When the compress_options table is present, Tungsten intercepts the sync process to optimize your images locally.
This is particularly useful for:
- Background Textures: High-resolution JPEGs can be significantly compressed with minimal visual loss.
- UI Icons: Stripping metadata from PNGs ensures your icons use the least amount of space possible.
- Large Spritesheets: Reducing the “weight” of a packed sheet improves reliability when syncing over slower connections.
Why use it?
- Faster Initial Load: Smaller assets appear faster for players, especially on mobile devices or limited bandwidth.
- Privacy: By defaulting keep_metadata to false, you ensure that hidden data (like export timestamps or software signatures) is stripped before the asset reaches the Roblox cloud.
- Zero-Cloud Processing: All compression happens on your machine. Your raw, uncompressed assets never leave your computer, and no third-party services are used to process your data.
TypeScript Declarations
Section titled “TypeScript Declarations”If your project utilizes TypeScript or requires strict typing for your assets, Tungsten can automatically generate declaration files (.d.ts).
Set ts_declaration = true in your [codegen] block. This ensures that your IDE provides autocompletion and type-checking for your asset paths, preventing runtime errors caused by typos or missing files.
Meta Files
Section titled “Meta Files”Meta files (.tmeta) allow you to customize the metadata of your assets, such as their names and descriptions—on the Roblox website.
Asset Metadata
Section titled “Asset Metadata”To apply metadata to a specific asset, create a file with the same name as the asset, with it’s file format changed to .tmeta.
Example:
Directoryassets/
- logo.png
- logo.png.tmeta
Inside logo.png.tmeta:
Spritesheet Naming
Section titled “Spritesheet Naming”When using packable = true, Tungsten generates spritesheets automatically. By default, these have generic names. You can use a folder-level meta file to give them a custom prefix.
If you have a folder being packed, place a .tmeta file with the same name as the folder in the same directory.
Example Structure:
Directoryassets/
Directoryicons/
- shop.png
- settings.png
- play.png
- icons.tmeta
Inside icons.tmeta:
When Tungsten uploads the generated spritesheets, they will appear in your Roblox inventory as:
UIIcons_001UIIcons_002
…and so on.
You can read the meta file’s reference if you need more information.
High DPI Detection
Section titled “High DPI Detection”Tungsten is built to handle high-resolution displays natively. There is no need for manual configuration or settings; Tungsten automatically detects standard high-resolution suffixes (such as @2x or @3x) in your asset filenames.
Upon detection, Tungsten automatically generates Luau helper functions that allow you to toggle between DPI scales. This keeps your images crisp and properly sized on high-DPI displays without additional overhead.
CI/CD Integration
Section titled “CI/CD Integration”For teams or larger projects, you should avoid syncing assets from individual local machines. Tungsten is able to do CI/CD integration.
By utilizing the TUNGSTEN_GLOBAL_APIKEY environment variable in your GitHub Actions or GitLab CI runners, you can fully automate your asset pipeline.
-
Configure Secret
Section titled “Configure Secret”Define
TUNGSTEN_GLOBAL_APIKEYas a protected secret in your repository settings. -
Automate Sync
Section titled “Automate Sync”Add a step to your CI workflow to run tungsten sync cloud.
-
Validate First
Section titled “Validate First”Always use the
--dry-runflag in your CI pipeline to validate your configuration, packing logic, and file structure without consuming your upload quota.
Congratulations on mastering the Tungsten pipeline! We hope you have a great experience using Tungsten!