I Hope You Like This

This is where I talk about things I make. Mostly, that means game development and occasionally other programming things.


Fred Rogers is so inspiring. He went against all of trends, followed his convictions, and made something meaningful for children all across the nation.


This video is about design in general, but it has a lot of ideas and philosophies that can be relatable to game design. It surprises me how little people discuss the similarities between game and web design. Both are interactive mediums, and I feel like much could be learn from the other’s specialties. A good example is when Frank Chimero starts talking about delight. This is something that Nintendo has been specializing in for over 25 years now. Maybe I’ll write about the intersection of game and web design sometime soon.

The Battle System

I may not have explicitly said it yet, but this game I’m working on is an exploration into the turn based battle system. Rather than keeping the system tied to it’s typical RPG genre, I want to explore it on a battle-by-battle basis, which will hopefully reveal some interesting depth previously unseen in the system. One difficult aspect of designing battles given these restrictions is giving the player clues as to what they’re supposed to be doing. The following is my current solution, and I think it is more eloquent than I first imagined. Currently, I call it “The Grid” (I really wish Tron wouldn’t have coined that term, haha)

The Grid is a 3x3 square where the competitors reside. There is one grid for the opponents, and one for the player. I decided on a small size because I want very restricted movement (it’s not necessarily the point of a turn-based battle system), but at the same time, there needed to be a way to give visual cues to the player. With a small grid system, the layout of the opponents can be a clue as to how to go about the battle.

Setting up the battles as two opposing grids lead to some interesing design decisions:

  • Skills should target groups of squares on the grid, not groups of enemies.
  • Effects can be placed on squares, making opponents want to be in certain formations.
  • Allow for moving on the grid in place of using a skill. This could be used to make sure your characters are in a position not likely to get hit by certain skills.
  • Make skills effect character location. Using a strong skill may push you or the opponent to a new square. Using this in conjunction with other skills can setup interesting combinations.

Lets look at a simple test scenario

Okay, so we’re the squares. As you can see, the squares are pretty close to all being on a single row, which could be dangerous. Likewise, the triangles are close to all being on a single column. This could be an advantage. Lets say that we have a skill to knock that pink triangle back one square. If we can do this, we could use yet another skill that targets a whole column.

Of course that’s just one simple combination. Hopefully, a lot more complex and interesting gameplay can emerge from this sort of system. I’m really interested in creating a versus mode for this. It would be exciting to see two people face off within this system as opposed to player versus A.I. There’s lots of balancing that must be done for player versus player, so I suppose we’ll see how everything progresses.

Expect more info on skills and various other abilities as the battle system improves.

Examples of Good Game Design: VVVVVV

VVVVVV takes the platforming genre and turns it on its head. Instead of jumping, players instead change the direction in which the main character falls. This makes getting across any gap or bump on a path an interesting endeavor, especially when the closest ceiling might be a few screens away. Not only is the very idea genius, but the execution is perfect as well. Each room is designed to be an exploration of how to use this gravity-switching mechanic, and very rarely does the game rely on the same trick twice.

In this video, you’ll see how getting across a small bump in the path is never straightforward. This is actually one of the most difficult rooms in game. The best part is that this room would be an afterthought for a typical platformer.



The game itself is relatively short. I beat it in about 3 hours, but personally I think this is an advantage. It’s refreshing to see every single inch of a game so carefully thought out, and increasing the length of the game might have led to a lot more of the same.

VVVVVV is $4.99 on Steam, and you can check out it’s website here. At the very least, play the demo to see if it’s your kind of game.

Instant Grat Season 2, Episode 2: The Boys: The Sherman Brothers Story

Adventures in Metaprogramming

Yesterday I spent a significant amount of time working on a cleaner way to access some of the data  I had stored in some classes. Here’s a quick example:

class Character
  attr_reader :stats
  def initialize
     @stats ={:speed => 10,
              :power => 11,
              :bulk => 8 }
   end
end

This stats Hash would be a pretty standard way of storing all the stats, and because of the attr_reader, we have access to everything. Don’t get me wrong, this is perfectly acceptable code right here, but as I was writing, I found myself wanting to “simplify” a bit. I’ll show you:

#What I was writing
character_object.stats[:speed] = 12

#What I wanted to be writing
character_object.speed = 12

The thing is, what I wanted to be writing is entirely possible, for any item in the hash, with a little bit of metaprogramming.

method_missing

Whenever a method can’t be found in Ruby, another method named method_missing gets called. This means that if you define a method_missing method for your class, it’ll get called instead of the one it inherits. Here’s a proof of concept:

class Whatever
  def method_missing(id, *args, &block)
    puts "You tried to call #{id}. SORRY CAN'T DO THAT."
    super
  end
end

var = Whatever.new
var.matt              #=> "You tried to call matt. SORRY"

If you ran that code, you’d expect to see exactly what’s in the comment right before the real method_missing gets called. Notice how method_missing actually receives the id of the method called (just the name), all of the arguments (via *args), and then the block if there was one. Let’s use this to our advantage and write the getters for that hash.

class Character
  def initialize
     @stats ={:speed => 10,
              :power => 11,
              :bulk => 8 }
   end

  def method_missing(id, *args, &block)
    #The getters for the values in our hash.
    return @stats[id] if @stats.has_key?(id)

    super
  end

end

Now that we have that one extra line of code in method_missing, any value inside the hash is accessible by it’s name. Do note that I always call super at the end of method_missing. This is so that a No_Method_Error will occur should you call a method that’s not in the hash or already predefined.

These are what are called “Ghost Methods.” It should be noted that this is a rather slow process, so if what you’re doing is time-sensitive, this might not be the greatest of ideas. Instead you should check out the define_method call, and get a little creative with that.

Update: I forgot to mention that if you are going to write Ghost Methods using the method_missing technique, you’ll want to override the respond_to? method as well. Therespond_to?method allows for you to check if a method exists for that class, so the character class should now look like so:

class Character
  def initialize
     @stats ={:speed => 10,
              :power => 11,
              :bulk => 8 }
   end

  def method_missing(id, *args, &block)
    #The getters for the values in our hash.
    return @stats[id] if @stats.has_key?(id)

    super
  end

  def respond_to?(method_name)
    return true if @stats.has_key?(method_name)

    super
  end
end

This is the current standing of Wake Up. A few things aren’t mentioned in the video are how HP/MP is affected by the job of the character, but that’s stuff that will be a lot more apparent whenever I get around to creating the Menu Interface.

Instant Grat Season 2, Episode 1: Sin Nombre

Chris Hecker Interview

A lot of times game developers are people who enjoy playing the kind of adolescent power fantasy games that we have, so they just don’t think ‘I should do a game about two people who fall in love’ or whatever.  Yes, it’s hard to make games that way because we don’t know what we’re doing yet, but I think we need to start trying more.

1 year ago -

Francis Ford Coppola: On Risk, Money, Craft & Collaboration

I just finished a film a few days ago, and I came home and said I learned so much today. So if I can come home from working on a little film after doing it for 45 years and say, “I learned so much today,” that shows something about the cinema. Because the cinema is very young. It’s only 100 years old. 

Even in the early days of the movies, they didn’t know how to make movies. They had an image and it moved and the audience loved it. You saw a train coming into the station, and just to see motion was beautiful. 

The cinema language happened by experimentation – by people not knowing what to do. But unfortunately, after 15-20 years, it became a commercial industry. People made money in the cinema, and then they began to say to the pioneers, “Don’t experiment. We want to make money. We don’t want to take chances.”

A lot of what Coppola says can be applied directly to the video game industry. It’s an even younger medium, and industry has come to define it early. I’m just glad that video games have a (seemingly) much larger community of independent creators, which allows us to keep pushing the medium forward.

1 year ago -