Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17063

Python - pygame - How to efficiently select sprites for different rects in randomly generated map

$
0
0

Hi!

So I'm making a randomly generated dungeon and I have a sprite sheet with different walls in it (horizontal, vertical, corners, 3 way split walls etc). I'm trying to blit all my map elements properly, and I currently do this, by scanning through the whole game map, which is made of 80x60 block objects, some passable others are not. The script decides what each passable block bordering non-passable block should be blitted as. For each non-passable block it collects the data from the 8 bordering blocks and based on which of those are passable and which aren …


Viewing all articles
Browse latest Browse all 17063

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>