Python as a platform for games

24/07/2017

I got thinking after my last post of why I chose Unity, and could Python be an option as a language to build games?

I have much more need for Python on a daily basis… although I’m currently limited to ver 2.7 at work, I do use it for the current Feed2Twitter Raspberry Pi setup.

So for the past few days I’ve been digging around searching for material and tutorials to play with.

One impressive example comes from a post on the Ubuntu Forums from over 7 years ago:

I was experimenting with Python over the last week, and I made this example app for various 3D stuff. I titled it PolarisGP, and I was making it with lax intentions of making a flight racing game. However, in case I lose interest, I’d like to put it out there for posterity.

It includes some examples of pretty cool techniques:

  • Basic linear algebra
  • Quaternion rotation
  • Axis/magnitude angular velocity
  • Display lists
  • .obj file loading
  • Efficiently extracting “up,left,forward” vectors from a matrix
  • Using an inverse matrix (in this case, from a quaternion) to create a camera system

Thanks CurvedInfinity wherever you are now 🙂

I’ve uploaded the code to GitHub as it’s easier to share… & I wanted to get more familiar with the hosting code: https://github.com/gamer-geek/PolarisGP