DEV Community

loading...
Cover image for Video Games 📺🕹️ in Python

Video Games 📺🕹️ in Python

Bek Brace
Hey everyone 👋, this is Bek Brace from Poland. I teach programming on YouTube. Love coffee, ramen and Chicago Bulls!I speak 5 Human languages and several Computer languages.
・Updated on ・2 min read

The first thing that made me attracted to computers 🖥️ was 8-bit video games.
My father has presented me an Atari 800 XL in 1990, I do not remember exactly how I felt at first, but before I knew it, I was sitting holding the joystick 🕹️ and pressing that orange button trying to hit the space invaders 📺 !
Then, after a month or so, Samuel - my father - asked me to join him in writing a small program using Basic language. Naturally, I didn't understand a word, but I followed him and somehow this seemed like a mission to do something important and that I was asked by the big guy to do it. I felt so important 😀 !

Alt Text

I wrote several programs using that silver book, and the result was a bouncing circle, a flower or a sun and I was very happy, I couldn't believe that I wrote some lines and created something on the TV screen - it felt kinda magical!

Years later, 25 years later to be precise, I discovered Python programming language and one of the first modules that I loved in Python was the "🐢 turtle module" , and if you have Python installed with a proper IDE, trying to hover over turtle module, this is what you will get :

(module) turtle
Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzig and Seymour Papert in 1966.

Imagine a robotic turtle starting at (0, 0) in the x-y plane. After an import turtle, give it the command turtle.forward(15), and it moves (on-screen!) 15 pixels in the direction it is facing, drawing a line as it moves. Give it the command turtle.right(25), and it rotates in-place 25 degrees clockwise.

By combining together these and similar commands, intricate shapes and pictures can easily be drawn.

Then I started to look up codes on the internet on how to recreate the classical games that I was playing when I was 7 or 8 y.o on Atari, like Pong , Missile Command, Space Invaders, Pacman, Donkey Kong, and many more like Outlaw, basketball, Spy Hunter, Zorro..etc , and the first four were on cartridges, the rest were on cassettes [ I did not own a Disk Drive, but a gray cassette recorder where the game can load for half an hour, and very often it crashes before the end of the loading time 😭!!

My programming journey started because I loved these 8-bit video games on Atari and got intrigued and curious on how to create such games, I had to understand that computers are really dumb and they only do what you asked them to do; I had to learn everything about hardware and software - at the time - so when I will sit and start coding a game, I can imagine how the hardware is receiving my instructions in the form of 0s and 1s then give me what I want to see on the screen.

Discussion (0)