Was Python the Right Choice?

Choosing a language is a long-lived decision, choose wisely!

Sometimes when starting out on a software development endeavor, people ask “What language should I use?” as a common question. If one were to ask this question in a Reddit forum, for instance, there are many different answers but it always ends up with a response like “it depends.” Throughout the journey of creating a…

Project management is a very difficult task. In fact, managing any human endeavor always presents varied and complex challenges that largely come right down to behavior. It goes without saying that a well-functioning team can achieve great things when team cohesion is high and the vision is well-understood. The most important job of a project manager is to take a team of people, who may or may not work well together, and turn them into a high-functioning team through various techniques. I’ve learned that I don’t yet possess those talents and it has been a struggle to bring the team together. 

On a positive note, I have discovered some excellent features in the tools that we are using which have made my development workflow and managing project tasks much easier. In GitHub Projects, you can create individual tasks on the task board and assign them to a team member. This isn’t that revolutionary given that it’s a project management tool. However, the useful integration is with the Visual Studio Code GitHub extension. Once a task is assigned, I can go to the GitHub extension, choose a task to work on, and it will automatically create a local branch for me to begin work. It names the branch according to my username and the issue number, which takes a lot of the guesswork out of what the branch is for. It also helps to keep me on task and write better project issues so that each issue can become a future branch. When work is complete on that issue, I can make a pull request right from the GitHub extension, wait for the GitHub Actions to finish running, and merge the pull request right in VS Code. Finally, once the branch has been merged, I can also delete both the local and remote branch in one button click. This has greatly simplified a lot of the back and forth I used to do.

As we near the midpoint of this term, I began looking forward to some of the future assignments like the Project Midpoint Archive. It was in the instructions of this assignment that I began to realize I would need to be able to “distribute” the game once it’s finished. Not that I hadn’t thought about it before, but I hadn’t really thought about it until I began this assignment. At first I wasn’t too worried because I figured, “Hey, Python is a really popular language, how hard could it be?” Well, I discovered there are a bunch of different ways to do it, and again, like language choice, the answer is “it depends”. We started our project with the Poetry package manager and it was doing a great job for development work. It also has a build system that can create Wheel files and TAR files file package distribution. Now normally, if we were just building Python modules that would go into a package repository to be consumed by another project, this would be perfect. However, this game relies on JSON files for loading in information about the rooms, the items, and so on. If we distributed the game as a Wheel, for instance, after installation, none of the JSON files were placed near the game and it had a lot of problems. 

At this point, I decided it would be a good idea to try and find out about other package management systems and tools to distribute Python code. I came across a few strong contenders with PyInstaller and Briefcase but in the end I decided that neither one really does what I want it to do. Briefcase appears to be a good tool for projects that incorporate graphical features such as projects built with PyGame. PyInstaller seems to do well for simple projects, but becomes hard to configure as projects grow more complicated. Neither of these would handle the JSON files and so the executables would throw errors saying they couldn’t find the files. After reviewing installer documentation for about 3 hours, I realized just how much the language affects the project. I have used other languages for work, C# for instance, and distributing a C# project of this complexity is very straightforward and works every time. Now distribution isn’t the only factor, but can certainly influence the direction of the project especially if it is to be a commercial success where distribution and installation are mandatory. This isn’t a deal-breaker, however. It just means that I may end up needing to find some combination of approaches that will allow for a simple and smooth experience for a user. 

Despite a few challenges along the way, I’m quite confident that this project will be a success. At the beginning of the project, all I could see was “create a game”. But, after spending some time working on the project and watching the structure grow and change, I can definitely appreciate the term “game engine”. I never really gave it much thought before, but essentially we are building a very small scale text-based game engine that could be used for multiple adventure games. This was somewhat difficult to envision at first, but now it’s becoming much more clear. After graduation, I would like to take what I’ve learned on this project and try to build a text-based adventure game engine using F#, a language that I’ve recently grown to love.

So, was Python the right choice? Well, if you haven’t discovered it by now, it really just depends.

Print Friendly, PDF & Email

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *