bitcraft / pyscroll

make scrolling games with animated maps in pygame
GNU General Public License v3.0
177 stars 28 forks source link

Tiles with opacity that overlap sprites render darker #46

Closed bitcraft closed 3 years ago

bitcraft commented 3 years ago

pyscroll is always drawing all layers on the first fill of the buffer. that includes layers that would normally be over a sprite. when the sprites are drawn, the buffer is drawn on the screen, then the sprites, then there is a collision check to see what sprites are under a layer...then overlapping tiles from the upper layers are drawn again. so in this case, pyscroll needs to be aware of upper layers that have partial transparency, then instead of drawing only the top layer, it needs to clear the buffer, draw all the lower layers, the sprites, then the upper layers

bitcraft commented 3 years ago

fixed https://github.com/bitcraft/pyscroll/commit/791f0a112ba01eb2ed9fb5456bb3ecdedb89fee3