Summary
Many people learn to program because of their interest in building their own video games. Once the necessary skills have been acquired, it is often the case that the original idea of creating a game is forgotten in favor of solving the problems we confront at work. Game jams are a great way to get inspired and motivated to finally write a game from scratch. This week Daniel Pope discusses the origin and format for PyWeek, his experience as a participant, and the landscape of options for building a game in Python. He also explains how you can register and compete in the next competition.
Preface
- Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.
- When you’re ready to launch your next app you’ll need somewhere to deploy it, so check out Linode. With private networking, shared block storage, node balancers, and a 40Gbit network, all controlled by a brand new API you’ve got everything you need to scale up. Go to podcastinit.com/linode to get a $20 credit and launch a new server in under a minute.
- Visit the site to subscribe to the show, sign up for the newsletter, and read the show notes. And if you have any questions, comments, or suggestions I would love to hear them. You can reach me on Twitter at @Podcast__init__ or email hosts@podcastinit.com)
- To help other people find the show please leave a review on iTunes, or Google Play Music, tell your friends and co-workers, and share it on social media.
- Join the community in the new Zulip chat workspace at podcastinit.com/chat
- Your host as usual is Tobias Macey and today I’m interviewing Daniel Pope about PyWeek, a one week challenge to build a game in Python
Interview
- Introductions
- How did you get introduced to Python?
- Can you start by describing what PyWeek is and how the competition got started?
- What is your current role in relation to PyWeek and how did you get involved?
- What are the strengths of the Python lanaguage and ecosystem for developing a game?
- What are some of the common difficulties encountered by participants in the challenge?
- What are some of the most commonly used libraries and tools for creating and packaging the games?
- What are some shortcomings in the available tools or libraries for Python when it comes to game development?
- What are some examples of libraries or tools that were created and released as a result of a team’s efforts during PyWeek?
- How often do games that get started during PyWeek continue to be developed and improved?
- Have there ever been games that went on to be commercially viable?
- What are some of the most interesting or unusual games that you have seen submitted to PyWeek?
- Can you describe your experience as a competitor in PyWeek?
- How do you structure your time during the competition week to ensure that you can complete your game?
- What are the benefits and difficulties of the one week constraint for development?
- How has PyWeek changed over the years that you have been involved with it?
- What are your hopes for the competition as it continues into the future?
Keep In Touch
- @lordmauve on Twitter
- Blog
- lordmauve on GitHub
Picks
- Tobias
- Dan
- Red Blob Games
- Designing Virtual Worlds by Richard Bartle
Links
- PyWeek
- Two Sigma
- Game Jam
- Richard Jones
- PyGame
- Pyglet
- SDL
- PyGame Zero
- Cocos 2D
- Doctor Corovich’s Flying Atomic Squid
- Mortimer The Lepidopterist
- Ludum Dare
The intro and outro music is from Requiem for a Fish The Freak Fandango Orchestra / CC BY-SA
Hello, and welcome to podcast.init, the podcast about Python and the people who make it great. When you're ready to launch your next app, you'll need somewhere to deploy it, so you should check out Linode. With private networking, shared block storage, node balancers, and a 40 gigabit network, all controlled by a brand new API, you've got everything you need to scale up. Go to podcastinit.com/linode to get a $20 credit and launch a new server in under a minute. And visit the site at podcastinit.com to subscribe to the show, sign up for the newsletter, read the show notes, and get in touch. Your host as usual is Tobias Macy. And today, I'm interviewing Daniel Pope about PyWeek, a 1 week challenge to build a game in Python. So, Dan, could you start by introducing yourself? Well, hi. I'm Daniel. I am a professional Python programmer.
[00:00:55] Unknown:
I work for a company called 2 Sigma, which is a hedge fund. My hobby is games programming in Python. And do you remember how you first got introduced to Python? It was in 2003, and I was doing, sysadmin things on web servers. And I'd heard about this thing called Python. I was generally programming in PHP at the time. I heard about this thing called Python, and I used it to start kind of moving files around and doing kind of sysadminy things like that. I just found it was amazingly efficient to, to to get things done in. And so,
[00:01:26] Unknown:
we're here talking about the PyWeek competition and your involvement in it. So can you start by just giving a bit of a description about what the PyWeek competition is and any background that you have about how it got started? So PyWeek is a
[00:01:40] Unknown:
a games programming contest, a a game jam in which you enter, to create a game. There are themes, that are given to you the week before the contest, and you get to think about those themes, and then submit your your votes on which your kind of preference order of of how much you like those themes. And at the moment the contest starts, you're given the winning theme from the voting. You have to write a game in a week and upload it at the end. So the the day after the competition, there's an uploading day. And then after the uploading day, there is a rating day. Sorry. A rating 2 weeks of rating in which you, get to play all of the other games, and submit your ratings for those games on 3 categories, which are fun, production, and innovation. At the end of all of that,
[00:02:27] Unknown:
a winner is announced in a team category. So that's all of the entries that have more than 1 person and an individual category, which is, all of the other ones. And when I was looking through the rules, it seems that the only people who are allowed to judge the games are people who actually took place in the competition so that you, don't end up in a situation where everybody who is interested just decides to pile on, and there's, some measure of investment in the overall competition to make sure that the people who participate stay involved through to the end. Yeah. Well, that that's right. Yeah. You,
[00:03:00] Unknown:
if you I I guess the the carrot, for, participating is to be able to play and rate the games.
[00:03:08] Unknown:
And it doesn't appear that there's really any particular prize for winners other than just the prestige
[00:03:15] Unknown:
and recognition for having created something that other people enjoy? Yeah. You're you're in it for the you're in it for the kudos. So, I have won it 3 times, and I've I've told many, many people about my, my wins. It's, you know, I I'm very proud of having won it. Can I, sorry, can I skip back a bit? Because I didn't describe how the competition got started when you asked that question. So PyWeek started in 2006, and it was started by Richard Jones, who is well known in the Python community. He's involved in running PyCon Australia, and I think he's interested in games programming. And so he created a competition called Py Weekend. It was I think it's basically run with exactly the same rules, and shortly afterwards, ran another version of the competition, and then moved the whole thing over to a Django website. And that Django website still surmises until today. So there have now been 25 competitions, and now the next 1, which coming up in October, will be the 26th. And how did you first get involved in the competition, and what's your current role in relation to it? I first got involved in the competition in 2010.
I had taught myself to program games before ever having participated in a PI week. So I was programming games in c plus plus, and I discovered Python, and it wasn't long after discovering Python that I tried writing some games with Pygame. And from there, some people told me about, PyWeek. And a few years went by where I never kind of got my act together to actually enter, and then I entered. And it's just such a buzz. You you program for a week solidly, and then at the end of it, you have something that is fun to play or hope you hope it's fun to play. So over the past 8 years, I've continued to, participate, and, I've maybe had a dozen entries in that time. But I am now running the competition as well because, Richard step stepped away, and somebody else took over, and he's recently stepped away. So, I'm now an avid PyWeek participant, but also, organizing the competition.
Although organizing the competition really just involves, picking some themes and, putting up the vote and announcing the, the dates,
[00:05:38] Unknown:
and the competition more or less runs itself. And so Python has a few different libraries and tools for being able to write games in, but it's not really known as being something that's used for some of the more, widely distributed widely distributed and widely played video games that people might know from their various consoles or computer games. So I'm curious, what are some of the strengths of the Python language and ecosystem in terms of being able to develop a game that would draw people to want to use it for participating in PyWeek versus some of the other ways that they might be engaged in writing their own games? Well, of course, Python is well known as a very slow language.
[00:06:20] Unknown:
And so Python code will execute slower than c code, and the way we get around that in Python is by using, good lang good libraries that do the the heavy lifting in faster lang faster faster codes. And then in we can couple all of those together in Python and produce a a game in much less time than we could if we were doing it all, in you know, from scratch in a a low level language. That said, the games well, games engines have come a long way, since, I started programming games in Python, and you could get started very quickly with something like Unity.
I think, 1 of the things that is attractive about Python is it's a great language for beginners. And so for Pywik, I think 1 of the niches is being really accessible to beginners and sort of taking your first steps in, games programming and perhaps your first steps in writing faster libraries, that work with Python.
[00:07:23] Unknown:
And 1 of the constraints of the competition is that all of the code that is included in a game must either be available to everybody who would like to participate at least a month ahead of time or written specifically during that 1 week stretch. So I'm curious, what are some of the common libraries or run times that people might take advantage of in terms of being able to build those games and, some of the difficulties that participants might encounter while they're trying to put something out in that short time frame? So the 2 that I have used most heavily are Pygame, which dates from around 2000,
[00:08:01] Unknown:
and Piglet, which dates from around 2006. And, pygame is bindings for SDL, which is simple direct media layer. So that gives you the ability to, blit so effectively use software rendering to copy images onto the screen. That's called blitting for historical reasons. Piglet is Python bindings for OpenGL, and that has that is using hardware rendering, but it has the ability to do sprites and, but also with fast rotations and transparency. And you can also introduce OpenGL code to 3 d or any other effects that you want. But built on, pygame, there are libraries like pygame0. That's my own library for, educational well, education and teaching, games to beginners.
It's also useful. It would be useful to me because it saves a lot of time in getting a a the kind of structure of a game setup. And built on Piglet is something called Cocos 2 d, which is actually world famous as a, an iOS library. But that was Python was the original, and then it was ported to iOS and became famous from there. So you could use Cocos 2 d as well. And so what are some of the shortcomings
[00:09:19] Unknown:
in the available tools or libraries that are available for Python when it comes to game development versus,
[00:09:25] Unknown:
some of the other run times that people might target such as dot net? 1 of the the big problems, the perennial problems for for Python game development, and PyWeek is, distribution on multiple platforms. You really have to attack those problems yourself in Python. There are tools available, things like py installer, but you will have to build an installation on Windows and build 1 on Mac and build 1 on on Linux. Linux, actually, is possibly easier just to put something on PyPI and let people download it. So, yeah, distribution. I guess the other problem with the libraries of Python is that there isn't a great 3 d engine for Python. There are some bindings for some SDKs for, for doing 3 d rendering, but most of those are incomplete or difficult to build. So most of the libraries available for Python are good for doing 2 d games. And there have been some 3 d games that have have been created, but those have mostly been created for Pyweek, from scratch. So whereas if you were doing some something in Unity, you would have a full 3 engine at your disposal immediately.
For Python, you're probably dealing with raw open gel,
[00:10:39] Unknown:
and that obviously takes a lot of time to do, versus using an off the shelf game engine. And given the fact that the time frame for the competition is so short, I'm wondering how that manifests in terms of the types of games that people attempt and some of the, most interesting or innovative ways
[00:11:01] Unknown:
to overcome that constraint in terms of how they build the games and what the end result happens to be? Yeah. Well, of course, in a game jam, you are against the clock, and therefore, you have to use your time carefully. So I think you will be successful in Pi Week if you can come up with a clever idea that is well scoped to the time available. So, you know, an innovative game mechanic that you can build into something that is fun, rather than trying to do something that is a simple game mechanic and requires a lot of content to to make it enjoyable.
[00:11:34] Unknown:
And for people who participate in Pi Week, are there any cases where submissions to the competition continued to be developed and evolved after the competition closes?
[00:11:46] Unknown:
I have certainly done that on a few of my games. So, I won in 2012 for the game called doctor Korovich's flying atomic squid, and it didn't have all the features that I wanted. So this is a physics game, and, I just wanted to have balloons and tails and things on the, on the squid. But for the most part, when I finish competition, and I've been programming for 7 days solid, I'm kind of, I'm I'm pretty much done with it.
[00:12:17] Unknown:
You never wanna look at that code again because of all the shortcuts that you took.
[00:12:21] Unknown:
Yeah. And during Pywik yes. So your code in Pywik might start very clean at the beginning. And by Saturday, Saturday is always the last day. It always runs from, starting on Sunday and ending on Saturday night, in UTC. So the code that you write on Saturday is just the worst possible code because you're cramming features in. And then that last hour before, the the deadline, is you know, all bets are off. You just hope you don't introduce a bug right at the last minute. And are you aware of any games that were created or started during Pi Week that eventually ended up being commercially viable in some fashion? I don't think I am, but I know that some of the Pi Week participants have gone on to be commercially viable. So, I know 1 of the early participants went into the games industry. I don't think he programs in Python anymore, but, he, learned some skills in PyWeek.
[00:13:17] Unknown:
And so given the fact that it is such a short time frame and most people who are participating don't necessarily have a full week of vacation that they can take, and they have other responsibilities throughout their day. I'm wondering, particularly from your experience, how you structure your time within that week in order to be able to ensure that you can complete your game and have a satisfactory result. Well, I always say that you don't need a whole week to to write a game. Py week is a week
[00:13:44] Unknown:
partly to give you more time to participate even if you're doing other things. And winning games have been written in an afternoon. So, you know, on on the last day, somebody comes across PIWeek and, thinks it's something they can do, and and you can win it in a day. But I always take the time to to spend the whole week on it, and I that's not that's outside my working week. So, I kind of put all of my spare time during that week into into pie week. My, wife doesn't see me at all. We have, like, a pact where she will, keep me fed during the week, as long as I spend time with her afterwards, especially.
So, Yeah. I if unless there's, some event that I can't get out of, I'll be I'll be there for every every day of PI week. And then, that gives me 2 days either side of the working week and all of the evenings. And, of course, there is the theme voting week. So you have 5 themes in the theme voting week, and you can't program. But that's not time that you can, where it is time available to think about the themes and start getting your ideas together so that when the the contest starts, you know, and you a theme is announced, it's like, for this theme, well, we're doing that game. And then that saves all the time of,
[00:15:11] Unknown:
what actually is the game that we're doing for this theme. And what are some of the most interesting or unusual or innovative games or aspects of those games that you've seen submitted to Pyeweek over the years?
[00:15:22] Unknown:
It's a great question. And my mind's gone blank of all of the previous games. The most fun game that was ever entered in in Piwik, the or they in fact, specifically, the game that was rated rated highest for fun was a game called Mortimer the lep lepidopterist, by an entrant called Cosmologican. And, it was such a simple game because you are a, butterfly collector, and you only have you start with a couple of skills, which are jump and turn, and you and these are mapped 2 keys on the keyboard. So you're jumping around, and this is, on, a kind of flat flat surface, and there are butterflies fluttering around you. And you can, jump and, then you you turn and then you can nab.
So nab is swing your net. But it turns out by, so so you start jumping and nabbing, and so on. And, you get to the end of the level, and you unlock, an ability. And the ability is something like, spin or something like that. And then you realize that you can put this into play. So you jump and then spin, and then nab, and the spin slows down your fall, or possibly unlocks the ability to double jump. And so you're slowly and as the levels keep coming, you unlock more and more abilities, and you're able to chain all of these things in a certain order. So not necessarily all of the orders will work, but you're working out the order to to press the keys in order to keep Mortimer in the air for as long as possible and nabbing all of these butterflies and moving towards them. It's it's a lot of fun. It's a very clever mechanic that just stems from,
[00:16:57] Unknown:
this this combination of abilities. Yeah. That definitely sounds pretty wild. It's amazing how, interesting people can make something with such a limited scope and, limited time frame versus Yeah. Some of the games that you see that are produced over multiple years that just end up falling flat because they either overthink it or, it it just fails to sort of hit the target market or it's just too derivative.
[00:17:23] Unknown:
Well, that really is, I think, 1 of the the things that you can learn in a game jam is the kind of things that you can that that are fun and are simple. So the cosmological has entered many, many times, and he has he's won quite a lot of times. And I think his games are getting more clever, and, you know, creating better experiences using simpler code, as a result. So, just the experience of entering into PyWeek and, you know, learning what makes a game fun and learning how to create a game efficiently, is 1 of the things that you can you can discover.
[00:17:59] Unknown:
And the submissions to all the game jams are visible on the website as the source code for those also submitted as part of the entry so that people who come across them later can either, just play the game themselves or look through and try and learn some techniques for being able to incorporate into their own projects? So generally, yes. People upload
[00:18:21] Unknown:
their source for their games and you just run it with Python. There's only a tiny minority of games that have been uploaded in some sort of binary form only, or some some other kind of package.
[00:18:33] Unknown:
So so, yeah, most of the distributions are just zip files or Python code. And when I was looking at the website, I noticed that there are also diary entries that are created by the different entrants, and there's also a discussion forum for people who are participating to be able to converse back and forth. So I'm wondering how that plays into the overall dynamic of the competition as far as, the types of entries that people might submit into their diaries or the types of difficulties that they encounter or some of the general themes of conversation that you've seen take place within those forums?
[00:19:08] Unknown:
I think the the but the diaries are an important part of PiWeek, because that is what makes it a competition where you are working alongside other people or, you know, competing with other people rather than just working on your own project. And, of course, you are most of the time working on your own project, but you can see the other games developing, and that is what makes it feel like a a contest, or like a like an event. So, I think that's what I get most out of seeing the the diary entries. But, of course, you can talk about the challenges that you've had and how you solve them, or you can post about problems that you're having, and people who are also speaking in PyWeek might help you out with, some solutions to some of those problems.
[00:19:54] Unknown:
And as you mentioned, the PyWeek competition has been running for a number of years now. So I'm curious how it has changed or evolved over that time frame.
[00:20:03] Unknown:
Almost not at all. So, I think the rules of PiWeek are we're currently running the 2010 version of the rules of PiWeek. And, so I think those rules are also they were they were based on rules. This time, in week 26, for the first time, we haven't changed the rules, and that is that the ratings will be not anonymous. So when you post a rating previously, it was secret, and people just saw the scores that you gave and the comments that you made. And in Py week 26, your your username will be posted against those comments. And what that means is that well, you have to be kinder.
So, in order to make it kind of, a more friendly place, I think it was time to to kind of remove the veil of secrecy, of course, keeping all of the secrecy from previous competitions. And, I think that before that happened, some of the comments could be a little bit nasty at times or not nasty so much, but after somebody spent a week working on an entry to to sort of dismiss it in just a few words is,
[00:21:20] Unknown:
a little bit too harsh. And I imagine too that by having the usernames attached to the criticisms would also help in terms of the overall learning process because if you have a particular question about why they might have that sentiment, you can then potentially follow-up and ask them for clarification as a means of personal improvement so that you can then try and do better in that specific area going forward. Yeah. That'd be great. I'd I'd like to see that. And, of course, if you are getting feedback from, many time previous winner, you might take that kinda seriously. And do you have any particular hopes or plans for future competitions as it continues into the future, either for your own submissions or for the competition itself? For my own submissions,
[00:22:06] Unknown:
I I guess I don't have particular hopes, but I hope to keep learning as a programmer and keep creating new things. And it is an outlet for my creativity. So, you know, between pi weeks, I'm constantly thinking, oh, I've got a little idea for a for a project. I really hope a theme comes up in pi week where I can where I can do it. Pyweek is a competition. I really just hope it keeps running and, people keep participating because I think it is a a great place for people to hone their skills, and to create games writing technology, you know, libraries, frameworks.
[00:22:47] Unknown:
And so as you mentioned, the next competition is gonna be starting in a few weeks in the middle to end of October. So for people who are interested in either learning more or participating, what is involved in actually taking part in the competition, and what's some advice that you might have for people who are considering it or are maybe on the fence about whether they have the necessary skills to take place in the competition?
[00:23:12] Unknown:
So to enter PiWeek, you go to pi week.org, and you register an account. And once you've registered an registered an account, it will give you the ability to register an entry for an upcoming competition. You should do that. You can post a diary entry immediately talking about what you're thinking of doing, and that will give some something to for people to respond to, and, you know, advice if you if you have any questions. Make the best use of the theme voting week. So, you know, I have in the past kept, notes on the games that I want to to create, or a Wiki. If you are working in a team, it is really crucial that you communicate extremely well what your ideas are because often if you start on the the theme is announced and, you have your first team meeting on the Sunday. And it turns out you all had very different ideas than chaos reigns. So so you have to communicate very clearly. So that might involve drawing, little sketches.
And then when the contest starts, you should have some idea of what the tasks are immediately, but you need to keep a constant task list and keep burning that down. And so, you know, crossing things off and adding new things as as they occur to you. And you should aim for maybe complete completeness much earlier than the next the end of the competition. So you should aim for completeness maybe Monday or Tuesday. And so that gives you the rest of the week for for polishing your game. So another thing you should do is write diary entries. I write diary entries every just 1 per day. So at the end of programming for for a day or late at night whenever I decide I've had enough and want to go to bed, I just, my last step is to take a couple of screenshots and write a diary entry of what I got up to. And all through that time, I'll just be browsing the other diary entries and,
[00:25:08] Unknown:
keen to see whatever news is coming up. And as somebody who has taken part in the competition, so many times, what are some of the areas of personal learning or personal improvement or lessons that you've encountered during the course of the competition that you have found to be most valuable? I think I found working as a team,
[00:25:29] Unknown:
to be surprisingly difficult, in in PyWeek, and I work as a team as a professional Python programmer. But as a creative endeavor, you have an extra challenge, which is to, bring in the creative input of a whole team of people, but to actually create something cohesive and fun at the end, of it. So work as a team. I think the other thing, is actually creating a game in a week that is fun. The the whole, arc of a week's programming, where for the first half of the week, you are busily trying to get create a game that works. And then at the end of the week, we're trying to turn all of that into land that into something that is, an actual Pybeak entry that is complete, and is fun, is a a really difficult time management problem.
So, I I guess I've learned, quite a lot about just general project management from having to fit writing
[00:26:36] Unknown:
a fun game into a week. And are there any other aspects of PyWeek or the, game programming ecosystem in Python or anything around this topic area that we didn't cover yet, would you think we should discuss before we close out the show?
[00:26:53] Unknown:
Let me read through the notes. No. I think we've probably covered everything.
[00:27:00] Unknown:
Okay. So for anybody who wants to follow you or get in touch about, anything we talked about here, I'll have you add your preferred contact information to the show notes. And so with that, I'll move us into the picks. And this week, I'm going to choose a podcast I've been listening to for a little bit called The Architect Show, which is just a really well done interview show that covers a lot of, very technical aspects of business development and the data ecosystem, and it's just, very well done and well thought through. So I've been enjoying that. And so if that's something you're into, it's worth checking out. And with that, I'll pass it to you, Dan. Do you have any picks this week?
[00:27:42] Unknown:
I have a website that I go to for lots of the games programming out. Start again. A website that I go to for lots of the games programming algorithms that I use in Pyeweek is redblobgames.com. And it has, kind of walk throughs of how the algorithms work, and it has interactive demonstrations of those algorithms, that work in the browser. So, you can interact with them and really get a feel for how they work, as well as having the code available, possibly at the bottom of the article or throughout the article to, walk you through how to create those algorithms.
So that's a fun 1. And in the last Pi week, I wrote an MMO, a web based MMO with Python as the back end, and I forgot a key rule that you should never write an MMO. It requires way more content than you need, and there are loads of problems to solve such as things with, economy and player different kind of players who have different things that they want to get out of the game. And I actually I I'm kicking myself because I read a book called designing virtual worlds by Richard Bartle, which is a a massive kind of textbook all about designing MMOs and it goes into such detail on so many aspects of it. So if you're interested in in writing MUDs and MMOs, redesigning virtual worlds by Richard Bartle.
[00:29:10] Unknown:
Alright. Well, thank you very much for taking the time out of your day to discuss the work you've been doing with PyWeek and your experiences as a participant. It's definitely a very interesting competition and 1 that I'm glad exists in the Python world to help foster a continued capacity for people to be able to write new games in Python because it's a great on ramp for people who are interested in programming. So thank you for that, and I hope you enjoy the rest of your day.
[00:29:36] Unknown:
No problem. Nice talking to you.
Introduction and Guest Introduction
Daniel Pope's Python Journey
Overview of PyWeek Competition
History and Evolution of PyWeek
Daniel's Involvement in PyWeek
Python in Game Development
Common Libraries and Tools for PyWeek
Challenges in Python Game Development
Types of Games in PyWeek
Managing Time During PyWeek
Innovative Games in PyWeek
Diary Entries and Community Interaction
Evolution of PyWeek Rules
Future of PyWeek
Advice for New Participants
Lessons Learned from PyWeek
Closing Remarks