Skip to content

Textures

Adrian K edited this page Jun 21, 2024 · 10 revisions

Description

Textures are used to display the levers and platforms with. The way these are build can differ based on it being a platform or lever as well as the type.

Location

This files are located in the respective types textures folder

E.g.: switchBlocksMod\platforms\sand\textures\platform_sand.xnb

Texture structure

For all lever types the texture has to be twice the width of the in-game lever, the left and right half are rendered based on state with the on state on the left side and the off state on the right.

auto, basic, and countdown platform textures are exactly the size of the in-game platform.

sand platforms foreground and background textures follow the same rules as the textures for levers, twice as wide. The scrolling texture should be at least the height of the foreground/background texture, the texture is an image with the top and bottom connecting smoothly. It is required to have at least one of the foreground or background texture set.

Example

A lever texture twice the width of the in-game lever with its states to the left and right

lever

A platform texture with the size of the in-game platform

platform_blue

A sand platform background and a foreground texture twice the width of the in-game platform and as high as the in-game platform.

background

foreground

As mentioned before the texture should connect smoothly, the red and blue line were added to clarify that these two parts will be next to each other.

scrolling