Learn How To Program In Python By Controlling Grand Theft Auto 5

Learning to code is always easier and more enjoyable when you're doing something fun with it. Programmer Harrison Kinsley decided that using Python to control a game of Grand Theft Auto 5 would be a pretty excellent way for intermediate users to get to grips with the language, as well as a few powerful libraries, such as OpenCV, used for real-time computer vision.

Now, the tutorial isn't for absolute beginners — you'll want at least some knowledge about Python before diving in.

The video is also one of a series, with this first clip showing you how to get up and running. There's a lengthy introduction, so if you just want to get to the actual coding part, skip to around 4:30.

From this point it covers capturing the screen, however, the actual meat and potatoes of interpreting frame contents comes later (around parts four and five).

It's a bit slow to start, but picks up steam once the basics are canvassed. Of course, if you want to jump ahead and look at the source code, the project is available on GitHub.

Intro and Screen reading - Python plays Grand Theft Auto V p.1 [YouTube]


    I'd like to try something smaller-
    What's the best strategy for Candy Crush Soda?

Join the discussion!

Trending Stories Right Now