DEV Community

Cover image for Video Games ๐Ÿ“บ๐Ÿ•น๏ธ in Python
Bek Brace
Bek Brace

Posted on • Updated on

Video Games ๐Ÿ“บ๐Ÿ•น๏ธ in Python

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 (5)

Collapse
dogecl profile image
Alejandro A.

Hi, Bek. Nice reading! My beggining is almost the same, also with an Atari 800XL in the 90's, but I didn't code anything until a bit later with a 65XE model.
I'm a developer now, but I remember day after day of following instructions. recording the programs on tape, modifying the logic and learning new tricks. It never gets old.
Does this story continue somewhere else? I'm interested on learning more about your journey.
Have a nice day!

Collapse
bekbrace profile image
Bek Brace Author

Hello Alejandro :)
Indeed, it is magical how great endings from small beginnings [ Sic Parvis Magna ] resonates with both of us, I have a YouTube channel where I teach programming for beginner to intermediate levels and sometimes I allow advanced tutorials as well.
Like you, I follow instructions too, we all should :) if the machine accepts the 0s and1s as instructions , then we should do the same, right ?
Lately, I stopped creating tutorials and simply I sit and code [prepared of course] and just a week ago I have coded a Missile Command game in Python, and I remember I played this game a lot with my father on Atari :) Do you know Missile Command?
You can check out my YouTube channel and I am happy to have you as a friend , Alejandro : youtube.com/channel/UC7EVSn5inapL2...
Tell me more about what you do now, do you freelance or working in a company ?

Collapse
dogecl profile image
Alejandro A.

amazing! Of course I know Missile Commando, that's one of my all time favorite games! River raid, Moctezuma and others.
I will check it out (the channel).
I'm also coding games with Python, specifically PyGame. I can apply what I already know from my work into games and that is cool, the learning curve is not so steep. I would like to transfer this knowledge into a game engine like Godot when I have finished more projects on Python (GDScript is very similar).
Background: right now, I'm working as a Data Engineer and studying software engineering. I already have 4 years of experience, but I wanted to learn the "engineering" part of it.
Finally, I think I should also share what I do here on DEV, maybe it can help others too and connect with more people.
Have a nice day!

Thread Thread
bekbrace profile image
Bek Brace Author

You definitely should share you knowledge in DEV and other platforms.
Have a great day my friend.
my new instagram is theamirovichcorp and my facebook is Amir Samuel, you can find me there, happy to have you as a friend.
Cheers