Closed seisatsu closed 6 years ago
The crash appears to have been due to a typo in layer.py preventing a warning from being reached. Now, we have the warning.
[33] WARNING: Layer: 0: _TileReader: Orphan gid: 100: for tile: 189
[769] WARNING: Layer: 0: _TileReader: Orphan gid: 100: for tile: 389
[878] WARNING: Layer: 0: _TileReader: Orphan gid: 100: for tile: 399
[1130] WARNING: Layer: 0: _TileReader: Orphan gid: 100: for tile: 199
Is the map malformed? We need to investigate why this is happening with this new map.
This happens any time the graphic from the bottom right corner of the tilesheet is on screen. _TileReader may not be reading GIDs in a way that is consistent with the rest of the engine.
Edit: Since the bottom right corner of this tilesheet is black, I colored it white so I could actually tell if it was appearing on screen, and it did not. Currently it appears that the bottom right corner of this (and probably every) tilesheet is unusable.
Also _TileReader should be _TileLoader in that warning message.
The issue was due to a mistaken use of range() at line 288 in layer.py.
Checkout the new branch, commit 6c5ecf8, and run with
bin/driftwood --path new
to run the testing world. With this simple code, the game will crash if the player walks more than a few tiles to the right on any layer.Engine Log: