Programming
Social Viruses
by Paolo on Oct.05, 2009, under Meanderings, News, Programming
Anyone who is interested in marketing should read Malcolm Gladwell’s “The Tipping Point.” The author makes note of how viruses and epidemics are spread throughout the world, and he takes that knowledge and applies it to how social and cultural movements also act in virus-like patterns. He identifies three main patterns for viral transmission.
1) Connectors, Mavens and Salesmen (Network for Transmission)
2) Stickyness (Viral Duration and Contagiousness)
3) Contextual Shifts (Social Behavior)
Social Networking games such as “Mafia Wars” and “Farmville” by Zynga use these three patterns to great effect which results in millions of unique hits and thousands of dollars for otherwise simple games.

Careful! I'm catching!
Connectors, Mavens and Salesman
A virus’s ability to spread is highly dependent on infecting key persons within a social network and increasing the amount of exposures through that network.
Within certain social circles, there are some special people who seem to know everyone and whom everyone is friends with. These people are “Connectors.” And within the same social circles are the experts, the people whose expert opinion makes a difference in certain social fields. These people are called “Mavens.” And finally, there are those in social circles who actively endorse and push others into playing the game. These are “Salesman.”
The relationship between the Maven and the Connector is very important in Social gaming because the Maven would be the ones who would be early adopters or those who discover your game while the Connector is the one who can spread the message of the Maven to the greatest number of people.
Games such as Mafia Wars, make heavy use of this networking relationship and in some ways short-circuit it through social networking applications such as Facebook. Mafia Wars give incentives to players by constantly reminding the user to post some picture or announcements on Facebook. This is basically advertising space on someone’s status message to let his or her friends know that you are playing a game.

But... Everyone is doing it!
Sometimes the game gives accomplishments to display like badges of honor. And some social games bribe you with in-game credits for posting your announcements. There are also some games that do not let you proceed unless you have a certain number of friends playing giving even more incentive to sell the game to others. Not to mention that in-game bonuses are given to people who actively recruit others.
I need more friends...
So not only is your game automatically selling itself using the Facebook notifications and status updates, but people must also actively talk about how cool your game is and persuade others to join – especially if that means more in-game bonuses and content.
Stickyness
The lifespan and contagiousness of a virus is also key in how far a virus will spread within a network.
A good majority of the Facebook games are incredibly simple games. Most Social Network games are a combination of stat-building, empire-building, and set collection. To some extent, there are some aspects of competition between players, but the majority of these games work on collaboration rather than competition.
The games that are on the top end of popularity always play to the “obsessive compulsive” side of people. There is a compulsion for people to grow things, build things, to see objective growth and “leveling up” as well as to finish incomplete collections. And this is highly addictive. This is the reason the old Rogue-likes and Dungeon-grinds are still popular, even to this day.

Can't quit until I level up everything...
Also, to reinforce the addictiveness of these games, people are encouraged to collaborate and make announcements of what they are missing in their collections. This gets other people to help work on getting complete sets. So not only is the activity addictive, it also encourages collaboration.

I got a whole bunch of Blackmail photos from college that you could use...
Contextual Shifts
One of the big draws for Social Network Games is the collaborative and competitive aspects. There is also the built in “trophy” and announcement system. And given a sufficient saturation into the market, you have people constantly posting about your game. The idea that “everyone is doing it” is a lot of peer pressure to push into playing.
There is also the novelty that Social Games are the “new thing.” And the idea is very catching. It is a completely new paradigm for getting people to know your game exists than putting it in portals and waiting for people to come to your game. Your game is actually actively advertising itself on Facebook status messages and letting other people know that people are playing your game and showing off their trophies.
Money Making
Zynga games use a particular strategy for monetary purposes. You can directly pay the company to get credits to spend on power-ups, items or other in-game features. One of the greatest frustrations with the game is constantly running out of action points/energy you can use to complete a set of tasks or to make it to the next level or to complete a set.
The other feature they use is that they have advertisers on their site that if you click on their link and fill out their forms, you get a large number of credits to the game. So on top of direct payment, there are also advertisement revenue that these games make.
The Future
So far, not very many Flash Games are prevalent and using the Facebook API. But done correctly, this could blow open a whole new avenue of revenue streams, including micro-transactions and a new era of gaming for Indie Flash Game Programmers.
Maybe the next generation of Flash Portals should be a Facebook Apps?
Nintendo – Fun is no accident
by Paolo on May.21, 2009, under Programming
How Nintendo creates fun and lasting video games is not really a big secret. It’s hidden in plain sight. A lot of people like focusing on the “genius” of Shigeru Miyamoto as a game designer – maybe even as some kind of gaming “god” - but very few focus on his method.
From an article reporting the development methods of Nintendo at GDC ‘09:
[Miyamoto] does a prototype phase for each game that has terrible graphics. We got to see the prototype for Wii Boxing, which had just colored boxes for graphics. This prototype phase has only very few team members (maybe 2 or 3) and ONLY focuses on the interaction. “Find the fun.” There is a lot of trial and error as they look for this fun.
And from an interview from Clinton Keith of High Moon Studios’ (in an article on Lost Garden) nearly 2 years ago:
“If you want someone to fail, you want them to fail fast, before they spend a lot of money. That’s how Nintendo was. When I was working on the Dream Team [at Angel Studios], they wanted us to do this DNA-based driving game called Buggy Boogie. You had these vehicles that would eat other vehicles and adopt their powers and morph. It was really cool. But they would sign three month contracts, and Miyamoto himself would say that he did not want any documents. He would just say, “Find the fun, and I’ll be back in three months to take a look at what you have.”
We went through about three iterations of that. We busted our hump trying different things, but at the end of it, he kept coming back and saying that it wasn’t there, and it wasn’t fun. We were a new company that didn’t know how to make games. After about six or nine months, he came back and said, “You guys have really worked hard, and we see the progress, but we’re not seeing the product. But another opportunity has come up for a fantasy golf game, so why don’t you guys work on that? In three months, we’ll be back. Show us a golf game.”
So rather than getting pissed off at us and canceling the contract after two years and millions of dollars, they spent just a tiny fraction of that with a small team and said, “Well, it was just a bad idea.” It maintained the relationship with them, so we could go off and do something else.
Small teams? Iterative Development and Feedback Loops? Rapid Prototyping? This is all about Agile Development.
How many development teams start off with a huge product idea with massive story ideas and gimmick gameplay, then hit the ground running with full force teams, massive design documents, only to find out two years later when the game is in testing and about to go gold that the game isn’t even fun?

Bowser and Peach
Nintendo does the opposite. It spends the most amount of time on the prototyping stage to “find the fun.” Once they find a fun game mechanic that hits a certain critical threshold, that is when Nintendo leverages the full might of its development army to add content, graphics and tons of spit polish. The story is built around the game, not the other way around.
That is why in many Nintendo games, you don’t really see the story unless you open the manual. The game functions even without the story or an explanation on why mushrooms make Mario big or why the princess was captured by an evil spikey turtle. It’s just FUN!
It’s all about focusing on gameplay before glitz. Rapid prototyping, practice and feedback.
Actionscript 3.0 Discovery – Going Old School
by Paolo on May.20, 2009, under Experiments, Programming
One of the biggest reasons to go to Actionscript 3.0 is a massive performance boost you gain from older versions of Flash. Michael James Williams sent me this link to a forum post to prove the point:

Over 5000 Arrows at 30 fps
Mike Grundvig posted on his blog how he got this to work and after reading it over twice, it is very “old school” in how it is accomplished.
The way Flash does programmatic animation is pretty simple. You take a MovieClip instance on the screen and you simply adjust the x,y values to get it to move. Flash takes care of the redrawing of the screen for you with no flicker. What Mike Grundvig did was do all the drawing himself. Instead of using Flash to draw the final output on the screen, he takes all the calculations on the back-end, draws onto a BitmapData object and swaps out the resulting BitmapData with the Bitmap currently being displayed. In other words, he is doing a kind of low-level “double buffering” using Flash Bitmaps.
When I was a kid programming in BASIC in the Apple II+, I would wonder how computer games made smooth animations. My problem was when I created a picture and I wanted to “flip” to the next frame of the animation, I had to clear the screen and draw the next frame. The clearing of the screen caused a moment of blackness before the next frame was rendered. What I didn’t understand was how to “double buffer” which is something much lower level than I could have achieved in BASIC. I had to understand assembly language to accomplish that.
Effectively what “double buffering” does is skip clearing out the screen. Instead of working on 1 screen, you are working on 2 screens. First you draw the screen. And instead of clearing it off for the next screen, you do all your drawing logic on the second screen while the first screen is being displayed. Once drawing is completed, you simply flip from the first screen to the second screen like a flip-book. That removes the flicker effect of having to draw, erase, and draw again.
Modern graphical engines like Flash take care of this logic for you and are incredibly efficient. Thus, instead of having to figure out how to draw when you move your MovieClip 10 pixels to the right on the next frame, Flash does all the drawing for you. But it comes at an expense of CPU cycles to figure out all that drawing logic for you. You can see the effects of this drainage in Space ROX when I started adding particle effects and Asteroids.

Space ROX V 0.5
Now compare the performance of only a couple hundred particles in my Space ROX demo to the thousands of arrow particles shown in Mike Grundvig’s demo here.
Sometimes it pays to go back to the basics.

