There's a wide selection from swords to spellbooks that the player can craft. There are different islands in the game that mobs spawn on which the player can kill for crafting materials and loot. Once the player has finished the tutorial there's a lot of freedom on what to do. The player will be guided through the main gameplay features with an interactive tutorial. It’s by no means complete, but it does the job for now.When first playing, the player spawns on their own islands with basic tools and materials as well as some wheat.
Grab some pixels and turn it into a lean, mean, farming machine! You can find my full project on GitHub. You can see the state transitions on the right side: Here’s a screenshot of the application running side by side with the game itself. You can add additional features that pertain to game mechanics (like, click the screen to attack, or perform combo/rush attacks, whatever your game does). At this point, we’re in the home stretch. That’s all good, and that’s what we need to pull this all together. So, we have states, we have transitions, and we can click the screen. These details are abstracted from this post, but can be found in the project itself. There’s also some other logic, like translating a screen coordinate to the actual VM coordinate, and sending the tap commands (via nox_adb) to the VM. We have to add all of the information for each state, transitions, and so on. If we find a new state, we transition out of the old one, into the new one. Here, we check each and every state, check the pixel defined in each state, and then use that to determine what state we’re in. Lets define some states:Ĭonst WINDOW_INFORMATION = This is a lot of screens, and a lot to juggle. the event screen (the stuff we’re farming).There are quite a few screenshots here, mostly covering all of the states I care about for my project. Lets take a look at some screenshots: Star Ocean Anamnesis We need to define states for each of the screens and states we care about. For my purposes, it was easier to just fake it. You’ll either want to make, or have a state machine library. This will let us get started! Hooray! Setting up your project I made two small utilities that do this by hooking into win32 using C# via edge-js (what a mouthful): So, the first and most important thing you need to do is figure out how you’re going to attach to and grab the screen state. a way to push commands to the game (we’ll be using nox_adb for this).a programming language that lets us get native window position / pixel colors (we’ll be using nodejs).an emulator, such as Nox, that will let us play games on our desktop.
If you’re interested in the actual project itself, the link is posted at the end. You’ll see blog posts along this line where they grab the screen, parse the state they care about, and do that every so often (depending on the game / action level / etc). Well, one method I’ve seen used in other, similar blog posts is read the screen state and building from there. So, where do you get started with automating a game? They’re pretty dynamic, and you don’t really have the ability to hook into most of them. This isn’t inherently bad, but sometimes they can load a ton of it onto you at once, which you’re then expected to spread out amongst several weeks. The problem, also, is that these games require a metric fuckton of farming, and therefore, time investment. It’s the kind of game where you farm a ton of resources to improve your characters and items, which is pretty enjoyable and zen overall. Lately I’ve been playing a mobile game called Star Ocean: Anamnesis.