YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
13 stars 5 forks source link

In-Game: collision_line/point/rectangle() changes in 2024.4.0 make collisions happen 1 pixel too early #5792

Closed slyddar closed 3 weeks ago

slyddar commented 3 weeks ago

Description

The o_game room_start event creates a solid [colour] on every wall tile, then cycles through every solid to cull solids which are not needed by adding 1 to the image_xscale of a solid if there is one to the right of it, then deleting the one to the right. It continues that horizontally as far as it can. I have commented out lines 30-35, which shows the files are there when xx = 0, but when it processes xx == 1 they are gone.

This method worked perfectly in every Gamemaker Beta and LTS prior, but in this version it no longer works, so maybe the scaling collisions are different in this version.

2024.4.0: image

2024.2.0 and others: image

Steps To Reproduce

  1. Start GameMaker and import the attached sample
  2. Run it (e.g., Windows VM)
  3. Observe that the coloured bars do not always match the shape of the walls underneath them

Which version of GameMaker are you reporting this issue for?

IDE v2024.400.0.556 Runtime v2024.400.0.571

Which operating system(s) are you seeing the problem on?

Windows 10.0.19045.0

Which platform(s) are you seeing the problem on?

Windows

fb3d289a-881a-4bf9-a302-7864d5578a70

jackerley commented 3 weeks ago

Hi, changes were made to collision_point, collision_line and collision_rectangle to make them consistent with how sprite collisions work. If you need to still use the previous behaviour you can switch Collision Compatibility Mode on in Game Options - Main?

jackerley commented 3 weeks ago

Actually, scratch that I've had a look and there is a change that I can make that'll keep this consistent with previous behaviour and still maintain better mathematical correctness, it'll be in the next beta

alicemoretti commented 2 weeks ago

Verified fixed on IDE v2024.4.1.142 Runtime v2024.4.1.175.

Thank you.