![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
12:55pm - Well I didn't get to work more yesterday like I planned, the errands and dinner took longer than I expected, and the call started earlier too.
But I have an hour before work, so I'm going to try and get myself set up.
1:04pm - Alright first I want to take a look at the ActorFactory and see if I can decouple it from the Map. I want it to generate Actors without putting them on the map, so the Level script will have to handle passing them to the Map to be added.
1:08pm - Oh, I found a mistake in my design. The move_actor method in Actor should be in the GameMap instead. I have to pass a ton of map info to the actor, and the actor has to request info from the Map to do the wall detection. They're pretty well coupled, and they shouldn't be.
It's easy to understand though. I was thinking, "The Actor should do what the actor does, and the map should do what the map does" but really, moving things on the map should be done by the map, the Actor class should just tell the map to move it, and not worry about how.
1:24pm - Looking some more, I see that the die function on an actor doesn't remove it from the map, it only makes it invisible then deletes it. That'll have to change too.
1:40pm - I'm already low on time but there's so much to do. It's looking like a lot of my early assumptions were wrong and I'll have to redo a lot of code. But it'll be better for it! I think.
For now I'm going to get ready for work.
But I have an hour before work, so I'm going to try and get myself set up.
1:04pm - Alright first I want to take a look at the ActorFactory and see if I can decouple it from the Map. I want it to generate Actors without putting them on the map, so the Level script will have to handle passing them to the Map to be added.
1:08pm - Oh, I found a mistake in my design. The move_actor method in Actor should be in the GameMap instead. I have to pass a ton of map info to the actor, and the actor has to request info from the Map to do the wall detection. They're pretty well coupled, and they shouldn't be.
It's easy to understand though. I was thinking, "The Actor should do what the actor does, and the map should do what the map does" but really, moving things on the map should be done by the map, the Actor class should just tell the map to move it, and not worry about how.
1:24pm - Looking some more, I see that the die function on an actor doesn't remove it from the map, it only makes it invisible then deletes it. That'll have to change too.
1:40pm - I'm already low on time but there's so much to do. It's looking like a lot of my early assumptions were wrong and I'll have to redo a lot of code. But it'll be better for it! I think.
For now I'm going to get ready for work.