Friday 29 September 2017

Teemu ARRP Diary 8/3

Working on 'cave' level theme I noticed the list of rooms is not cleared when I re-create the level. It's very strange, because the routine to clear rooms sometimes work, but not always. The problem I guess here is the way I have made portals a "static" part of each level, but I think it's possible to change them. Portals come from World class where they are determined for each level, but they could be copied back to a level instance when it's re-created. When static portals are removed I could then simply delete the level instance and make a new one, rather than trying to clear parts of it.

Cave theme was also changed in a way that 'regular dungeon rooms' are now protected, so their tiles can't be destroyed by paths or caverns which seems like a better solution. Still I try to keep things simple just to proceed to next thing whatever it is.

I think my code is "clean" so to speak, but one thing that could be improved is the way I'm naming variables in member functions. They are probably often too short and not descriptive enough. I have mixed feelings about long variable names, but other than loop variables could be longer I think.

No comments: