• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code bounding box read only variable set to integer type?


I'm not trying to be snarky, but is there some reason why bounding boxes are set to integer type while x and y are floating point real type? It was taking me forever to figure out why my collisions started behaving wonky when I unlocked my movement (I previously was using code to snip and store sub-pixel movement to isolate it from collision calculations), and it turns out that it's because my code uses those variables to check for collisions and snap to surfaces, and when my x or y is not a round number that leaves a disjoint there. Is there any plan to make these variables floating point real anytime soon or is there some reason why that can't or shouldn't be done? Either way I'll be creating customized variables to replace those, but this took me completely by surprise.


Friendly Tyrant
Forum Staff
Bounding boxes are what collisions are based off of, and since you can't check "half" a pixel, these are integer rounded. At least that's the reason I was given. :)


I mean, you can if the things would record them; you can't *draw* half a pixel, but that's another issue entirely. Games on older consoles used sub-pixels regularly - they're the bane of many speedruns in fact. It's fine though, I'm just going to use my own custom variable like I usually do. I've got a way bigger issue now that's probably going to result in me writing a new custom Draw event. You can mark the issue "resolved".
Last edited: