9:41pm - Somehow I'm doing even more work tonight, even though it's late. It's probably because of that dream I had last night of playing an ASCII-art space game; it was inspiring.
Anyways I'm implementing Pathfinding in my game right now.
9:52pm - Okay so I'm thinking about making a big change to the Tile class. I'm thinking about making MovementCost return the cost of moving through the tile, while taking its contents into consideration, instead of having it just return the movementCost of the tile itself. So, if it has an InstalledItem in it, it gives that InstalledItem's MovementCost, and if it has an Actor in it, it gives a 0.0f because it's impassible.
This could change the way I do a lot of my stuff in ways I can't quite predict, because I already did it a different way. But it should make the pathfinding a lot easier, and make more sense overall for other elements of the code.
So, I think I'mma do it.
10:04pm - Geez, I think I'm going to have to re-write my "MoveActorTo" method entirely. I think it'll be much shorter now.
10:20pm - It works fine with the changes I made. Yay. <3
11:11pm - Alright I've put in the Pathfinding code, but it doesn't interface with the game yet. It's late though, so I'm going to wrap up for now.
Next time, I make the pathfinding algorithm return a path, then after that I make it multithreaded.
Anyways I'm implementing Pathfinding in my game right now.
9:52pm - Okay so I'm thinking about making a big change to the Tile class. I'm thinking about making MovementCost return the cost of moving through the tile, while taking its contents into consideration, instead of having it just return the movementCost of the tile itself. So, if it has an InstalledItem in it, it gives that InstalledItem's MovementCost, and if it has an Actor in it, it gives a 0.0f because it's impassible.
This could change the way I do a lot of my stuff in ways I can't quite predict, because I already did it a different way. But it should make the pathfinding a lot easier, and make more sense overall for other elements of the code.
So, I think I'mma do it.
10:04pm - Geez, I think I'm going to have to re-write my "MoveActorTo" method entirely. I think it'll be much shorter now.
10:20pm - It works fine with the changes I made. Yay. <3
11:11pm - Alright I've put in the Pathfinding code, but it doesn't interface with the game yet. It's late though, so I'm going to wrap up for now.
Next time, I make the pathfinding algorithm return a path, then after that I make it multithreaded.