Post Reply 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Control game by java instructions.
02-23-2017, 04:53 PM
Post: #5
RE: Control game by java instructions.
When making bots you have 2 choices:
- simulate human by some form of shape recognition for reading(you can replace textures in-game to simple colors to make it easier) and send key presses,
- read and inject stuff from/to game memory which might not be faster to do and it will be more per-game approach, but should give more control.

You can also mix the two together.

When it comes to emulators with all their tricks and translation of console code to native to the device running it on are not the most friendly thing to mess with their memory by external tools, especially PPSSPP isn't with all it's mirrors and JIT. So you should rather learn things like that with simpler native games/apps before you try to mix in an additional complication in terms of emulation.

The simplest way to write a basic bot for PPSSPP at least imo would be to write a bunch of scripts in mips and inject it into the game itself via built-in CWCheat implementation. All it would have to do is attach to code which triggers stuff we want the bot to react on, then write some basic data to our own place in memory, then attach another script right after game checks for key presses, make it read previously generated data and react with correct key press.

A bit simpler, but similar in the concept are right analog patches, but those write data based on player analog input and react on that data with triggers so it's the opposite of what bot should be doing.

The simplest games you can write the most basic bots are all of those rhytm games since all the player does in them is pressing keys at correct time, so all the bot would have to do is to press the key when condition for rhytm was accomplished, in such case you can also just cheat simplifying it even more and just take the right branch that tells the game the key was pressed at perfect timing, instead of sending any key data;p, all of those auto-play cheats do pretty much that and it still is a basic form of bot / automatization, games "AI" aren't really true AI either, it's all about appearance and cheating here and there is great for performance.

Java or whatever else, doesn't really matter, everyone is biased towards something, I would pick mips because I can handle it better than high level languages and it also gives me more control, in the end what matters is, if you can use the language you choose, enough to write all the code you need without needing step by step guides and tutorials, because such thing might not exist.
And again interacting with emulator like PPSSPP externally might not be the easiest thing to do, if you really have to do it with PSP game and java, maybe use jpcsp, it's using java as well so you might find it easier to interact with. - Custom PPSSPP Shaders! - simple CE scripts to help creating CWCheats, - CWCheat workarounds.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Control game by java instructions. - LunaMoo - 02-23-2017 04:53 PM

Forum Jump: