This is a really short update. I've done some good work, but it was all on one thing and it can be explained fairly quickly.
I've made a little progress on AI. It doesn't work yet, but I've begun setting it up based on what I've read. There's now a thread that runs for each AI player and does all of its thinking. So that I don't have to worry about making things thread safe (which is both messy and inefficient), I take a snapshot of everything in play and send it to the AI to process. This is also necessary because I can't have the world data change while the AI is looking at it. The snapshot isn't 100% complete. It's only what the AI will need to do its thing. That way, I can save a little time and memory.
Before I did that part though, I made all player actions command-based. This cleans up the player interaction quite a bit. I'm liking the changes.
It's all a bit of a mess at the moment, but hopefully it will come together soon so I can build a simple AI to play against.
Thanks for reading!
clevceo
No comments:
Post a Comment