Blog Layout

PyForce

Derek Sigurdson • Jun 28, 2020

My Python Version of Alien Force

Lockdown learning was not easy for the kids. It meant being isolated from their friends and unmotivated by the dreary and downcast state of society. In an effort to empathize, or maybe commiserate, I decided to use the first month of virtual schooling to do some learning of my own.

In my previous career, I had programmed data applications in a largely Microsoft context. If this pandemic were to persist, I wanted to ensure that I could adapt to the new world a little more flexibly. I had long considered learning Python, an open-source programming language that has recently become the leading data management and mathematical analysis platform in both academia and industry.

Thankfully, Python programming is very similar to the object oriented languages I was familiar with, and added the flexibility of APL, a matrix handling language that I started my career with. In order to really have fun with the process, I selected as a project a simple video game that I played back in college.

Alien Force is a grid-based space shooter where the player faces off against drones that get progressively more advanced as you proceed in levels. Riffing off the theme of prefixing Python applications with ‘Py’, I decided that this version of the game would be called PyForce.

The back story was this: Your home PyLanet was the sole source of the much sought-after and renewable resource, PyRite. Unfortunately, shipping lanes - as delineated by the PyLons - were being infiltrated by PyRats, so the council nominated you to PyLot the PyForce and defend the right to free commerce!

I shrunk the grid down to 8x8 and added features that would make the game more engaging, including a networked version that allowed all four family members to participate in a battle royale. The way that the ships flew in the grid reminded me of rooks on a chess board, so I also made up a skin that would emulate that idea.

The code is copied on a GitHub repository, and I made my first YouTube video to describe it.

Who says at-home virtual learning can’t be fun?

Enjoy,
Derek
Pivoting a small business
By Derek Sigurdson 19 May, 2020
Pivoting of a small business from a physical delivery model to an online retailer because of the COVID-19 lockdown economy
Plans for our small business
By Derek Sigurdson 20 Apr, 2020
Dreams are a big part of the here and now
First Maple X blog post
By Derek Sigurdson 27 Mar, 2020
What to expect when not expecting...
Share by: