Playing with Pygame
I’ve been moving to a new place, and at work we’re gearing up for a launch of a new product, so I haven’t had as much time as I’d like to to do my literally millions of side projects I have. But I did get a new laptop, and have managed to do some fun things recently.
I’ve joined a committee for organizing the TAG Tech Bash ( http://bash.tagnw.org/) for this year. The bash is a combo party/fund-raiser for scholarships that go to our local colleges for students in the tech fields. Since I only managed to pay for college because of scholarships, it felt like a good thing to try to do my part, whatever that may be. During the brainstorming, we agreed it’d be fun to have some sort of tech “give-o-meter” that lets us score things during the night of. Part of the bash has different local companies send teams of up to four employees, and we have a bunch of fun competitions they can all play with, and the winner gets a trophy. Last year, they were all timed events, and the fastest team got a nice custom designed award that said “Fastest” on it. The slowest team got the same award, but with the word “slowest” on it. I’m proud to say I was on that “slowest” team, and my team from that year has it proudly on display next to my cube at work.
Given as I’m a dev, and I enjoy doing programming, I swooped into action on the give-o-meter. I pretty much immediately decided to write it up in python. I love python, though rarely get to use it. And I’ve played with pyGame before, but I hadn’t got to play with it as much as I wanted. So this seemed like the perfect plan. I would make a little game that let you track scores for different teams, and have a little character move up the screen towards the finish line.
I did some focused work for a weekend several weeks ago, but then other stuff got in the way. This weekend, I finally got it up on Github, and did some extra work to make it a little more fun (added animation of the characters and separated out the settings into its own file). I have until August 17 for it to work totally up to snuff, so I plan on adding some functionality. I want to make the background a little more fancy than plain blue, and probably change the direction the characters are moving. Right now, they go up the screen as they get more points. But since the sprites have wings, it’s taking on a distinctly going-to-heaven vibe that I wasn’t really intending. It’s also not particularly fancy, visually, but I’d argue that’s just me maintaining the “programmers are terrible with design” aesthetic, and call it good. Or that I’m aiming for a “rustic” style. Yeah, totally that second one.
Part of that rustic aesthetic was achieved from using Pencil2D, a pretty fun little program I got on laptop. Officially, it’s supposed to be for 2D animators, so you can create separate key frames, view previous frames as a transparency so you can draw a frame better, and I’m sure all sorts of other fancy stuff. It turns out it also works pretty great if you just want to use a mouse to make circles and wings. I suppose eventually I’ll get real graphics to fill them in, but it worked well enough for now.
I’m also mightily tempted to get some sort of old-school arcade joystick set up so we can use that instead of a keyboard, since that’ll just be more fun. Unfortunately though, I’m not entirely sure if I’ll have enough time to sort it all out before the deadline, since I’m still a hardware noob.
Still it’s a fun project, and I’m happy to have it added as my millionth+1 project for the next month or so.
tl;dr Life has kept me busy, but I still got to make a fun python and pygame game thing. I made a thing, look at it!
Github code: https://github.com/Dthurow/giveOmeter
Screenshot of my beautiful game. Since you can’t see it, just believe me that the wings for those characters are flapping up and down.