-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
In hindsight, here is a list of things I could have done differently but haven't, due to time constraints:
Level
- more comments/documentation in
level.py. Currently the level generation code is a bit cryptic. - use structured numpy arrays instead of keeping them seperate. That way, I can define all the tile data on one line.
- use a helper function that check adjacent cells in numpy arrays.
- fix eclipse shaped room code. Sometimes it goes out of bound and crash the game.
ECS
- find a better way to organise Esper's long
self.world.get_componentsstatement. Not sure if using generator functions to break up nested loop will help readability. Might be better if I ignore python's <80 character rule. - when changing level, I need to keep the player and inventory items entity in esper's world object. The current code for this in
SceneManageris messy. - dublicate codes in
MovePlayerandMoveEnemyprocessors. - instead of having an inventory component on the player (a list of item entity ids), have a "location" component on the items instead. Since I removing the item's position (x, y) component to stop it from rendering, the code will be easier if I replace it with "location" component instead of dealing with inventory list on another entity. (Note: It's harder to deleting renderable component because it will loss item's character and colour information)
UI
- should have follow the tutorial and use Message/MessageLog class. Using collections.deque of tuples (message, colour) makes it a bit vague.
- refactor
RenderPanelandRenderMenuto use tcod api.
Input
- replace tcod's input handler to something simplier. Hashable Key objects in dictionary is hacky.
Save/Load
- replace pickle to something better.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels