Introduction to Sprite City

el_bearduno's picture

Well, here it is! Time to talk about Sprite City. TL;DR version: Sprite City is a game development learning tool. I know that when it comes to learning how to program you have more options than can be counted. I want to preface this with some advice for anyone who is learning now:

Don’t spend too much time trying to figure out where to start. Just find a tutorial and GO! 

I say this because I’ve seen too many people, like myself, spin their wheels when trying to figure out what tool or language or platform to learn how to program. In the end what’s important is just that you get moving and learn literally anything. You’ll need to learn many tools and platforms before you even realize benefits or develop opinions. 

Before I ask anyone to waste their precious time learning with Sprite City, let me tell you a little about the background. I first got involved in teaching in 2011 when I volunteered to be a TA at a summer camp for a professor I took graphics with at ASU. He needed help and I needed references. Since then I’ve developed lessons for and taught 5 summer camps. It’s something I fell in love with. 

In 2012, I landed an awesome contract teaching for the Intel Ultimate Engineering Experience. It was a six-week program where college students who attended would get to learn several facets of engineering and I got to lead the week on software engineering. The only prerequisites were that the students had to be in a degree program related to any of the engineering facets taught. This meant that some students had no programming experience and some had 2 years of an software engineering degree. 

This is when I created the first implementation for Sprite City in XNA. The goal, set by Intel overlords, was for students to group up and create something they could create by the end of the week. At first I wasn’t sure weather Sprite City would work. 5 weeks later we had over 60 student projects created with Sprite City. Here is a playlist of all the games that I was able to round up. 

Games Built with Sprite City

Then, in 2014, I was invited to teach part of a summer camp using Processing. I decided to use the same approach and rewrote Sprite City in processing script and away we went. Then, in 2015 I was invited back to help teach at the same camp, only this time it was Unity3D. “So why don’t we just keep writing Sprite City,” I thought. I mean what kind of programmer would I be if I didn’t constantly rewrite code.  

Today there are five implementations of Sprite City. 

Frameworks Implemented So Far

  • Unity (C#)
  • Unity (JS)
  • Unreal (Blueprints)
  • Processing
  • XNA

What is it, though?

The idea of Sprite City is to create a template with common game “sprite” patterns implemented as intuitively as possible. The purpose is to promote self driven exploration. For example the game has several entities each named “Something Sprite” with an image that also reflects the name “Something Sprite.” Here is a screenshot of the first frame:

Sprite City - Screenshot

Once the game is started each of the entities starts behaving as their names imply. Key Move Sprite moves when you press the arrow keys. Tracking Sprite moves towards Key Move Sprite. Computer Sprite wanders aimlessly wondering what life is for. 

The idea is that a person using sprite city to learn might think “Hey, I want to see how Computer Sprite works” or “I want to create a projectile, how does Shooty Sprite do it.” Next it should be easy for them to search for what they want. For this reason there is a script for each entity with a name matching the entity. Like this for Unity:

Sprite City - Scripts

Additionally, I like that it looks bad. I purposely have the template play bad as well. For instance, most of these objects move very slow and are grueling to actually use. The effect is that students using for the first time want to fix it. If I had awesome textures in here a student may feel less accomplished when they add their own texture as it wouldn’t improve anything. If the movement speed was tuned perfectly and someone changed a value they would just make the game worse. That is the opposite of what I want to encourage. If you go figure out how to make a change, you should be rewarded. So far, this philosophy seems to work pretty well. In a teaching environment it’s great because I might get a question and be able to direct a student to place in the template that explains they question simply with code they can play with. 

And it’s Open Source!

To wrap it all up I have this hosted on GitHub although I manage it very sporadically. The format is something like this:

The basic idea is that this personally has worked well for me as a game teaching template. Additionally, with more implementations it could become a sort of “Hello World!” for Game Dev. If anyone is ever interested in contributing or adding an implementation of your favorite game framework feel free to contact admin@tinyphoenixgames.com.

Lastly here is a Playable Demo of the template.

Add new comment

Basic Editor

  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain Text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.