Programming Games
Is this what fun is?
Every now and then I wonder if (or how much) I really like programming, or if it’s just something I do as a job or because I’ve done it for so long. Then I remember that in my free time I will play programming games.
Programming games? Games about programming. Games where you program. Some of these are more on the level of drag-and-drop commands, but some programming is like that (cf. Scratch). Some of these are way on the opposite end of the spectrum with assembly language. The one I’d like to talk about is one that’s in the middle of that range, using Python (note: not actually Python, but very, very similar — similar enough that I will just be saying “Python” here).
What is this game? It’s called “The Farmer Was Replaced”, where the concept is programming a drone to manage a farm — harvesting, planting, watering, &c. And it has a sort of “tech tree” or upgrade system where you get basically three types of upgrades:
- Directly to the drone or farm — faster movement, more area, the ability to water or fertilize crops
- More crops or better yields
- More things you can use in your programming
More things you can use? Yup! Because while I may have said this uses Python before, what it really uses is a subset of Python. And that subset grows larger as you unlock things. You want to use loops? Unlock them. You want to use variables? Unlock them. You want to use operators? Unlock them. You want to use lists or dictionaries? You get the idea.
It is really a fascinating exercise in constraints (as many of these games can be). And I am a huge fan of constraints, especially when it comes to creativity and problem-solving. Sure, there are plenty of things that act as stepping stones in this game and get rewritten as soon as, say, variables are available. But it is an interesting exercise to solve a problem without being able to use variables. Or dictionaries. And it can be a very good exercise to write something in a way that’s easy to change (or “refactor”) when a new tool becomes available.
It’s also a really comfortable and natural way to teach or learn programming, since it starts out simple — just harvest auto-growing hay on a single square — and it adds more and more as you progress:
- Movement along a line
- Movement throughout a grid
- Planting different crops and waiting for them to be harvestable
- Managing resources (some crops have costs to pay — you’re not only harvesting in order to pay for upgrades)
-
And a variety of interesting programming puzzles as you go, including:
- Sorting (in a two-dimensional grid)
- Solving a maze
- Snake game
Now, these aren’t things I need to do or know or care about in my day-to-day work. Maybe that’s what gets or keeps me interested in these games — the freshness or difference of the problems. Maybe it’s the implementation of an algorithm rather than just using what’s available — truly, I’m not going to write a sort, but just use the sort in the standard library. Maybe it’s looking at problems in a new and different way and seeing how that other perspective helps me.
Speaking of which, maybe the next time I’m wondering if I really like programming, I’ll consider how I’ll read books about learning more languages (like Seven Languages in Seven Weeks) and write up something about that.
If you’re looking for a team to help you discover the right thing to build and help you build it, get in touch.
Published on June 5, 2025