Bug #645
closed
ASCII Man Reloaded errors out any time the pac guy collides with an enemy.
Added by Brian Flanagan almost 4 years ago.
Updated about 3 years ago.
Description
The program loads and starts properly, however it crashes as soon as the pac guy collides with an enemy.
(This involves many different blocks of code - but probably has the same underlying issue.)
(See attached snapshot of one of the errors.)
Files
- Estimated time changed from 1:00 h to 2:00 h
Retested. Collisions still broken as of 9 Feb 2021.
(Tested in both Windows & macOS versions.)
Re-tested in 1.0.0 (B7). All collisions with enemy still fail.
(Added a video to illustrate the problem.)
The problem is with these 2 lines in the CHECK_COLLISIONS: section of the code
px = SCRXOFF + PCX + (PX * MAPCELLWIDTH)
py = SCRYOFF + PCY + (PY * MAPCELLWIDTH)
px,py and PX,PY are not the same because the case is different, but the result of this code is updating the PX and PY variables values.
Renaming px and py fixes the issue. I should probably not have been coded it this way, but it is valid in AOZ.
Phil
- Status changed from New to Closed
I'm not sure when, but this was fixed a long time ago! (re-tested anyway it works!)
Also available in: Atom
PDF