What tech stack for building a little Python game?
May 16, 2016 9:16 AM   Subscribe

I'm going to build a simple RPG in Python with my 14yo nephew. Most of the point is for him to learn Python. He's had programming concepts but is very new to Python. What game engine / technology stack should we use that helps us build a fun game but also keeps his head mostly in Python and not in the game engine?

My nephew is very smart and very into video game design and development, but at 14 he's had no exposure yet to "real" code, just puzzle-block-style languages. I pitched the idea of the two of us writing an RPG together, and he's really into it. My Secret Nefarious Plan is for him to learn a lot of generalizable coding knowledge, with the fact that we happen to building a game as the honeypot that draws him in. Bwahaha.

I'm competent in Python and I think it'd be a good language for him to learn, so Python it is. I figure I'll build all the "glue" code and hand him well-scoped assignments to build. But I've never built a game in Python before. I need some help picking a technology stack for the project. Here's my wish / constraint list:

* Yes, Python.
* Gameplay-wise, I'm thinking in terms of the original Wizardry, Might & Magic, or The Bard's Tale -- turn-based, minimal visuals, simple combat mechanics.
* I do want to be able to put characters on the screen, move them around a bit, make some basic fight animations. It doesn't need to look great.
* I don't want either of us to spend a lot of time on those graphics nuts and bolts. Even canned visuals are fine, to an extent, as long as we can customize them.
* Game engine must be free-as-in-beer
* Ideally, it should be easy to install/bundle, so my nephew can share the game with his friends

So far, I'm leaning toward PyGame.

I'm also interested in particularly good "intro to Python" websites / tutorials to point him to before we get started, since he'll be starting almost from square 1. The only reason I think this is even possible is because he's extremely self-motivated and learns best by figuring out his own stuff with help from examples.
posted by gurple to Computers & Internet (6 answers total) 14 users marked this as a favorite
Yeah, PyGame is what I'd use.

It happens that Learn Python the Hard Way has an exercise in it that involves writing a simple RPG. You might have a look at it.
posted by kindall at 9:32 AM on May 16, 2016 [3 favorites]

Ren'py is an add-on to pygame for visual novels. It would take some more work to do the rpg-y stuff but it can post backgrounds and characters on top of it. An rpg light would be pretty easy to do with it. It would save a great deal of time compared with writing all that yourselves.
posted by bonehead at 9:42 AM on May 16, 2016 [1 favorite]

The simple RPG looks like a great example to send my nephew, kindall!

And Ren'py looks like it might save us a lot of time and distraction. I'll play around with it and see if it will let us do everything I want to.
posted by gurple at 11:35 AM on May 16, 2016

this is language-agnostic opinion...i think it's worth considering what-it-is-you-think-he-should-know-about-programming. the type system? variable declarations? flow-control? procedural programming? data structures and algos? python doesn't really open a conversation about scope and accessors. the 'game' context might be useful, but what's the aim?
posted by j_curiouser at 2:12 PM on May 16, 2016

Good points. My aim is to give him the confidence that he can build something worth building in a 'real' programming language. I want to open the doors for him to explore programming in a classroom setting, especially since programming is a big part of what he thinks he wants to do with his life.

So at this stage I'm not so worried about the fact that Python won't teach him about strongly typed variables or memory management, for instance. I'm mainly concerned about streamlining the experience (for both of us) and building something that's fun.
posted by gurple at 4:05 PM on May 16, 2016 [3 favorites]

Another option would be one of the "text adventure" languages like Inform. The tutorials and worked examples on that site are amazingly good. The wealth of games out there with the system is mind-boggling. Inform, through various complicated and twisty ways, is kinda sorta (related to ) the same system used to write Zork and all the Infocom games of the 1980's.

That's very much it's own thing though, and certainly wouldn't be as useful or transferable as learning Python would, IMO. Ren'py is a framework but it's still Python.
posted by bonehead at 3:18 PM on May 18, 2016

« Older (Eastern) European Vacation   |   help me learn to love green juice! Newer »
This thread is closed to new comments.