Bacon and Games

Month: April 2010

Learn How to Make Flash Games

If you’re looking to learn how to make a Flash game, Adam ‘Atomic’ Saltsman and Chevy Ray Johnston are coming to your rescue. They’ve recently launched a joint venture, Flash Game Dojo, which is a site dedicated to helping ease people into the world of creating Flash games. Their site aims to answer questions like “How do I add gravity to an object?”, “How do I get keyboard input?” and “Who shot Mr. Burns?”. OK, I made that last one up, plus we all know that it was Maggie. Anyway… Granted the information they’re providing is specific to using their respective frameworks, but a lot of the key concepts and programming models you’ll learn working with Flixel and FlashPunk are still relevant when building a game completely from scratch. And they’re open source frameworks, so if you’re uncomfortable using formulas without deriving them first (remember high school math?), you can open up the guts and see what’s going on under the hood of something as eerily simple as this:

// adding gravity to the player
var player:FlxSprite = new FlxSprite();
player.acceleration.y = 600;

What’s really neat about what Adam and Chevy are doing is that they’re aiming to usher people into the world of creating games. They’re NOT trying to push their respective frameworks, which as products in a marketplace would be competitors. Instead they’ve chosen to offer their work up as free open source options, a space in which they can support each other rather than compete. They’re working together toward a common goal: Get people making great games. I applaud them for that.

I have an upcoming series of articles entitled “Actionscript for Artists” which will focus on providing tools to help artists and programmers work more easily together to make games. It’ll be a mix of code samples, tutorials aimed at teaching artists the basics of Actionscript and tips on how to communicate and collaborate. I come from a more traditional Flash gaming background that uses vector art, movieClips and other techniques more native to Flash, so my focus will be on that style of Flash game development. Flixel and FlashPunk are Flash frameworks that turn Flash into an environment similar to the way old NES games were built, using sprite sheets and raster images. Though our approaches to Flash game development are different, we’re all trying to do the same thing: get people making great games. And besides, variety is a good thing. I’ve only dabbled in Flixel and though it’s a very foreign approach for me (I’m used to building everything on my own, so adhering to a framework is tough for me to get used to) I intend to learn Flixel and FlashPunk. I don’t think I’ll ever abandon the way I’ve always made Flash games, but I do like to try new things, evolve and add new things to my bag of tricks.

Flash Dojo offers a bunch of handy services:

  • A wiki with documentation on both frameworks
  • Q&A style explanations for how to build common game elements
  • Free swf hosting for people who want to quickly test and share a game… likely to be used by people who want to share a work in progress that isn’t ready to go on Newgrounds. You upload a swf and the site gives you a link to share it. It’s that simple. I’ve got webspace coming out of my ears but this is so simple I will undoubtedly use it from time to tim.
  • Articles about game design
  • Software recommendations
  • Tutorials
  • Completed game source for your learning/tinkering pleasure
  • And the bulk of their site’s updates are broadcast via RSS so you can stay abreast of what’s new

If you’re interested in game design I strongly recommend you comb through Flash Game Dojo. Spend some time playing with their frameworks, see what they can do and how they work. But remember that Adam and Chevy don’t have all the answers and they haven’t thought of everything. They will be the first to tell you that their framworks aren’t the ways to build games, they’re just two ways to build games. Learn from what they’ve done, add your own flair and if you think you have found a better way to do something you may well have. I’m sure Adam and Chevy are interested in being the starting point from which people can learn how to make games. What they’re probably NOT interested in is creating a legion of game designers who rely so heavily on Flixel or FlashPunk that the frameworks speak louder than the game experiences created with them. The idea is for people to play your game and remark, “That’s a great game!”, rather than “That’s a great Flixel game!”.

Create. Learn. Play. Question. Invent. Share.

Adam is known for games such as Gravity Hook and Canabalt which he built using the Flixel Framework, for which he is also responsible. Chevy Ray Johnston is behind Flash Punk, another Flash game framework. Both frameworks are designed to handle a lot of the heavy lifting, collision detections, ui, asset management, etc., so that you can focus on game design.

Super Mario Crossover

One of the articles I’ve got queued up to write is “The Physics of Mario”, which will be a look at the the way Mario moves, because there’s something about it that’s really unique and charming. He can perform a shallow jump, run into a long high jump and then parlay that momentum into a duck-slide to avoid an enemy. He can change direction in mid air or bounce nimbly from enemy to enemy without ever touching the ground. Mario’s variety of abilities truly makes you feel like you’re in control of a superhero. How great does it feel when you put on the air brakes and narrowly avoid that Koopa Troopa and grab the mushroom, all in one fell swoop?

<———————— this great, that’s how ————————>

Besides giving you a quality range of motion, the slightly slippery physics of Mario entice you to play the game with bravado, instead of the heavy-footed careful stepping you have to do as Simon in Castlevania. Don’t get me wrong, Castlevania is a great game but for very different reasons than Super Mario Bros.

Great, Nintendo ass-kissing…what good is this article going to do me?
Well, as I discussed in my first article The Difference Between Tetris and “tetris” and then revisited in Tips for Making a Successful Game Clone it’s very difficult to clone something as well known as Super Mario Bros., Tetris and other staples from video gaming history. You’re working with a well known property and thus expectations are high and opinions can run hot. This article is about someone who got it right.

Where most Mario clones fall short is Mario’s movement system, the physics of Mario. Mario has been copied dozens of times by the Flash gaming community (here are a few Flash Mario clones) but most of them just don’t feel right. Most of them don’t give you the ability to vary the height of Mario’s jump, because it’s easier to set a constant jump height than worry about tracking how long the user holds down the jump key. Many Mario clones will jump again if you land while still holding the jump key, which can be really annoying. This can have you hopping around like a rabbit against your will… and that’s no good. And rarer still is the Mario clone that allows you to vary your jump height based on Mario’s run speed.

Besides the physics of Mario, there are other little touches that can be easily missed:

  • The speed at which Mario rebounds off the top of an enemy or the bottom of a coin block
  • Piranha plants won’t come out of a pipe while Mario is standing next to it
  • At the right speed, Mario can run over small gaps without falling.
  • The game “pauses” when mario collects a mushroom

There are many things that have to be there in order for the clone to feel like the classic we all know and love. Sure, I ran into a few bugs…the floor was missing from one level leaving me to fall immediately to my doom, I had a few shells pass through Mario without killing him and I found it extremely odd that the run and jump buttons were reversed…but all in all Super Mario Crossover is an EXTREMELY well done clone of Mario.

The jumping, sliding and acceleration of Mario feel almost perfect. As far as I could tell the secret mushrooms and warps were all there. I even saw a mushroom jump over a small gap as they sometimes did in the original. It’s just really great to see a clone of Mario that does justice to the original. I was able to enjoy this game because I didn’t find myself yanked out of a familiar experience by something that just felt “off”. That came out snobby…I wish I was writing this with a tool that allowed me to edit my words before sending them out into the world…*sigh*.

What’s really neat about this clone, is that it’s not a clone at all. I used the term “clone” in Tips for Making a Successful Game Clone and caught a little flack for it…but in a constructive way. It was suggested to me by I-smel of Newgrounds that the term “clone” was misleading. He and others, like Luis, went into the article expecting that I was advocating unoriginality, when in fact I was exploring the challenges and benefits of having to work from an existing and familiar concept. Two of the tips I gave in that article were:

  • Play the original…ie know every detail of what you’re building
  • Have a hook…make your game different enough that users aren’t just left wishing they were playing the original

Super Mario Crossover lets you play through Super Mario Bros. in its entirety, with the option to play as Mario, Bill R. (Contra), Samus (Metroid), Mega Man (um…Mega Man), Simon (Castlevania) and Link (if you don’t know this one I’m not going to tell you…also I hate you). Each brings his (or her…sorry Samus) own control scheme, weapons and powerup hierarchy to the experience. And in most cases, each new character moves and feels much like they did in their original game, with the exception of Simon who learned how to double jump since we first saw him. This is a great addition, which falls under one of my other tips: take the opportunity to fix things from the original that frustrated you…let’s be honest, Castlevania was great but the movement was a bit irritating in that game.

It’s never been my intention for this site to be a game review site, there’s enough game review sites and users on them that there’s no shortage of opinion on the net. It’s been my intention to get people to think more deeply about creating great games and what it takes to do that. I’m not the greatest game designer nor the greatest programmer in the world, but I do feel that I’m entrenched in that world enough that I’ve got something useful to pump back into the community, be it tips, code snippets or just articles that spurn discussion and thought. I hope that some of what I put up on this site is useful to aspiring and seasoned game developers alike.

Super Mario Crossover and this article can do a bit to help people think about how difficult it really is to nail a clone of a classic game. But mostly I just wanted to take a moment to appreciate what an amazing job Jay Pavlina did with Super Mario Crossover. He had a great concept, he nailed the mechanics and as a result the glowing reviews are pouring in. Congratulations, Jay, on your success. I’m very excited to see what you do in the future.

Tips for Building a Successful Game Clone

Many times in my career as a game developer I’ve heard the phrase, “how tough would it be to build our own version of this game…?”. I’ve found myself in this situation for many different reasons. Sometimes it’s driven by a client’s desire to have their own version of a specific game. Sometimes it’s a choice my company has made in order to deliver something of high quality at a low cost to our client. And sometimes I just can’t help but challenge myself to code something neat I saw or put my spin on a game I’ve grown to love.

Whatever the case may be, it’s not unusual to wind up with the task of emulating or building on the concept of an existing game. This is especially true in the casual games space. If I see one more match 3 game I’m going to swap a bullet for my brain and hope for a big combo bonus. But since there are many reasons (all very different) you might rebuild or rework someone else’s game, I’ll hold my opinions regarding when this is appropriate and just talk about what happens once you’ve arrived at the decision to do so. In the interest of opening up on a positive note, let’s start by talking about some of the advantages.

Advantages of Working from Someone Else’s Game

  • Clients are typically not very good at visualizing a concept. Having a working version of what you’re proposing helps speed the pitch and pre-production process along considerably, which will save you time and money.

    YOU: “It’ll be a lot like this game, but with your characters instead of Mario…”
    CLIENT: “Super. Here’s a small shed filled with twenties. Quit your day job and don’t disappoint me.”
    YOU: “Wow, that was easy.” ;)
  • Having a clear picture of the final product from the start makes it much easier to estimate how long it will take you to program. Original ideas tend to evolve more than clones, because you often don’t know how a game will feel until you play it. Refining a game on the fly costs you money in the form of time. Accurate estimates usually mean higher profit margins.
  • Hopefully the game you’ve chosen to emulate has already proven to be fun, which can make it easier to sell the client on it. And more often than not, clients come to the table with a game they like and want to duplicate or build upon.

    CLIENT: “Have you played this, my kids love it!”
    YOU: “Really, your kids love Turbo Tax for the iPhone. Really? reeeealllly?”
    CLIENT: “As it turns out the closest thing I’ve ever come to playing a game is editing an excel spreadsheet. But let’s go with my game concept anyway. You only live, eat and breathe games. Here’s a dollar. Make me a version of Halo I can play on my watch.”
    YOU: “I’m going to pee in your coffee when you leave the room.”

    Just make sure the game you or your client choses to emulate is within scope and isn’t a piece of garbage.

Disadvantages of Working from Someone Else’s Game
Unfortunately, these advantages come with trade-offs. As I discussed in my article, The Difference Between Tetris and “tetris”, emulating a classic is an uphill battle. If you know the game, it’s likely other gamers will too. That means as soon as they figure out who you borrowed your idea from they’ll start comparing you to the original. If your game doesn’t hold up, you’re in trouble. On top of being compared to your game’s predecessors, you open yourself up to angry users who might take exception to your tampering with a game they know and love. And by opting out of an all-together original idea your game enters the world as a follower rather than a leader or an innovator. The good news is that if you’re smart about it these disadvantages can work in your favor.

Tips that might help your clone, tribute or adaptation to be a success:

  • Play the original. Beat the original. Learn the original top to bottom and then make sure you at the very least get the game mechanics right. People familiar with the original will have expectations, meet them and then some. If you make a Super Mario Bros. clone and don’t give the user a run button your users are going to be pissed, get frustrated and give up on your game.
  • Figure out what frustrates you about the original. This is your opportunity to fine tune some of the things that might have made the original clunky or frustrating. Super Mario Bros. was great, but not all first runs are that well polished and even that game wasn’t perfect. If you’re copying a that didn’t allow you to restart levels as quickly as you wanted to, make sure yours does it better. Improve where there’s room for it, emulate what you loved.
  • Give credit where credit is due. Gamers (and developers) appreciate a nod to the creators. It shows that you’re not trying to pass a concept off as your own, which is endearing and comforting. If you’re making a web game you’ll want to do everything you can to avoid the wrath of angry forum kiddies itching to flame content thieves. Plus it’s just plain respectful to give thanks to those who came before you. Do the right thing :)
  • Gamers are a fun crowd with a sense of humor. If you can be funny and down to earth about the ideas you’re borrowing you’ll find that your game will get a much better reception. Making a game very similar to Super Mario Bros? Have the rescued princess ask you where Mario is and have your hero respond “he’s out on a call, Koopa clogged his toilet…again”. Gamers love references, easter eggs and other quirky inside jokes.
  • If you’re making more than just a clone, have a hook. Make your version unique enough that it feels like its own game. I LOVE orange juice and I like vodka. When I have a screwdriver I usually just end up wishing it was orange juice and move on to a gin and tonic (keep your groans to yourself, Jack and Coke lemmings). If your version is only slightly different than the original, people are going to wish they were playing the original and resent yours. You need to add more than one new piece to your Tetris game in order to make people want to play yours instead of the original. Maybe you let your users rewind the game (a-la Braid) so they don’t have to live with their ill-fated decision to wait for that straight piece. What if the entire board, along with the gravity, could be rotated 90 degress? These kinds of changes maintain the mechanics of Tetris but create opportunities for completely different strategies to emerge.
  • Be smart about who you choose to emulate. It’s probably not a good idea to take on EA Sports’ Madden series. Sometimes choosing a game to emulate also means you’re choosing an opponent. If it ends up that’s what you’re doing, pick a fight you can win or at least survive. If you can’t win, can you benefit from associating yourself with the right competition…which brings me to my next point.
  • Recognize the power of generics. Drug companies know the power of this approach. They know that X number of people will always buy their name brand drugs, even though the cheaper generics are literally the same as the name brand. By selling the Walgreens brand (which is often actually made by the same company that makes the name brand and is then packaged by Walgreens) drug companies accept the fact that making a fraction of their name brand’s retail value on a generic is better than making nothing at all. So what does this have to do with games? Farmville has upwards of 80 million active monthly users. If you create a Farmville clone and expect to earn the same numbers, you’re probably setting yourself up for failure. Whether your game is better or not you’re starting 80 million users behind (is an iPod really that much better than other mp3 players?…maybe but their head start has served Apple pretty darn well.) If you instead create a Farmville clone with the expectation that you’ll get a 10% runoff from them, there’s nothing wrong with enjoying the still impressive revenue you can earn on 8 million active monthly users. The question then becomes not, “how can I do exactly what Farmville does so I can have 80 million active monthly users?” rather, “what generic version of Farmville can I offer that appeals to people who aren’t ready for Farmville but might be interested in my game/app.” (This of course assumes that you’re not trying to be better than Farmville, which is most admirable approach, but that isn’t the subject of this article) There’s nothing wrong with creating a game that feels like a widely successful game with the intention of taping into the gaming market equivalent of “swing voters”.

Certainly I’m not suggesting that it’s a good idea to go out and poach other people’s ideas. But from time to time, for whatever reason, this becomes our reality. Whether it’s our own idea, our boss’s idea or the client’s you might find yourself in that situation. When you do it’s worth your time to think about how you can use it to your advantage and what things you can do to help make it a success.

I suppose in a lot of ways this article strays from the spirit of this site, which is about making great games. Much of what’s in this article touches on the business/marketing side of making games, which isn’t really what the site is supposed to be about. As much as I’d love to just hole myself up in a room somewhere and just make great games, that isn’t always the reality of my job, though some of it is and I’m thankful for that. Regardless, repurposing games and emulating successes has been a hot subject lately so I thought I’d put some of my thoughts in writing. It’s certainly more relevant than an AT-AT made out of bacon ;)

UPDATE – 4.30.2010 – For a perfect example of someone rebuilding a game as a learning experience, read this interview with Jay Pavlina about Super Mario Crossover or my article about what makes Super Mario Crossover so impressive.

Developing a Visual Vocabulary for Your Game

Unless you’re making a game like Obey, you don’t want your game to be difficult because it’s confusing. You’ve probably got masterful level design, ingenious AI and all sorts of other neat stuff to throw at the hero. These are the things you’ll use to challenge your audience. People new to your game will be learning and trying to master your control scheme, memorizing the rules of the world you’ve created and are likely trying to keep track of as well as predict what your levels have in store for them. They’ve got enough going on, the rest of your game’s stuff should be as simple and intuitive as possible.

