• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Can a bounding box be changed at run-time?

H

Harvey Weyandt

Guest
Using GML, is it possible to stretch and shrink an object's bbox dynamically?
 

Joe Ellis

Member
You can also assign it a different mask: mask_index = spr_something
Even then, the image_xyscale affects it, its abit of an outdated feature I think, there should be some update that lets you assign a mask and, I dunno, set the mask size separately from the sprite size
 

TheouAegis

Member
Not sure if I would really want 2 extra variables mask_xscale and mask_yscale...

Then again if you're using anything other than precise-shape-based collision masks, then you could just as easily do everything with simple math and not even bother with the masks.
 

Joe Ellis

Member
Not sure if I would really want 2 extra variables mask_xscale and mask_yscale...

Then again if you're using anything other than precise-shape-based collision masks, then you could just as easily do everything with simple math and not even bother with the masks.
You could have the mask set to the same as the image scale when its set, but then be adjustable
 

TheouAegis

Member
You could have the mask set to the same as the image scale when its set, but then be adjustable
How would you adjust the mask's scale? You'd still need separate variables. I understand the usefulness of it, but I also consider it just more bloat in this already bloated program; there are already at least 20 variables in every instance that I never use, then they'll go and add two more for this. That's all I'm saying. Independently resizable masks isn't a bad idea, it's just not a great idea with how GM is constructed.
 

Joe Ellis

Member
How would you adjust the mask's scale? You'd still need separate variables. I understand the usefulness of it, but I also consider it just more bloat in this already bloated program; there are already at least 20 variables in every instance that I never use, then they'll go and add two more for this. That's all I'm saying. Independently resizable masks isn't a bad idea, it's just not a great idea with how GM is constructed.
I agree, things like that could be handled differently, then you don't instantly get cluttered with those 20 variables, I was just thinking idealistically, and if you could select certain variables you wanted to be in certain instances, and it is possible, it'd just require restructuring gamemaker and then ruin backwards compatibility
 
Top