Jump to content

Frame Extruder (tile-extruder alternative)


lgibson02
 Share

Recommended Posts

Frame Extruder

total.svg?style=social

Hello, this is a tool I have created to be used as an alternative to the tile-extruder by @mikewesthad. It works in the same way as his tool except it has a gui so it doesn't need to be called from a command line and there is no dependency on nodejs. For those who don't know, the tool is used for getting around the edge bleeding issues sometimes found when using spritesheets or tilemaps in Phaser 3.  For example:

image.thumb.png.2aca4a4b86b95b12bf4f96ece29fae3e.png

Extrusion of a single tileset:

68747470733a2f2f692e696d6775722e636f6d2f

Using the default settings. Frame size 16x16 and no margin or spacing.

I posted about this tool briefly on the discord a few days ago but I figured I may as well post about it here on the forum as well so it can be found easier by people in the future.

The program runs on Microsoft .NET 2.0 which is obviously only designed to run on Windows systems. However for using this program on other operating systems, my testing on a Debian system suggests Mono is able to run it quite nicely apart from a couple of minor control size issues.

Here is a screenshot of the program running to show you what it looks like normally...

5xyw6vc.png

Usage:

Usage is very simple, before selecting an image to use as a "frame sheet" (which is just my term to describe both tilesets and spritesheets), set the extrusion options to what you need them to be. Select the frame sheet by dragging an image file into the drag area or select manually.

A table of available extrusion options and their function:

image.png.499f62116077551df4364e719355476e.png

Use In Code:

Because of the extrusion, the margin and spacing will need to be adjusted for everything to look right. If you had no margin and spacing before, margin will be 1px and spacing will be 2px.

// for tilesets... 
const tileset = map.addTilesetImage("tileset", "tileset", 16, 16, 1, 2); // for a extruded 16x16 tileset 
// for spritesheets...
this.load.spritesheet("enemy", "enemy.png", {frameWidth: 16, frameHeight: 16, margin: 1, spacing: 2}); // 16x16 extruded spritesheet

Downloads:

Source: https://github.com/lgibson02/FrameExtruder

Binaries: https://github.com/lgibson02/FrameExtruder/releases

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...