A great opportunity for this is in the imagery you choose for your game, particularly when it comes to collectibles, powerups, obstacles and enemies. The last thing you need is for your gamers to be pausing to recall if the balloon was good or bad. Or worse still, having them pick up the sexy ball of energy that looks like it will transform them into a god only to find themselves a bloody stain on the ground where they once stood. It’s one thing for a gamer to die at the hands of a well designed level. It’s an entirely different thing for them to die just because they couldn’t remember which things were helpful and which were dangerous.

An easy way to illustrate this point is to take a look at 2 common types of game objects: powerups and obstacles. In the most general terms, powerups have a positive effect on the hero and should be collected, obstacles have a negative effect and should be avoided. These are objects taken from 2 different games. See if you can tell the powerups from the obstacles.

This movie requires Flash Player 9

How many did you get right? If you got them all I guess you can stop reading, but I suspect you didn’t.

How do you solve this problem? There are a couple of approaches. The most basic approach is to use objects in your game that are consistent with our model of reality. Hearts, stars, rainbows (hungry for Lucky Charms yet?), coins, gems, shoes, food and generally sparkly or glowing items look friendly and make for good powerups. Spikes, fire, rabid animals, lava and ticking bombs all scream “stay away”. Certainly you can be creative with your art, but if you ground your game imagery in a bit of reality you will save your gamers from the burden of memorizing a new set of associations. They’re free to immerse themselves in your game because the “ooh I want that” and “yikes I better avoid that” moments in your game become reactions rather than decisions. And really, the fun and challenge usually isn’t in remembering what to avoid or collect, it’s in skillfully navigating to or around those objects.

If I asked you to remember these 5 names, Zack, Jennifer, Oscar, Jamie and Clark and then 2 months later asked you what the names were, you would probably have no idea. However if I asked you to remember Bart, Maggie, Marge, Lisa and Homer you would probably remember because I’ve connected the list to an existing mental model. Get it?

“But Sean, what if I want to create a game about far off worlds that have nothing to do with our reality?” No big deal, I’m not an unreasonable man. Besides designing your imaginary powerups and obstacles using elements of real-world imagery (space mines with spikes or energy pills with a soothing sparkle-glow) you can use subtle color schemes to group objects into similar types. For instance greens and blues are typically friendly colors while reds and purples are considered more “angry”. By using these colors (or whatever scheme you choose, so long as you’re consistent) your users will quickly learn that all red objects are bad and the green ones are good. Consider this new scheme for the objects from before:

This movie requires Flash Player 9

Granted these aren’t the nicest looking objects and in some cases changing the color just isn’t an option (such as the ice ball that’s now red an no longer looks like ice). It’s not my execution of this technique that’s important it’s the power of the approach. The above is just a cursory attempt at illustrating how color can suggest a theme that your users will pick up on. Certainly when you’re designing your objects you can inject color themes into them in a much more subtle and stylized manor. The Gears of War team used soft blue highlights to mark all the good guys, teammates who otherwise bore a striking resemblance to the goons you were frantically trying to blast. Mirror’s Edge, a game of agility and timing marked all the interactive walls, railings and other points of interest with bright colors that stood out against the game’s bland, meaningless background. EA recognized that the game wasn’t about hunting for the points of interest, it was about timing your interactions with them.

I don’t mean to suggest that game designers should dumb their games down or that we need to agree on green powerups across the board. Variety is good and inventiveness breeds new and exciting games. As game designers we strive to challenge our audience, but we want those challenges to come from the sum of its parts rather than the ambiguity of any individual ingredient. Whether you choose to piggyback on existing mental models or opt for using subtle color cues, it’s important to develop a visual vocabulary that will help gamers remember the rules of the world you’ve created. When walking down the street, we don’t have to stop and choose not to step in front of an approaching bus. We don’t even really acknowledge that choice. It just happens while we stay focused on the conversation we’re having and the nice weather we’re enjoying on our walk. If you can create the same level of obviousness in your game; “that fire is bad” or “that heart is good”, than your gamers are free to spend more time thinking about how they want to move through your game (the challenge) and less or no time thinking about what the objects in your game represent (the frustration).

Copyright © 2017 Bacon and Games

Theme by Anders NorenUp ↑