YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
21 stars 8 forks source link

Enhanced Collision Masks: Animated Rectangle (automated/manual), additional rectangles. #4021

Open iampremo opened 1 year ago

iampremo commented 1 year ago

Description:

A new type of collision mask for sprites, similar to "Precise per Frame", but faster. It would calculate rectangles around the rough shape of the sprite for each frame. That way you'd combine the benefits of an per frame collision with the speed of a rectangle collision. The manual version would be similar to rectangle, but it should be possible to change the settings each frame.

Also adding more then one rectangle per sprite would be a nice feature, since it would allow to make more complex collision shapes without the need to use "Precise" or "Precise per frame". Adding additional values to these rectangles (tags, numbers, something like that), which could be read during the collision event or if you check for a collision via function could be an additional parameter. For example if you differentiate between collision with the environment, attack and defense collision masks.

Benefit:

I am working on a metroidvania with many enemies that have weak points (often animated). Currently I have to work with different, invisible sprites and hurtbox objects to get the desired effect. Also editing the collision masks in the same software would speed up the workflow immensely. Currently I have to use other tools to create mask for receiving damage, mask for attacks, then manually adding them to the characters that use them. This way you'd have a single sprite with all collision information in place.

KeeVeeGames commented 1 year ago

Kind of related YoYoGames/GameMaker-Bugs#4296

BananaFaction commented 10 months ago

This exists in another game engine and they could copy it at least in terms of how it's interacted with in the sprite/frame editor https://tkool.jp/act/en/manual/05_04.html