Edern76 / DementiaRL

A WIP roguelike written with Python3/TDL set in a dark-fantasy universe.
Other
8 stars 3 forks source link

Possibly performance hungry statements #8

Open Edern76 opened 7 years ago

Edern76 commented 7 years ago

A lot of statements are checking through all currently existing GameObjects (e.g to find which ones are on a specific tile), which could maybe (or maybe not) cause performance issues in the long-term. Therefore, it would be benefical to find an alternative to these statements, though it's not a priority at all right now.

Example of one of the said statements :

for object in objects:
        if object.blocks and object.x == x and object.y == y:
            return True