You can download the podcast here…
Or listen to it here…
You can download the podcast here…
Or listen to it here…
VetRanch allows the player to purchase items. These can take the form of animals, decor, buildings, or even some extra land. Persistent data is becoming a growing trend in flash games, giving the player an in-game currency and allowing them the ability to purchase items and have them still there when they come back to play again the next day. It’s little things like this that increase the fun and replayability of the game.
The store in VetRanch offers the player extra experience when they purchase the item, this is one of the ways that the player can help raise their level in the game.
To trigger the building of an item in the store, we use the following IsoMap function:
setCurrentBuilding(ref:int, type:String, cost:int)
The reference is the unique id found in the itemlist.xml file talked about earlier, the cost is obviously how much should be deducted for building the item once it has succesfully been built. The type variable is what we’re interested in, this is what we use to determine how the item should behave.
For instance, if we set the type to “item” then it will behave exactly like a static item as we would expect. However, if we set the type to be “zoo” then it will take on the characteristics of an animal.
Placing an Item in the Store
Once we have inserted a new item into the game, we need a way to add it into the store so it can be purchased and placed on the players map.
The store currently loads the decoration information from the storedecorations.xml, which has a typical format of:
<item fl=’3′ f=’5′ p=’500′ i=’isopics/statue1.jpg’ uid=’31′ box=’0′ xp=’1′ pt=” t1=’0′ t2=’0′ >Statue 1</item>
<item fl=’10′ f=’5′ p=’500′ i=’isopics/statue2.jpg’ uid=’32′ box=’0′ xp=’1′ pt=” t1=’0′ t2=’0′ >Statue 2</item>
<item fl=’1′ f=’0′ p=’10000′ i=’isopics/pool.jpg’ uid=’30′ box=’0′ xp=’1′ pt=” t1=’0′ t2=’0′ >Pool</item>
<item fl=’10′ f=’25′ p=’250000′ i=’isopics/mediumhouse.jpg’ uid=’43′ box=’0′ xp=’1′ pt=” t1=’0′ t2=’0′ >Medium House</item>
The two important attributes we’re interested in here are the “uid” field, which links directly back to the uid specified in the itemlist.xml file earlier, and the “i” attribute which links to a thumbnail image of our statue. “p” is also of importance, and refers to the price that the item will be sold for.
To add in our large statue, we could place something along these lines in the .xml file:
<item fl=’3′ f=’5′ p=’500′ i=’our_statue.jpg’ uid=’4′ box=’0′ xp=’1′ pt=” t1=’0′ t2=’0′ >Our Statue</item>
Now our item should appear in the decoration tab in the store, and can be purchased and placed into the game with no additional compilation of the main game needed.
The game also comes with a clothes store to give the player compete customisation over their appearance in the game. Feel like dressing your character in the style of a certain adventurous archaeologist? No problem.
By letting the player dress their character any way they please gives them the much needed ability to express themselves and this helps them to truly get hooked into the game. All of the characters clothing can be externally loaded, this means we can add hundreds of costumes into the game, giving the player no end to the possibile combinations to choose from.
The clothing store is fairly self-contained, and can be shown or hidden by calling the following two functions Main.as.
If you’re wanting to play around with how the clothing store works, open up AvatarShop.as, this is also where we can set the prices of the various hair styles, tops, bottoms and shoes along with various other details.
The first thing to understand when working with an Iso World is how to generate an isometric grid. This will become very useful when it comes to developing items or flooring for the game.
As can be seen, Fig 1.1 is a 2D grid that we start off with. The first thing we need to do is rotate this grid by 45 degrees, then squish it in half in to what is shown by Fig 1.3. This will give us an isometric grid to work with.
The default size of tile we will be working with is 86.2×43.1 pixels, as specified in the IsoMap.as file. This can be obtained by taking a 50×50 pixel square, rotating it the 45 degrees and reducing the height by half.
In order to best develop a standard that we will work with in the Iso World, we will be placing the 86.2×43.1 pixel tile at the (0,0) point in a flash file. For larger IsoItem’s, these must be extended downward in the appropriate direction as illustrated here:
It is really important that these dimensions and positioning are followed in order for them to be displayed correctly when loaded into the game, and for the sorting to work as expected. We have now extended both the xlen and ylen to be of value 2, and have a 2×2 IsoItem basis to work with:
We can make this loose guide into anything we choose, for example this overly sized statue might fit perfectly into a 2×2 IsoItem tile slot:
Now all that’s needed is to delete our tile grid and we have a 2×2 IsoItem ready to be inserted into an Iso World.
In VetRanch, all items are loaded into the game when the Iso World is generated at run time, so we need to save this as a seperate .swf called our_statue.swf.
The next step is to upload this information to our .xml file, so that the game knows where to find the information on the new IsoItem we have just created. Every item in the game must have a unique identifier, and should appear in the itemlist.xml file. Opening the .xml file you will see lots of items listed, it should look something like this:
<item uid="1" type="item" loc="isoitems/1.swf" frameno="1" xlen="1" ylen="1">This is item #1</item>
<item uid="2" type="item" loc="isoitems/1.swf" frameno="2" xlen="1" ylen="1">This is item #2</item>
<item uid="3" type="item" loc="isoitems/1.swf" frameno="3" xlen="1" ylen="1">This is item #3</item>
The attributes of a single “item” is given by the uid (the unique identifier), loc (location of the item), frameno (the frame number that the item is on) and the xlen/ylen, these are the two values we’ve talked about. For our statue they will both take the value 2. Finally, this is followed by the items description.
Next, by taking the next unique identifier (we’ll take the number 4 for this example, assuming there are only 3 other items in the list) we might have something that looks like this:
<item uid=”4″ type=”item” loc=”our_statue.swf” frameno=”1″ xlen=”2″ ylen=”2″>Our statue!</item>
Now that the game knows our item exists, where to find the image of it and the size of tiles it will take up on the map, we will need to place this item in the store so that it can be purchased and placed in the game.
Special items such as animals are handled in a particular way. Animals in the game follow the same standard of set up that normal items do, however in order to control the seperate animation behaviour they were given a slightly extended set up. First of all our animal must exist on one frame and be given the instance name “animal” as shown:
As you can see, the elephant is a 2×2 IsoItem, and is positioned exactly the same way an item is. Now, if we dive into our “animal” movieclip and see how the animation is set up on the timeline:
We can see the three main frame labels we’re looking to have, “standing”, “moving” and “eating”. These three frame labels will get called at the appropriate time for the animal. The rest of the process is exactly the same as adding an item, except that it should be placed in the storeanimals.xml file.
Over the following set of articles we aim to give you all of the information you’ll need to create your own flash based social MMO.
For the most part we will be targetting Facebook. Facebook’s 400 million active users makes it an ideal platform to target. Their Flash API allows us to connect with the player and encourage them to share the experience with their peers. Allowing the player to interact and solve problems with their friends can help make for fantastic gameplay.
VetRanch is an example of an open source MMO aimed at Facebook that takes part in an Isometric setting, where the player engages in the exciting role of being a vet. The player must raise animals, care for them and release them when they have been nursed backed to health. We will be taking a look at the VetRanch code, and the way the game is set up and then use this as a basis to help you create your own MMO.
The “Build a Social Game in 3 Days: Make an MMORPG On A Social Network” book is now on Amazon.com
You can check it out here…
Overview: In this game you grow crops in the jungle, chop down trees in the jungle, send animals to friends…you guessed it, in the jungle. It’s a little buggy, not too terribly for something in beta, and doesn’t keep the player occupied for long, but my beef with this game is that it tries to bring together the zoo game’s “save an animal” mechanic and the farm game’s farming mechanics, but the whole thing feels really unnatural and stupid.
Premise Issues: According to the opening of the game, you’re lost in the jungle. Why, then, is there a store? Why are all your friends there? And where did this baby come from (and why is your response automatically to give it to a friend instead of taking care of it yourself)? Presumably, the game designers are hoping the player won’t ask any of these questions. There are certainly no answers in the game.
Innovations: This game has a lot going on. It is the first farming game I’ve seen with stamina points. I’m not completely sure why they included them, since the player runs out of money and has to wait for his fields to grow well before he runs out of health. The game does include things like scorpions which randomly appear. The player can pick them up, losing health but gaining xp and money. But they don’t appear often enough to run a player low on health, even at the start of the game.
There’s also wood, which is used to make fire. Fire allows you to play even when it’s dark out. The inclusion of a mechanic where the player has to use resources just to keep playing seems like a bad fit for the casual market, especially if the game counts “darkness” by the player’s actual location; many players play only after dark.
The game also includes a save button, which in my mind is less an innovation and more of a step back in time. Other games are saving constantly. This one apparently doesn’t save unless you tell it to.
I honestly like the idea of integrating games that limit some actions by your physical stamina and others by your funds, but right now this game doesn’t have the mix right, and frankly I think they should be separate features of a single game world. That is, if you are going to make a game with both health and cash as limiters, you shouldn’t have them limiting the same activities. Have the player able to spend health to go exploring, or cash to build up his local farm area.
Virality: This game uses essentially every viral aspect I’ve seen on Facebook, all at once. It asks you to post each time you level, frequently has animals (or babies, apparently) show up in your patch of jungle which you then send to friends, also has you find “endangered” species of plants and tells you to “save” them by sending them to friends (again, the reason you can’t plant them yourself eludes me), and has a point leader-board for you and your friends so that you can compare virtual net worth at a glance. While each of these techniques is solid and proven, this game currently has the “animals and plants to send to friends” happen too often; I feel bothered rather than philanthropic.
One idea is to have the frequency of found animals/plants scale with the number of friends you have playing the game. If I have twelve friends and get about four gifts to give out in ten minutes of gameplay, I still feel like the gifts are rare. If I have only two friends and get four gifts to give, I feel like my friends are somehow getting a better deal than I am. Scaling the frequency isn’t that realistic, from a game-world perspective, but it is likely to give each player about the number of gifts they want to give out.
Clever Feature: The animals you buy make an animal noise when you click them. Thus, a goose isn’t just something to grow from hatchling to adult and then sell; it’s a piece of visual (and auditory) interest for your plot of land.
Monetization: Like most farm games (and make no mistake, Jungle Extreme is a farm game), this game does a good job of pointing you to their Paypal and credit card receivers when you click on something you want to buy and don’t have the money. They also have many items mixed into their regular fare that can only be bought using “credits,” which is money that can’t be earned in-game. They start you with enough credits to buy one or two of their special items, a very savvy business practice for promoting addictive behavior.
They have also affiliated with several groups (such as Netflix), so that players can take trial offers of other products rather than spending cash directly.
I believe the idea behind the inclusion of stamina is that they can earn extra money if people are spending credits on stamina-recovery items. If that’s the plan, they definitely need to make stamina run out more quickly. Right now, I just can’t see myself ever running out of the stuff.
Blake talks about building hit social games on Facebook like Zombies, Vampires, and Werewolves
You can download the podcast here…
Or listen to it here…
Now that you have a basic game out the door, let’s talk about some of the subtle things to keep in mind as you improve the game…and let’s also talk about improving the game.
The game is a service and you have to keep updating and improving the game. This will help keep users coming back and it will also help to make the game more fun so that more folks want to join
Here are some themes to keep in mind now that you have a game released:
Be willing to constantly iterate on the game. Are you willing to update and improve features ever minute. Some developers updated their game 50 times in one hour to address the feedback and suggestions of some of the early players in the game.
Playfish mentioned that “Who Has the Biggest Brain” was updated over 100 times after release to make it successful. It is one of the most successful games on Facebook and it is partially due to constant iterative improvement on the game. When it was first released, it was not a success very quickly. It took a couple months of improvements to finally make it reach the top 100 games on Facebook.
It is important to keep updating the content in the game every week. It is another way to show commitment to players and it also helps to keep things interesting. For example, one week, you can have a tournament. Another week, you may want to release more levels in the game. Another week may be a series of new items or limited-edition items in the game.
When you do these updates, you may want to send notifications/e-mails to current registered players letting them know about the new updates. Most players may forget about your MMO if not reminded, sending them a message about new and fun content is a good way to remind them of the game while respecting their time.
Balancing the Economy
If you have a virtual currency in the game, you need to make sure it doesn’t get inflated. This can happen when there is no proper balancing of the sinks and sources of points/currency in the game. Why is balancing the economy important? It is because it has an impact on the fun of the game. If there is massive inflation in the game, players will stop liking the game and leave. Yes, it has happened in other games and if you take steps, you can make sure the economy is a strong way to keep the fun in the game. Check out this paper to see the effects of inflation in other MMOs…
One game designer wisely suggested that the game have a “wishing well” that players can throw money into and make a wish. It is a good way to help remove money from the economy in a way that is positive to the players in the game.
Another thing I did was have a way for players to donate money to the new feature. If they donated a certain amount, they would get recognition as funding a new feature in the game. This was another positive way to help remove money from the economy and keep inflation in check.
If you have a successful game, people will try to cheat the system. They will try to find exploits and ways to gain more points. It happens in almost every game. You need to make sure you catch these issues quickly as they will impact the fun of the game. If honest players see that cheaters always win, they will leave the game.
So you need to keep track of changes in the game. Keep track of the top players in the game by points every 4-5 hours. If there is a massive change, there may be something going on. Look into it. You’ll also hear about exploits that allow folks to get a lot of money or points quickly. Patch them quickly and then either ban the folks that used the exploit or remove the points they got unfairly.
Making Money From the Game
Your goal may be to make money from the game. That’s a nice goal. However, at first, make sure you serve and respond to players. Get your game up to 5,000 or 10,000 daily users then think about monetization. When you have a new game and new players get a sense that you are trying to milk them for money, your chances of growing may be limited. Of course, you can be the exception to this rule. But in general, first serve your players for a while, make sure the MMO runs somewhat smoothly and then look into monetization.
When you are ready to monetize, look into options such as allowing players to buy virtual currency in the game. Also using banner ads from Social Media and Cubics and also affiliate offers from My Offerpal and Super Rewards
As of this writing, some of the folks at Super Rewards mentioned giving million dollar payouts to single developers. It is possible to make a lot of money from these games provided you make something that is compelling, fun, and addictive to players.
As you have points, missions, battles, and other RPG elements, make sure you properly balance the game. It is important that you make sure the game is properly balanced. Some MMO developers hire people to specifically think about balancing items and quests so that nothing is out of control. When a game is balanced, it is fun. When it is out of balance, players will notice and may even stop playing.
Balance is important. Yes, some folks even set up spreadsheets in excel to run simulations to make sure their game is balanced. Your game may or may not require balancing. If it does, make sure you test out things before releasing new items/things that may upset the game balance.
Working with the community
It is important that you respond to your community early on. They need to know that you’ll be there and are committed to making the game work. As you do this, you gain their trust. Make sure you keep building on that trust. Make sure you are responsive consistently. If you need to take a break from responding to the community, make sure you let them know or get a volunteer admin to help responds to issues and questions.
Taking a break
Developing an MMO can get intense at times. You have to respond to a lot of things at once and not all of them are technical. MMOs revolve around people and there will be social issues that come up…that will feel more draining than most of the technical issues that you encounter in the game.
You can burn out and lose motivation to keep updating the game without taking a little time off. I’ve found that taking a few days off after 3-6 weeks of development helps to keep me focused on improving the game more. Stepping away from things also gives me clarity and insights into new ideas I can apply to the MMO. Constant development without a break can get frustrating, especially if you are developing alone without a partner…even if the community is helping out. Taking a break and letting the players know is a good way to recharge.
Every MMO will have a culture based on the developer and players. You need to have an idea of the culture you want and make sure you reinforce that culture with your attitudes and behaviors in the game. You need to be crystal clear about how you expect your players to behave and then block/ban people that violate those rules. There may be a person that wants to create issues with other players in the game and may ruin the experience for others. They exist and if their attitudes and behaviors and comments towards others is setting a bad tone in the game, be sure to block them from the app. You can ban them temporarily at first and if they continue it, then you can do a permanent ban.
I focused on making my game a positive place. A place for fun and relaxation. I’ve found that to be effective. Make sure you are clear about what social tone of the app.
Studying other MMOs is one way to learn. Another important way to learn is to keep metrics on everything in the game and then analyze the reports. You need to know how many invites were sent today. How many people leveled up in the game. How many players played the game today. How many new players yesterday returned today. Once you have this data, you can start doing split a/b testing. You need to keep experimenting so that you can tweak the game to make it a better and compelling experience.
Split A/B testing is important as minor changes in certain things may make a big change to the success potential of the game.
With metrics, you’ll get an idea of how long people spend in the game, what people are doing in the game, and then be able to modify and iterate based on this data. Proper analysis and use of this data is what can separate you from the rest of the game developers so make sure you put in a metrics system in place early on in the game release process.
As you grow, you’ll need help addressing all of the questions/customer service by others. To help lighten the load, you may want to ask some of the people in your community to be volunteer admins. Most folks will be willing to do it for free. You can give the folks that participate a special badge in the game. The volunteers will help things run smoothly. Make sure you write up a tutorial for volunteers that do help out with the game so that they know clear expectations of how they need to treat people asking for help.
Games as Systems
At the heart of everything, you are developing a “system”…and this system has users providing inputs into the system and then producing outputs like results, etc. You need to work on building this system and the components of the system so that the game will run as much on its own or a methodical fashion as possible.
For example, part of your game system is hopefully getting new players into the game quickly. Let’s say that 20% of the players that join the game decide to stay. You have this stat because you kept metrics (mentioned above Now you tweak a few things and add a tutorial so that now 40% of the player that join the game decide to stay. You have modified this part of the system and it will have a positive impact on the whole system. This is why you need to measure all parts of the game so you can figure out ways to optimize various subsystems of the game to keep it running smoothly. Systems-level thinking is critical for making the game success so be sure to keep in mind that you are really building a system here where the actual game is only one part of it.
We have a basic idea for the game. We have mockups. Now we need to implement all of this.
Since we’re implementing this on Facebook, we need to keep a few things in mind. Specifically, we’ll have a user table, and the unique id in the user table is the Facebook person’s user id. This is a BIGINT.
Here is the user table for the game:
CREATE TABLE IF NOT EXISTS `players` (
`id` bigint(20) unsigned NOT NULL,
`userid` bigint(20) unsigned NOT NULL,
`joined` int(11) NOT NULL,
`money` bigint(20) NOT NULL,
`experience` bigint(20) NOT NULL default ’0′,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
This is the table that will hold all users in the game. When a person joins the app, I check to see if the user is registered in the system. If not, I add them to the table.
How do I get the user id…keep in mind that Facebook will pass you the user id on each page you include their header files. In PHP, you get a variable called $user that contains the user id. Getting that user id is important and allows you to do many cool things.
Specifically, you can feed that user id into the FBML tags to render the user’s name, profile picture, and other things. This is without you knowing much about them. That is the power of FBML.
FBML is a mark-up language and you can find more info on it at the Facebook Developers Wiki
Here is a basic example of FBML…let’s say we want to render the user’s profile picture on the page…we use the following FBML tag…
We use the tag fb:profile-pic
Let’s say the user id is in the variable $user…we can do the following
<fb:profile-pic uid=”" />
It will render the picture of the user
Anyways, code for the game is attached to this book and you can find out how fbml is used. You can also use the Facebook API to perform queries based on the user id. With the user id, you can use the Facebook API to get information from the user’s Facebook profile, such as their location, network, status, etc.
For most games, you’ll mainly need to use the following FBML tags:
fb:profile-pic (renders the profile picture based on the user id you passed in)
fb:name (renders the name based on the user id passed in)
In terms of the Facebook api, the main things you’ll use related to sending notifications to players on Facebook. Notifications are useful to help keep the players coming back to the game on Facebook. It’s also a potential viral channel.
There isn’t much else to this chapter. I would recommend you take the basic “hi” application mentioned in an earlier section and echo out the user id and other things like the profile picture within that basic app to see what’s possible.
Replace the code in index.php with the following lines to see FBML in action…
// Facebook initialize info
echo “Welcome to my fun MMO ”;
*** end code
It’s simple and will render the picture of the user.
Switch to our mobile site