4:55am - Well I'm out in the morning again, but only for two hours. I've got plans at 7am. I'm not sure what I'll do after those plans though. I might end up back here again! Heh.
For now I'm going to work on my Roguelike Game some more. I've decided to get everything operating on the timing system next, so I've got to limit taking input to when the player's turn is up, and not let the player move out of turn.
So, let's do that!
5:34am - Okay! I'm pretty sure my guy is moving in turn with his turn now. Unfortunately, I only have the one guy to test with right now. So my next step is to make another actor besides the player, which does something then passes its turn.
6:07am - Okay! I've got the Player moving on his turn, and then when the other guy, who I've named Civilian, gets his turn, the game locks, 'cause Civilian doesn't take his turn. Now to make sure that the turn taking works, I'll make Civilian take his turn, and add in some sort of resolve next events method.
6:12am - Okay! It occurs to me now that I'm not sure how I want to handle NPC actions.
I'm probably going to start it off with either a method call from WorldController or a call from WorldController to a method of the World. Either way, I'm not sure where to put the AI or command list or whatever I want to put in.
Where do the brains go?
One thing I'm thinking about is having a new type of object that the Actor has in a has-a relationship, using composition. Something like "Brain" maybe? And when it comes time for that actor's turn, it consults its' "Brain" to choose an action for it?
Hmm... That could even be a better way of determining if something is player-controlled; if it has no brain, then let the player determine it's actions.
Let me try thinking it out in steps.
The player has their turn, then they advance the turn order, and after reading that the next Actor has a Brain, it runs something like world.turnList.First.Value.ConsultBrain(), which runs the Brain's Think() function, which can be very different thanks to polymorphism. The ConsultBrain() function returns the command fed to it by the Think function, and that is the action that the Actor takes on its turn. It passes the turn, which operates in a loop.
Yeah I think that could actually work. It'll take some work to make it work though, but I think the work will make it work if I work at it.
For now it's getting close to my time to leave, so I'm going to get some coffee and a muffin, and take my medicine.
6:42am - Alright I've got my next task put in the HackNPlan and it's almost 7am so I should get going to my morning errand. Then we'll see if I work on this anymore.
For now I'm going to work on my Roguelike Game some more. I've decided to get everything operating on the timing system next, so I've got to limit taking input to when the player's turn is up, and not let the player move out of turn.
So, let's do that!
5:34am - Okay! I'm pretty sure my guy is moving in turn with his turn now. Unfortunately, I only have the one guy to test with right now. So my next step is to make another actor besides the player, which does something then passes its turn.
6:07am - Okay! I've got the Player moving on his turn, and then when the other guy, who I've named Civilian, gets his turn, the game locks, 'cause Civilian doesn't take his turn. Now to make sure that the turn taking works, I'll make Civilian take his turn, and add in some sort of resolve next events method.
6:12am - Okay! It occurs to me now that I'm not sure how I want to handle NPC actions.
I'm probably going to start it off with either a method call from WorldController or a call from WorldController to a method of the World. Either way, I'm not sure where to put the AI or command list or whatever I want to put in.
Where do the brains go?
One thing I'm thinking about is having a new type of object that the Actor has in a has-a relationship, using composition. Something like "Brain" maybe? And when it comes time for that actor's turn, it consults its' "Brain" to choose an action for it?
Hmm... That could even be a better way of determining if something is player-controlled; if it has no brain, then let the player determine it's actions.
Let me try thinking it out in steps.
The player has their turn, then they advance the turn order, and after reading that the next Actor has a Brain, it runs something like world.turnList.First.Value.ConsultBrain(), which runs the Brain's Think() function, which can be very different thanks to polymorphism. The ConsultBrain() function returns the command fed to it by the Think function, and that is the action that the Actor takes on its turn. It passes the turn, which operates in a loop.
Yeah I think that could actually work. It'll take some work to make it work though, but I think the work will make it work if I work at it.
For now it's getting close to my time to leave, so I'm going to get some coffee and a muffin, and take my medicine.
6:42am - Alright I've got my next task put in the HackNPlan and it's almost 7am so I should get going to my morning errand. Then we'll see if I work on this anymore.