When linking to these pages, please use the URL:
www.iki.fi/sol/ - it's permanent.
TMDC20 results are out. First place.
Here's one I did not finish.
My most viewed video on youtube is my "Bookworm Aimbot", where a bot I wrote plays bookworm and is pretty good at it. I figured at some point that I could make a sequel to that, which plays Bookworm Adventures instead.
First order of business was to get the dictionary the game uses. Unlike with Bookworm, the dictionary wasn't conveniently as a separate (if slightly encoded) format. I figured the dictionary needs to be in memory, so I ran the game, dumped the memory using Process Explorer, and wrote a tool that finds the dictionary words and dumps them into a text file. According to some wiki about the game, Bookworm Adventures 2 knows more words, so their dictionaries are different; if I ever go that far, I would have had to extract that dictionary too.
Next up, I needed to deal with the OCR. I took screen caps of the tiles, which are both different size and have a different font than what Bookworm used. The font is more OCR-friendly, and no particles are drawn on top of the glyph either, making the OCR way easier. After some tweaking, I got it to recognize the tiles perfectly. No preprocessing filters needed or anything.
Working somewhat smarter than last time, I used the RegisterHotKey API in windows and bound my bot to run if control-f1 was pressed, and to die if control-f2 was pressed. This way if I ever lost control of the bot, I could just kill it with the hotkey. Except when I made a bug which ended up not ever checking window messages, of course, and I had to cycle through another account to kill the process. Yay. But overall, much smarter.
I wrote routine that looks for the best possible scoring words (biased towards longer words in case of a tie), and a routine to enter the word and submit it.
And then I stopped.
The game is just annoyingly slow. After every move the bot made, the game would play a slow animation before it could continue. Couldn't even rapidly play through the dialogue, there's a speed limit there too. I guess I could have beat the world record in fastest play-through, but I didn't really feel like it. I don't think the resulting video would have been all that interesting.
On top of that there's some special stages which require different tactics (like answering riddles) which would have required a lot of code.
After that I started looking for other letter tile games I could play and/or attack, and there doesn't seem to be a lot of these out there. I did (re-)discover Bonnie's Bookstore, which is also a rather old game at this point, but since popcap was bought by EA, I couldn't re-download the game anymore (yay DRM). I did contact the original authors who sent me a new key but that didn't work, so.. dunno.
Some minor spoilers here. Game story is not discussed, some game mechanics are.
The Sexy Brutale simplifies the idea a lot, but it's still there. The location is relatively small and there are only about twenty agents in the game. On top of this, there are some characters that don't really have any agency, and could be considered interactive furniture.
The second big simplification is that the player's agent doesn't interact with the other agents directly. Interaction is indirect, you manipulate items or press a button or some such, and that changes things.
Third simplification is that the agents don't really interact with each other either (except for the obvious killer-victim interaction).
Fourth, you can only change one thing (that matters) at a time.
All that said, there's still a lot there; repeating day cycle, picked up items returning to their original locations when day restarts, a lot of actions only possible at specific times of the day, learning what's going on in order to change things. For example, if you know the key code to a door, you can open it. But you first have to find it out. Once you do, there's no need to go through the trouble of finding out again, just run to the door and go.
One idea I really like is that you can change the location from where you start the day, which reduces the frustration of having to run through the same set of rooms every time the day starts. What I really dislike is that you have to wait several seconds for your character to get up every time you re-start the day before you can move. It's a small thing, but it's annoying.
The audio design in the game is also great. Different locations in the game have different audio, different soundtrack, but key events during the day play at the same time, so you learn to intuitively know what part of the day you're in. When you spy the agents talking to each other they sometimes mention these things too, like "was that a gunshot?".
When I was thinking of this kind of game I always started from the idea that the agents would be based on some kind of generic AI which knows how to do basic things like getting from A to B using whatever is the most convenient way (i.e, take the bus), and on top of that they would have a script of events they should try for ("get to work by 7am"), with some logic ("if no car keys, don't use car"). But it doesn't need to be that complex, like The Sexy Brutale shows.
The stuff I talked about in the old blog post - social billiards - does make things a bit more complex, but with limited number of agents it should still be totally manageable. Would need a lot of planning (basically designing a graph to see what affects what), but.. doable.
To make the workload smaller, the locale could be selected so that it makes sense that only a few people are about, like they did in The Sexy Brutale, such as an off-season ski resort or maybe a cruise ship. It's also not necessary to be able to affect all agents, some might come out of buildings the player can't access and leave the same way, for instance.
I'd also make it so that the player can retry things later in the day. Kinda like with save games, but if you manage to gain knowledge or a skill, those things you could keep. When restarting the day, you could pick the time where to rewind, and the game would act as if you had played exactly the same way up to that point. Plus, of course, an option to just idle for N hours if you're waiting for something specific to happen.
The AI logic would still have to be much more complex than in The Sexy Brutale, because, let's say someone comes home and finds you standing in the middle of their living room... the agent should definitely react somehow.
I believe it would totally be possible to implement. The big question is, would it be fun to play? I guess that depends a lot on the stories the game would tell.
Let's hope 2018 ends up better than 2017 was.
Not that 2017 was all bad. But it could have been better, overall. In 2017 I dabbled with doing some consulting on the side (which my full-time work contract is fine with), which then was abruptly moved aside because, after applying for years, we became foster parents. Which naturally took all of my free time and added tons of stress, but it's not all bad.
I spent most of what was left of my free time just going through steam backlog or similar low-stress things. I did manage to get the minimal things done, though, like the new year demo:
I also entered the 20th TMDC, but the results for that are not yet out, so... expect another blog post.
Talking of blog posts, I really should blog more, even though I doubt many people read these. Maybe that'll be the thing I'll try to do more this year. We'll see..