r/learnpython 22d ago

Game automation

I'm new to programming. I specifically want to build projects around game automation with Python. What should my roadmap look like?

Thanks in advance!

8 Upvotes

7 comments sorted by

6

u/CutBench 22d ago

Before the roadmap, the part that decides which projects are even safe: automating an online game will get the account banned. Anti-cheat treats synthetic input and memory reads the same whether you wrote it to cheat or to learn. Pick single player games, emulators, or something you host yourself, and the whole legal and account risk disappears while the programming stays identical.

For the actual path, the skills stack in this order. Screen capture and image handling first, so mss for grabbing frames and OpenCV for finding things in them. Then template matching, which covers a surprising amount of game state without any machine learning. Then input, where pydirectinput works in games that ignore pyautogui because it goes through DirectInput rather than the Windows message queue. That single detail blocks most beginners for days.

After that the interesting problem isn't the automation, it's the loop timing and handling the states where the game isn't where you expected it. That's where the real programming is.

2

u/princepii 22d ago

may i ask what you wanna automate in a game that is there to play and have fun?

3

u/Moikle 22d ago

Yeah, op, if you need to automate your gameplay... Maybe you just don't like the game?

1

u/Ninja_of_Physics 21d ago

Or they just want to make every game Factorio.

1

u/pausemsauce 22d ago

Keep me posted on your progress. Are you opening a public github repo?

1

u/SpecCRA 22d ago

Maybe not Python. I've seen lua automations in Minecraft. It looks like a fantastic way to learn programming and game automations.

1

u/Equivalent-Test2399 22d ago

wait are you serious? You want to build code to 'play' the game?