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).

Changes in 1.1.0

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

Version 1.1.0. Published August 13, 2014

Created with GameMaker: Studio v1.99.182

Age Rating: 4+

Average Rating

This asset hasn't received enough reviews yet.

Your review

You can only review assets you've bought.


Jeff J 13 August 2014

Short and sweet

Does exactly what it advertises, and does it well. The code is clean and well commented.
Also worth noting is both fast and excellent support from author; contacted him through the GMC and asked about additional functionality, and instead of just telling me how I could do it, he had an update to the script on the marketplace within 24 hours that did exactly what I wanted.

Highly recommended - there is a lot of interesting uses for this.

Package contents

Loading, please wait

What is the issue?

Back to Top