Split Sprite By Any Line


You must be logged in to obtain assets


Split Sprite Script is a script that provides versatile support for splitting sprite resources by a line in screen coordinates during runtime.

Perfect for physics usage!

Cuts sprite resources better than Fruit Ninja!

Split Sprite Script splits the sprite by its bounding box.

Full demo, as shown in the screenshot, included.

Script syntax:

sprite_split(spr, ds_list, spr_x, spr_y, x1, y1, x2, y2, mustintersect, complex)
sprite_split_real_dimensions(spr, ds_list, spr_x, spr_y, x1, y1, x2, y2, mustintersect)

Argument explanation:

spr             - sprite
ds_list         - list that will contain output value (the two generated sprite resources)
spr_x,y         - sprite's screen coordinates
x1,y1           - start point
x2,y2           - end point
mustintersect   - true if the line must intersect with 2 edges of the bbox, or if it's also valid if it's either touching 1 edge or is within the bbox
complex         - true if complex (fast, precise) algorithm, else false (super fast, may leave visual artifacts)

For further explanation of the script, see the screenshots.

Supports all platforms except HTML5.

By purchasing this pack, you may use it freely for all non-commercial and commercial use in your personal projects. If this asset is required in a project that is not rightfully owned by you, this asset must be purchased by the rightful owner of the project. None of the graphics used in promotional images are guaranteed to be included in this asset.

End User Licence Agreement (EULA).

Age Rating: 4+


GMS1 - Version 1.1.0. Published August 13, 2014

Added new script, sprite_split_real_dimensions, which generates sprites with pixel-precise dimensions.

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait