Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions client/src/mods/Character.lua
Original file line number Diff line number Diff line change
Expand Up @@ -586,14 +586,14 @@ end
---@param height integer height in panels
---@return love.Texture
function Character:createGarbageTexture(width, height)
-- pop and flash are verifiably "panel sized", technically filler and face should work too
local relativeScale = self.images.pop:getWidth() / 16
-- filler and face are the "panel sized" counterparts in the garbage so they are valid sprites to determine relative size
local relativeScale = self.images.face:getWidth() / 16
-- create all canvases as if we were working with the 360x240 resolution but use the canvas dpi scale to use the real resolution
-- that makes it easy to scale later as everything can be treated the same while love handles the dpi scale resolution for us
local dpiscale = self.images.pop:getDPIScale() * relativeScale
local dpiscale = self.images.face:getDPIScale() * relativeScale

-- Use the same filter as the garbage images so that upscaling looks right for pixel art
local filterMin, filterMag = self.images.pop:getFilter()
local filterMin, filterMag = self.images.face:getFilter()

local image = GraphicsUtil.renderToTexture(
width * 16,
Expand Down
8 changes: 6 additions & 2 deletions docs/characters.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,11 @@ You can use the Ctrl+Shift+Alt+C shortcut to reload character graphics in the ga

### Garbage assets

See https://cdn.discordapp.com/attachments/417706389813592068/874106744392007680/garbage_ref.png for an arrangement overview.
Before creating garbage, take a look at the arrangement overview for the garbage files.

![Arrangement overview](./images/garbageReference.png)

These 10 sprites build a unit. Using different sizes and resolutions within these 10 sprites may lead to unexpected results. It is generally recommended to provide the full set and not make use of the built-in fallback textures.

#### Filler sprites

Expand All @@ -358,7 +362,7 @@ This will get drawn on top of the filler sprites.

##### face

Sprite for the center of garbage pieces of odd-numbered height (1, 3, ...)
Sprite for the center of garbage pieces of odd-numbered height (1, 3, ...), or all of them if face2 is not provided
Aspect ratio: 1:1 (square)
Recommended size: 96x96px

Expand Down
Binary file added docs/images/garbageReference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.