Wednesday, November 6, 2013

Our Design To Prevent Savescumming in Graywalkers

Game development is chiefly exploratory in the initial phase of development, and this is mostly where we come up with ideas to overcome certain problems.

Here's a look at one design proposal I have for our ongoing project, Graywalkers: Purgatory, as an answer to the savescumming issue found in games. Graywalkers is part squad-based tactics game, and part grand strategy-esque game.

Design Proposal For Preventing Savescumming: Hostage Situations

Savescumming is a metagame technique that players do to turn otherwise unfavorable situations into their favor if the outcome is determined by random chance (i.e. dice rolls). By saving right before such "dice rolls" happen, they can keep on reloading until they get their desired roll results.

Savescumming is a thorny issue. You can stiffle the player's power to save, by say, having save checkpoints instead. But this turns into an inconvenience. What if the player suddenly needs to take a long break? You could implement a "Save & Exit". It won't deter the stubborn savescummers though. But what else can you do?

If the game is built well and the player is savescumming they're way through it, I think it's an indication that they are focusing too much on one solution to their problem when there are really several ways to deal with it.

And the problem I think, is how to let the player learn better solutions without the jarring experience of a Game Over screen.

What I'm going to propose is only one way to go about this. Certainly, better tutorials, perhaps an in-game advisor, can also help.

Dark Souls

Dark Souls is brilliant in this. Savescumming is discouraged by having a "Save and Exit" instead of just a save. It of course does not completely remove savescumming, but it makes it inconvenient for players to do so (i.e. have to close and restart the game all over again just to reload).

Also this means each character has only one save slot.

But the major thing that helps prevent savescumming is the fact that the game gives you a chance to correct your fatal mistakes:
  1. When you die, your corpse (or rather, your soul) is dropped at your point of death.
  2. All your unspent EXP points (and money) are left in that corpse.
  3. You need to get back to that corpse to get back all those EXP (and money).
  4. If you die while attempting to get back to your corpse, then those EXP (and money) are gone forever. Instead, your corpse (i.e. soul) is now in that more recent place you died. The EXP points (& money) you gained while trying to get to your old corpse is now the ones left in that new corpse.

In this way, the player is given a second chance when he dies. If he screws up a second time, well, he has only himself to blame.

It also jives with the narrative: in this game, you are an undead soul who keeps coming back.

Whenever this happens to me, I always refer to it as "my EXP points are held hostage", and that "I need to rescue them".

The idea of not giving an immediate Game Over screen on death has also been done before in other games.

In the FPS, Prey, when the player dies he is put in a mini-game where he is in some sort of spirit world, needing to shoot at corporeal monsters to collect enough health back to magically revive himself.

World of Warcraft has something similar, but their idea is more relaxed; there's always the easy way out of death where you don't lose anything, other than the time to get to your corpse.

Applying this idea to Graywalkers

So with that about hostages, I have an idea for Graywalkers about hostage situations on your own characters.

Short explanation for those unfamiliar with the game: Graywalkers is a post-apoc strategy RPG. But as far as the combat part is concerned, it's turn-based tactics, similar to XCOM, Final Fantasy Tactics, Jagged Alliance, or the old Fallout games. The player can send out multiple squads into the real-time world map.

I'll explain by example:
  1. You encounter some bandits.
  2. You fight but your squad dies or you chose to surrender with the remaining party members unharmed (or rather, not harmed further).
  3. It's not game over yet. You are brought back to the world map and a dialogue opens.
  4. The bandits open a negotiation:
    • "Hoo whee! You there boys? We got your blokes strapped up here. And hey now look, we're all seeveelized folks, so if you give us 100 pieces of canned goods we'll give them back to you the same way we found 'em. But uhh... better hurry up. 2 of them don't look like they got much time left."
  5. This is essentially a hostage situation. In fact, this is a new quest entry for you.
  6. Of note here is that they mentioned what they want (100 pieces of canned goods), and that 2 of the hostages are in critical condition. The rest of the hostages may be unconscious, or weak. They are all tied up or trapped in a prison of some sort.
  7. If you have some of their people held as prisoners of war, they may ask for those as payment instead (i.e. prisoner exchange).
  8. This negotiation can be in conventional means (a diplomat representing them is sent to your nearest remaining squad), or via a video phone if they are hi-tech.
  9. You can still choose to haggle what item/s to give them (and how many) in exchange for your fallen units. I.e. "How about 3 first-aid kits instead?"
  10. If you choose to refuse or accept the deal, or ask for more time, that's not the end of it.
  11. If you accepted, they will give you a location to go to, and you still need to send a new squad there to give the goods (assuming you're not lying) and get your people.
  12. If you refuse or openly say you can't give what they want, you can still get them by force, but they won't give a location. You can start your search from the last place of battle.
  13. But you have to hurry because they don't have unlimited patience, and the 2 of your characters in critical condition can die if you don't act soon enough.
  14. If your bandits are actually from a well-to-do faction (or serving under them), the negotiations may be allowed to take longer, and the hostages will be given minimal food and medical support.

During The Hostage Pickup

Once your rescuers are on the location, several things can happen. This can be in any order or in any combination that makes sense:

Take note that this table is relevant for hostage-takers of any sort, not just regular bandits.

Your Rescuing Squad Hostage Takers Hostages
Can be truthful to the deal and do as promised.

Take note that you need to make sure that your rescuing squad brings along the required items for trade.

For factions that you want to get on their good side, this is a good option.
May be truthful to their deal and do as promised. Can try to break free on their own (you, as the player, are still controlling these hostage characters). You can only control hostages that are not unconscious.

They won't have any items on them. In combat, they can hand-to-hand and magic only, in addition to any non-combat skill checks they can perform that don't require equipment (e.g. bashing cages open perhaps).

You can make them escape quietly, or use them to kill the hostage-takers also. Of course, they can loot any subdued enemies for temporary weapons and armor.

In fact, you may deal with the situation like this and not really have any rescuing squad at all (either lie that you agree with the hostage exchange or refuse their deal).
Can renegotiate the price at the last moment. May up their price at the last moment just to spite you or for whatever reason.
Can use intimidation to make the hostage-takers flee.

It can fail though, and the hostage-takers can get so scared they simply kill the hostages at gunpoint.
May actually just ambush your rescuers. They could openly kill the hostages in front of you to spite you.

It could also be that they are lying and the hostages are not there in the first place (e.g. there is an enclosed cage but it is empty).
Can have a secondary team infiltrate and rescue the hostages in secret while your other team is buying time by talking with the hostage takers face-to-face.

It can fail catastrophically though, if your secondary team is killed, overwhelmed, or captured.
Can fool you by giving you hostages that are not really your characters. Of course for this to work, the hostage-takers will put sacks over the heads of the "hostages".

Could also be something similar to the "hostage exchange" that Mel Gibson pulled off in The Patriot.
Can lie and just open fire on the hostage takers by surprise in the middle of talks.

Take note that you can make it seem like only 1 or 2 people are the rescuers, while the rest of your squad are waiting in ambush.

You may even find it that the hostage-takers have ambushers of their own, and your ambushers can subdue them quietly.
Can fool you by having only one out of the many hostages be present on the site. Their new demand will be that release of the other hostages require additional payments and will be picked up from other places.

Take note that this situation can be further complicated by having the hostage-takers specify the middle of a populated town as the place for the exchange to take place. So you have to worry about non-combatants in your line of fire and collateral damage.

Battle Plan

If the deal is off and you are engaged in battle with the hostage-takers, there are several things you can do:

  1. Kill/subdue all the hostage-takers. The simplest and straightforward. An offensive plan.
  2. Carry the hostages away and flee the scene without killing all the hostage-takers. A defensive plan.
  3. Attempt to break free the hostages to either evacuate them or let them help in battle. You can attempt to resuscitate (conventional means) or revive (magical means) any of your hostaged comrades on the spot if you wish. The reason is so that they can help in battle, if things are looking desperate. They won't have any items on them (i.e. in combat, they can hand-to-hand and magic only, in addition to any skill checks they can perform that don't require equipment).

Breaking Free

For hostages to break free, it will be skill checks. What type of skill check depends on the way the hostages are trapped.


If they are in a cage, your hostaged characters can try lockpicking (lockpicking skill), or those strong enough can simply break it open (strength).

If tied up, they can try to wriggle free (agility), or simply break the rope bindings (strength).


You can, in fact, let all this happen on-purpose to let your hostaged characters infiltrate the enemy's base (assuming hostages are brought there, perhaps a prison of some sort). Why you want to do is that is up to you. Perhaps you need to collect information on how well defended the enemy's base is from the inside, or you need to recruit a prisoner in your team and the only way is to get into the prison, etc.

In Closing

The whole point here is not to punish the player for savescumming, but to encourage him not to in the first place.

We give the player a chance to correct his mistakes naturally within the game in ways that fit the narrative, and in fact, opens up the game to more opportunities for the player.

This is really not about completely removing the player's ability to savescum, but give him less reasons to do so.

Graywalkers: Purgatory is the PC game we are working on at the moment. You can check out our Steam Greenlight page here, and our currently ongoing Kickstarter here.

Graywalkers Purgatory Kickstarter!

Wouldn't do well to forget about posting our Kickstarter on my own personal blog. This site is like a diary of events of my job stuff too.

Well, so here it is.

Graywalkers: Purgatory
A post-apocalyptic strategy RPG in a dynamic world

Kickstarter Page:

And let me practice my sales pitch here:

The game plays similar to Fallout and Jagged Alliance, where you control squads of mercenaries travelling the world map in real time.

When a squad visits a town or any location, the view moves to a more close up view (i.e. like in the screenshot below), where you can move individual party members of that squad, interact with NPCs, or engage in turn-based combat.


Tactical Turn-Based Combat Fights are a classic "I go, then you go" type of turn-based, set in a square grid. We use an Action Point system similar to the old Fallout and X-COM games.

Christian-heavy, supernatural setting mixed with post-apocalypse Instead of dwarves and elves, this game has demons, angels, vampires, werewolves, and faeries (apart from humans of course). Ancient magic and human technology play a heavy role in the lore.

Dynamic World When moving your mercenary bands in the real-time world map, think of it as there being an automated grand strategy game happening around you. NPCs move around, fulfilling their roles in the economics/politics simulation of the world.

Cities found in the map require constant food and resources or they will die off, and you can use that to your advantage the next time you invade an enemy city.

Factions The world has factions that war with each other, and it's up to you who to ally with. Do you side with the disreputable crime lords of Lost Vegas? Or the well-equipped but bigoted human supremacists?

All of them have their own agendas that they'll pursue, with or without your help.

Suikoden-style collecting of party members You need to gather 36 party members slowly as you play the game. There are about 50+ potential recruits so there's a lot to choose from.

Each party member has their own backstory, and personalities that affect combat (think Jagged Alliance). Some may be devoted to their faith, but prejudiced against half-breeds. One of them may be a crack shot, but has emotional baggage that would get you into trouble during a hostage situation.

No one's a complete goody-two-shoes or bad guy here, and it's up to you who to recruit.

More Screenshots

Gameplay Footage

If you have friends you think will like this, spread the word! Use the hashtag #KickstartGraywalkers and use our official short URL: when tweeting so we can find your tweets.

WARNING! Please take note that mass sending of tweets about the game to other Twitter users that aren't your followers is considered spamming and we could get suspended for that.

I'd also love to hear your feedback, good or bad. I'll forward them to the rest of the team. We can't improve if you don't tell us the wrong things we haven't noticed.

A few more related links:

Our Steam Greenlight Page
Our IndieDB Page
Our Facebook Page
Our Twitter Account
Our YouTube Channel

Thanks for your time!

So that's that.

As for how it's doing:

Which means it certainly could be better. I'm not the one running the show here--I'm not even the main authority with the development (I'm in as the lead engineer, doing the technical stuff only)--but I am sharing my thoughts with the rest of the team. And we got some back-and-forth going on. Certainly something to share afterwards.

Our lead has his own blog that he updates (supposedly) daily if you guys want to know more from his point of view:

Sweet bonus: here's a screenshot of our Greenlight with l33t amount of YES votes:

Sunday, August 11, 2013

Equipped Skills: The Growing Trend in RPG Game Development

What do Magic: The Gathering and Diablo 3 have in common? A year ago I predicted about RPG game development moving away from traditional level-up systems. Now it looks like the plot grows thicker.. Here I discuss the growing trend of "equipped skills".

I told you people. I told you! Now it's happening.

Developers marketing people are touting their game's innovative class system! Players are up in arms about removing the traditional trinity (i.e. tank/DPS/support)! Classless systems! Ogre wizards wearing plate and shooting bows!

"Woah there, sperglord", you say. "What are you yammering about?"

I'll tell you what. I'll be straight to the point: Developers are shifting away from the traditional skill system and putting in a flexible one that I call, for a lack of better term, "equipped skills".

Let me explain further. When I say traditional system, it's when players are given skill points upon leveling-up to let them purchase which new skills he wants for his character.

(When I say skills, this is a pretty broad term, but if you play RPGs, you'll know what I mean. Some systems call them perks (i.e. Fallout) , feats (i.e. D&D), abilities, et al. They're basically some sort of intangible item that unlocks some attack you can now use, or modifies the rules of the game for your character.)

Like I said before, the problem with such a system is that purchasing skills are a life-altering event for the character, that usually can't be reverted. So players need proper deliberation before choosing what skills to purchase.

And how would players know beforehand which skills are worth purchasing? Generally, they can't. They need to devote time, doing trial-and-error, experimenting with every character build they think is worth pursuing.

(Either that, or they have to do some researching and asking around. Not necessarily a fun process, if you just really want to play the damn game already.)

When they figure out what they want, only then, finally, they can proceed to play the game in earnest.

And they need lots of time. Generally, it's not very easy to quickly start again with a blank slate for your character, ready for another round of experimentation.

And some people say, the labor you do with experimenting is part of the fun. For some people, they see it as a problem.

This is why respec became a hot issue one time. Devs wanted to introduce respec to help lessen the time needed to do experimentations.

But that was only the band-aid solution to an old system. What developers next considered, is creating a new system that addresses the (what they consider to be a) problem from the start.

Basically, they want a way to streamline that experimentation process. To make it easier for players to rapidly create character builds.

And this new trend of a more flexible skill system, which I refer to as "equipped skills" is what people came up with, that resounded a lot in the developer community (whether intentionally or not). How come? So many new games are doing it now.

But let me explain first how this other system works.

Here are the quick points:
  1. Out of a wide selection of available skills, you can "equip" only a few at a time (e.g. say, 8 skill slots). Those equipped are the only ones that are in effect, and usable in combat.
  2. The game then, is centered around choosing a combination of skills that complement each other well, given the restrictions.
  3. This is akin to playing a tradeable card game: out of all the available cards of that game, you choose the ones you want for your deck.
This is in contrast with games that have more traditional skill systems, like Dragon Age.

In games like that, skills that you purchase are always available and usable. Equipping skills in a hotbar, in those games, is only for convenience, not a requirement.

The holy grail that devs want here is how Magic: The Gathering does it. That game has so much possibilities and permutations that players occasionally find combo cards, even when such cards were not originally meant to complement each other.

As with any fairly workable idea, the idea itself won't necessarily spell doom or success for the game, but how the devs do their specific implementation of it.

And, indeed, each game made has their own implementation of the idea.

Now here come the examples:

Call of Duty BLOPS 2: Pick-10 System

The Create A Class system has been drastically improved from the original Call of Duty Series. This time, each Perk, Weapon, Weapon Attachment, piece of Equipment, and more will cost one point in the new Pick 10 System. In this way, every player will create a class in their own way, as long as their points don't add up over ten when going into a match. ... This allows players to switch up their play style and make each and every game unique.

So the choices you need to make become about how to tailor your preferences within these ten slots. You may decide not to equip a grenade at all, in favour of an additional attachment for your primary weapon. Or, alternatively, you might not even want a primary weapon. The choice is yours.

The Secret World: skill system

One of The Secret World's most unique selling points has been its lack of a traditional class system. Unlike most RPGs, which assign players to damage, tank, and healer roles, FunCom’s MMO has opened up its bank of skills to allow complete player customization.
Each character in The Secret World is given access to 14 ability slots – seven active and seven passive – that shape your role and determine your strengths. This is called your “deck,” and you can build it any way you like. Of course, with over 500 abilities to choose from, making those decisions can get a little overwhelming. That’s where the deck template system comes in.
Each deck template employs 14 abilities or "cards" to create a unique type of character, granting the player exclusive power and a deck-specific outfit.

Character growth in The Secret World has been pitched as 'Horizontal, not Vertical'. ... After a point, character growth stops being about becoming more powerful, and instead becomes about having more choices. And the best part is that that point is wherever you want it to be. If you're not having fun with a given weapon anymore, you can change it. Anytime you want. You might need to duck back to some easier content for a little while, but that isn't a big deal anyway.

Diablo 3: Skill system

Characters can use up to six skills at once, and may cycle between them with only minimal cooldowns. 
Characters can have up to 3 passive skills active...

Diablo 3 had skill trees during most of the game's development, but the entire skill interface was reworked numerous times during development, and ultimately the skill trees were removed and replaced with a sort of skill menu.
Jay Wilson: ...We've decided to remove the tree-type architecture and we are moving into a purely skill-based system. This new system is still in the development stages and if it does not work, we still have plenty of options to fall back on. Right now, we're just trying different things and getting a feel for the few ideas in regards to the skill system that we have going on right now. It differs from the World of Warcraft/Diablo II type hierarchical styles and is more of a skill pool/path than a tree per se.
Additionally, see David Sirlin's article which also describes the system.

Guild Wars 2: Skill System

Like a collectible card game, we provide the player with a wide variety of choices and allow them to pick and choose skills to create a build that best suits their particular play style.

Now you might think this is all new, but look at this:

Final Fantasy Tactics: Job System

In FFT, each character equips certain skills, categorized as Command Abilities (actions that the character can perform: e.g. attack, steal, perform magic), Reaction Abilities (performed automatically when you are attacked), Support Abilities (passive bonus), and Movement Abilities (skills that modify movement e.g. jump higher, move farther, etc.). the player changes between the jobs, skills will be able to be transported over to the next... This addition of mixing skills (along with the jobs themselves) and the statistics gained from them, further developed the Job System...

Jason: so those can all be mixed and matched
Jason: once a character learns an ability, he can equip it at any time
Jason: so once Kirklton has jp boost, he can put that in no matter what class he is

You could say FFT does it differently, but the basic idea is the same. Perhaps you could say FFT was ahead of its time, eh?

So the idea isn't really new, but that it's becoming a trend, I think is new.

EverQuest Next

We know little from what was recently presented by the developers, but I can easily see this is another take on the "equipped skills" idea.

Character abilities come in four types: movement, offensive, defensive and utility. Multi-classing comes into play with the character abilities--they’re the ones you can switch out to change up your build for the specific class. You might, for instance, make a warrior who can also do magical damage and has great defense against casters.

Unlocking a new class unlocks new skills to choose from within those 4 character skill slots. This is where your skill customization comes into play. A warrior might unlock a shadow knight class and then be able to choose shadow knight class abilities to replace his warrior class abilities.
The perfect example used on the class panel was building a Warrior into a Caster Killer. He swapped leap for a type of teleport. He swapped out his offensive move for a Mana Burn. His Defensive skill was swapped to a Spell Reflect and his utility spell swapped for something equally powerful vs. casters.

And so on.. I'm sure you can cite a few more examples.

Note how they describe it. Mixing and matching. Swapping out. Using slots. Easy customization. Even the developers go so far as to describe it as a collectible card system, a deck.

I don't find it surprising. That's really what's at the core of an "equipped skills" system.

As you can tell, each game has their own take on the idea. Some games add more layers of complexity (e.g. skills that are dependent on weapon equipped, Diablo 3's rune system, etc.) to make things more interesting.

Custom classes

They also like to describe it as something that easily suits the player's play style. Basically, you can think of respec being a built-in feature in this type of system. And being able to easily accommodate different play styles quickly, is one of its strong points.

This can undermine the whole point of having classes.

On one end we have BLOPS 2, which uses it for their Create-A-Class system. Or Secret World, where there are, indeed, no classes to speak of.

Instead the player creates his own custom class. The idea is the player cherry-picks which skills he wants to use from the ones provided by each skill group. Classes, when looked at this regard, are simply categories to group related skills together (e.g. fighter skills, thief skills, sorcerer skills, etc.). Think of them as the colors in Magic The Gathering.

The player then, can choose to specialize in one group only (e.g. choose only fighter skills for his build), be a jack of all trades but master of none, or sit somewhere between the two extremes (e.g. do the equivalent of a dual-class).

On the other hand, some implementations decide to keep things tight and still have classes (i.e. Diablo 3).

So an "equipped skills" system doesn't necessarily need to turn the game into a classless system, (as some people call it) but you can also design it that way.

We still like to buy stuff though

If you go through some of them, you'll notice in some games, the skills are unlocked automatically for you at some point (leveling-up in Diablo 3). But some games still require you to purchase the skill before it's available for equipping.

I guess devs can't help but still add that. The idea of earning for your skills, slowly growing your collection, like some sort of hobby collector, is a good motivator for players, understandably.

We should note though, that there's no more need to disallow the player from collecting every skill in the whole game, since we already have the restriction of being able to equip/use only a few at a time. I.e. Go ahead, unlock everything! You can equip only 8 at a time anyway.

So it's common that these systems allow players to eventually unlock/purchase every skill. That's in contrast to a traditional level-up system, where you're usually not allowed to unlock every skill.

Another take on it can be that you also purchase upgrades on each skill, so it's not like we need to remove the idea of purchasing altogether.

Easing up new players to the system

So, it's understandable that developers would be worried that some players may find this system too complicated. How would they know which skills to pick for their "deck"?

Each game has something up their sleeve for this.

BLOPS 2, with it being a multiplayer affair, addressed this by providing pre-made classes. They are essentially preset builds whose selection of skills are chosen for you. This is so that you can start playing immediately and get a feel for each skill's usefulness and how they work well with each other. Think of them as preset decks in Magic: The Gathering.

The Secret World does something similar with their decks, although I do believe you still need to unlock those skills dictated by the deck templates. Essentially, they are more of a guide, than a preset.

Diablo 3 had to do it with a lot of hand-holding, in what combinations the player could do (e.g. Wizard can have only one signature spell). As they explained, this was done to prevent players from mistakenly making poor character builds that would frustrate them.

Understandably, the hardcore players who love to experiment found this limiting. The not so hardcore audience did not have any problems with it. So it was wise to allow the player to turn those restrictions on or off (i.e. Elective Mode). The only problem it seemed, was that it was not apparent that you could turn it off in the first place.

Most others, you had to purchase/unlock skills first before they can be equipped, as mentioned above. Pragmatically speaking, this is done so that you won't be overwhelmed with too many options at the start; you're forced to have only a few skills at the beginning and slowly unlock new ones.

This gives you time to slowly learn and get comfortable with each new unlocked skill, before you move on to the next. At the end, once you've tested all of them, you could then decide to stick with the ones you're happy with.

EQ Next, from what I can understand, took some cues from Final Fantasy Tactics Advance: it seems which weapon you equip determines your first four skills (weapon skills), and the last four (character skills) are gained by purchasing/unlocking.

This means presumably you don't have to worry about what combination of weapon skills to get; you can't mix and match weapon skills since they come as a preset in the weapon. But you'll still have some wiggle room for experimentation with the character skills, and which weapon to get in the first place.

Each developer has a different variation to address this issue. Certainly there's room for creativity here.

Banned cards

But wait!, you say. Isn't Magic: The Gathering infamous for having cards so powerful, they had to ban them?

What causes banned cards anyway? What happens is developers initially had no idea that the cards they made, when used with certain others, were too powerful (in that the cards bordered on cheating).

That is indeed a danger with a mix-and-match system. You obviously want many cards in your game. But you can't possibly anticipate every card combination that might break the game. At least, probably not enough for your game's deadline.

(Here's a good article showing one point of view of what makes a card too powerful.)

But look at it this way. For all its faults, Magic still manages to have a player base in this day and age. Whatever Wizards of the Coast is doing, they're doing well enough.

It's certainly not a perfect system, but it can still work and arguably be successful for a product.

Ultimately, just because you choose to employ an "equipped skills" system for your game, that doesn't automatically make it better over a traditional skill system.

You'd have to tweak and fine-tune it, as you should, regardless of what style of system you use.

Resistance to change is expected of course. Understandably, a lot of players are averse to the general idea of equipped skills (instant respecs take the fun away!, there's no excitement in leveling-up anymore! etc.), but its not like the idea of a traditional skill system is perfect either.

On the other hand, it's not necessarily bad to be wary of it.

In the end, (good) devs love to experiment, creating new systems all the time, that's what makes them developers.

My guess: It'll take a few iterations of games employing this system to finally come up with a "best practice" document on designing such a thing.

Side note: I'm using the same idea for my game. Hopefully it'll work out!

So, how do you think this trend will pan out?

Sunday, May 19, 2013

OpenInFileBrowser Code

I realized there's a debacle right now in the Unity Wiki Website over its content being under the Creative Commons License.

So to make sure there's no legal problems with using this code, here's a re-upload of my OpenFileInBrowser code for Unity here in my blog.

As always, I put this code in Public Domain as it's quite simple but good enough to be shared.

public static class OpenInFileBrowser
   public static bool IsInMacOS
         return SystemInfo.operatingSystem.IndexOf("Mac OS") != -1;
   public static bool IsInWinOS
         return SystemInfo.operatingSystem.IndexOf("Windows") != -1;
   [MenuItem("Window/Test OpenInFileBrowser")]
   public static void Test()
      //string path = "/Users/Ferds/Unity Projects/BuildReportTool/BuildReportUnityProject/Assets/BuildReportDebug";
      //string path = "/Users/Ferds/Unity Projects/BuildReportTool/BuildReportUnityProject/Assets/BuildReportDebug/EditorMorel.log.txt";
      //string path = "/Users/Ferds/UnityBuildReports/";
      string path = "/Users/Ferds/UnityBuildReports/test4.xml";
   public static void OpenInMac(string path)
      bool openInsidesOfFolder = false;
      // try mac
      string macPath = path.Replace("\\", "/"); // mac finder doesn't like backward slashes
      if (Directory.Exists(macPath)) // if path requested is a folder, automatically open insides of that folder
         openInsidesOfFolder = true;
      //Debug.Log("macPath: " + macPath);
      //Debug.Log("openInsidesOfFolder: " + openInsidesOfFolder);
      if (!macPath.StartsWith("\""))
         macPath = "\"" + macPath;
      if (!macPath.EndsWith("\""))
         macPath = macPath + "\"";
      string arguments = (openInsidesOfFolder ? "" : "-R ") + macPath;
      //Debug.Log("arguments: " + arguments);
         System.Diagnostics.Process.Start("open", arguments);
      catch(System.ComponentModel.Win32Exception e)
         // tried to open mac finder in windows
         // just silently skip error
         // we currently have no platform define for the current OS we are in, so we resort to this
         e.HelpLink = ""; // do anything with this variable to silence warning about not using it
   public static void OpenInWin(string path)
      bool openInsidesOfFolder = false;
      // try windows
      string winPath = path.Replace("/", "\\"); // windows explorer doesn't like forward slashes
      if (Directory.Exists(winPath)) // if path requested is a folder, automatically open insides of that folder
         openInsidesOfFolder = true;
         System.Diagnostics.Process.Start("explorer.exe", (openInsidesOfFolder ? "/root," : "/select,") + winPath);
      catch(System.ComponentModel.Win32Exception e)
         // tried to open win explorer in mac
         // just silently skip error
         // we currently have no platform define for the current OS we are in, so we resort to this
         e.HelpLink = ""; // do anything with this variable to silence warning about not using it
   public static void Open(string path)
      if (IsInWinOS)
      else if (IsInMacOS)
      else // couldn't determine OS

Wednesday, May 8, 2013

My first time selling on the Unity Asset Store

It started with this. Someone was having trouble with his build size so I explained that thing about the Editor.log, in that it actually had info on the breakdown of your build's file size!

So I went and whipped up a simple front-end for the log's build info over a weekend.

Then I asked the forums if they'd be interested in having it on the Asset Store. A handful of people agreed. Then I thought, why don't I try selling it, maybe for just a few bucks to see what's the experience of selling on the Asset Store? We need the money anyway.

There was a discussion in a LinkedIn Unity group where someone was adamant that I should give it for free and that I'd only get a few bucks out of it. It was quite a bummer. It was a bit depressing actually.

So I set it to $2 as an introductory price and waited how it would turn out. The plan went that I'd keep it as $2 for one week then set it to the standard price.

David Helgason even retweeted my tweet about it. I guess it was like... I don't know. Stevie Wonder humming a tune you just made up? It was unexpectedly cool.

David's a pretty awesome guy.

I placed a public poll on my forum thread asking "How much would you be willing to pay for this plugin?" The choices I put where $2, $5, and $10. Majority answered $5. I guess they're not that cheap that they'd settle for the lowest price. Seems like $10 is too much too. So we figured $5 was the sweet spot.

By the end of the week I then set it to $5, only to realize that price changes do, in fact, still have to go through review by the Asset Store team. Then David again helped me out. It's quite awesome that a big company like Unity still has the time to help out the little guys using their products.

So the $2 sale went for approximately 9 days. A total of 117 people bought it during that period.

I'd shudder to think that $163 is only a few bucks. Must be there's a really high standard of living where that guy is.

Now that the selling price is $5, the amount of people who purchased is about 1/3rds lesser. I still got higher sales overall though.

It's selling quite well, for something I just whipped up over the weekend (though I do improve it every now and then). It's managed to get consistent five stars from reviews. It even got to the Asset Store front page one time.

Here's the link to the Asset Store page:

Here are some things I'd like to share for my experience:

  1. If a customer previously purchased directly from you (not from Asset Store), it cannot be unlocked for them in the Asset Store for free. They have to buy it again in the Asset Store.
  2. Your publisher page is quite bare-bones. There's no sales graph or overall total sales. There's only the sales per month, and you can only view one month at a time. Switching from one month to the next is quite slow (for my Internet connection).
  3. Related to that, when a customer posts a user review, you get no email notification about it, or any notification whatsoever. You have to visit your asset store product's page every now and then to see if someone has a complaint in their review, or some misunderstanding you'd like to clear up. UT's take on this is that it's your job to facilitate communication with your customers, but something like an option for email notification in this case would be nice, no?
  4. The ways you could offer support is usually via Twitter, email, tell them that they can PM you in the Unity forums, or if you have a forum thread about your product, give them a link. You'd usually put such links in your Asset Store product page's description.
  5. I'd like to reiterate the standard warning: If enough customers complain that they are not getting adequate support from you, UT has the right to take down your product.
  6. If your product is something visual, then potential customers will like to see video demos, or web interactive demos to see an example of how your product is useful. Their mindset is: "So what's this Asset Store package? Will it be useful in the project I'm working on?" That second question is what you need to address. And you do it by showing potential scenarios of how it's used, i.e. demos.
  7. If your product is purely code instead, perhaps a video tutorial how to use it can also work. At the very least, post some screenshots. Surely there's something visually presentable that you can show?
  8. If your asset store package has code, customers will appreciate it if you separate your code into your own namespace as much as possible to avoid name conflicts.
  9. Use the lowest possible version of Unity when releasing your asset package. Since they are distributed as .unitypackage files, the version of Unity used to create the .unitypackage is also the lowest version allowed to import that file. Frankly, I think this is just a conspiracy to force you to upgrade your licenses. I keep an installation of Unity 3.5.3 in this case.
  10. Selling on the Unity Asset Store is a non-exclusive deal. I.e. you are free to sell your product via other stores (ex.
  11. You can't verify if a person who emailed you really purchased your product just using your publisher dashboard alone. You can, however, email the Asset Store Team to verify for you if someone indeed purchased it. Dantus in the Unity forums points out email isn't necessary. All you need to do to verify if someone purchased your asset is to ask them for their Invoice Number. Then in your publisher dashboard, there's a tab called "Verify Invoice". You can type the Invoice Number there to verify someone's purchase. (For example, say, someone reported a bug. So you fix it and would like to send it to the bug reporter to test the fix on his machine. What if he didn't really purchase your product? You better verify to be safe.)
  12. Possible places you can use to advertise your asset package:
    1. Main Unity Forums
    2. Google+ Unity Community
    3. LinkedIn Unity Group
    4. Unity South East Asian Mailing List (only if you're based in South East Asia!)
    5. Unity3d Subreddit

Monday, January 28, 2013

Global Game Jam 2013

January 25, 2013. Start of Global Game Jam 2013.

I woke up at 6 PM in our home-office, still a little bit groggy. I think my fever was gone.

Global Game Jam 2013 had already started and I was two cities away from the nearest jam site. What the hell do I do?

The me back in that January 25th would never have thought that I'd bag a Best Art of Manila Game Jam 2013.

Let me backtrack for a moment.

I heard of the Global Game Jams before. I thought it was crazy to try to come up with a game in just two days' worth of time.

But last year I was invited to be a mentor in the Unity Game Jam Manila and I realized, hey, this is pretty fun. I should have participated instead.

So I determined that come 2013, I'll start joining the Global Game Jam.

Boys will be boys

It was the night before the Game Jam. We were bunking in our little home-office as usual.

For some goddamn reason, the whole apartment room started smelling like semen. Seriously man, putang ina, amoy tamod. What the flying fuck??? Is someone jacking off? We're all guys here, but there's this little thing called respect...

But it turned out it was coming from outside the window.

My friends said it was Zonrox. Here in the Philippines we have a bleach brand called Zonrox. And it suspiciously smells like goddamn semen.

Ladies and gentlemen, Exhibit A.

My other theory was that some bored neighbor was masturbating from his window. He probably kept bottles of it, judging from the strength of the smell.

I can't remember if I had my headache before or after that. Anyway I was starting to feel nauseous so I slept early.

The next morning, straight to the toilet I vomited. According to online pregnancy forums, clear and bitter vomit is just normal stomach bile.

I still had a headache so I slept the whole day.

So when I woke up, it was 6 PM, and the Global Game Jam already started.

I was still concerned for my health, so a 48 hour contest sounded risky.

I thought, no way, I want this. Leeroy Jenkins all the way!

You know I heard some people use autosuggestion to actually improve their health, like a placebo but without going through the fake meds.

I like to think Gurren Lagann was a factual story.

Anyway, I packed my stuff and through the graces of public transportation, I was able to hail a cab only after 30 minutes of waiting and overtaking my opponents for the nearest vacant taxi.

Day 1

I arrived about 8 PM I think. The people were just about to the last few pitches. I walked in, bags in tow, looking for the nearest acquaintance.

"Excuse me-- Oh yeah I just got here-- Hey, what's the theme?"

So it was a heartbeat sound.

I looked for the nearest empty table and started setting up.

The first idea I had was a character whose heartbeats physically affect the world around him.

Then I had a visual recollection of this game called Journey, which from a video, I recalled, shows that the way to communicate to your stranger friend was by pulses.

So from there I started my concept on the character.

You can easily see the influence from Journey here.

I like to start with the art even though I already had a rough idea of what gameplay I want.

Usually people would go for using capsules as placeholders for character graphics and refine their mechanics until it's good, then swap in the real graphics.

And that's really how you should do it, because you need to concentrate on refining the gameplay first.

But my brain just doesn't want to work that way, at least, at that moment.

I really need to see the guy in there. He doesn't have to be normal-mapped and everything, but just see his shape, see him walking, really makes me feel focused.

Note: Actually I did not have the time to animate him walking.

I also recalled my past idea of sound locks.

Sound locks are locks that have no tangible keyhole. Instead the lock is adorned with a figurehead of an animal.

You have to play a sound of the other animal it fears so the lock will open.

So a lock of a cat would open upon playing the sound of a dog bark. Subsequently, it would lock upon hearing the sound of a mouse squeak.

The table behind me was of a group of students. This jam site was sponsored by iACADEMY, a local college (actually the college I went to and subsequently dropped out from).

The students were kinda obnoxious. But it was likely a wrong first impression on my part.

In retrospect, I should have introduced myself. But I was not in networking-for-business mode, I was in I-need-to-finish-this-game-in-48-hours mode.

They were also understandably amateurish (well, they were still students). I could overhear them having problems over the simplest things in the Unity game engine. I did my best to stop sighing out loud. I kind-of wanted to help them, but I also needed to concentrate on my game.

I didn't want to come off sounding like a showoff also, considering I'm a one-man team competing in an otherwise roomful of teams who are mostly looking healthy in the members quantity section.

Marnielle Estrada was the only other one-man team in the jam afaik. Hats off to Marnielle for an awesome game! Check it out: Traversal.

Just being there working alone, I felt I was being obnoxious.

It made me feel like kind-of insecure, and it probably did affect my productivity in some way.

To their credit, that team behind me received the "Best Technology" award. This is their game:

My ego is saying "Ha! One time I finished a multiplayer mecha game in under 10 hours". But well, now that, is being obnoxious.

Back on the game.

For some reason, I recalled this Unity game called Silence in the Mist. A really, really beautiful looking game with minimalistic graphics.

Screenshots from Silence in the Mist

I thought I'd follow in its footsteps and make the world of the game similar to that.

For some arbitrary reason, I thought of making the trees pulsate with life every time you emit a heartbeat near one. I just thought it made sense.

So over time, I thought of the idea that your character went into this gray, lifeless world, and use his ability of emitting heartbeats to bring back life and color.

I only realized now, the trees look like cherry blossoms and the scenery reminds me of old Japanese films. The character is even wearing a straw hat, which I really put there on a whim, and didn't really have any significance.

I, using the expression loosely, called it a day at 5 AM. I got my character walking, a camera system in place, and the pulsing heartbeat visuals.

But what exactly do you do with the heartbeat ability you have?

I was wrestling with the sound lock idea. How do you play sounds other than a heartbeat? I thought that your character would absorb other animals' sounds.

Your character's color would change to reflect it. Absorbing a meow sound from a blue cat would turn your character blue, absorbing a bark sound from a red dog would turn you red.

How do you absorb and how do you release? It felt like it's veering away from the heartbeat theme.

My internal brainstorming was going nowhere. So I slept.

I, being the free spirit I am who does not plan ahead, did not bring any means to sleep comfortably.

Get the spare t-shirts, bundle them up like a pillow on the floor, BAM. There's your bed. End of problem.

Even while trying to sleep I can hear people judging my choice of bedding.

Day 2

By Saturday afternoon, I did the Barber's Knock puzzle, which took the whole day.

It's that distinctive "tap-ta-ta-tap-tap tap tap" melody of knocking you probably already know.

The reason why it's "Barber's Knock" is because I read in a novel that it was called that way. I didn't know it had a name.

Apparently, a lot of people too. I tried Googling for more info and the best I saw was only one forum post that was asking about it. Apparently it came from the phrase "shave and a haircut, two bits!"

No one got the reference though. I guess that makes the game hipster.

In code, I used the Listener/Observer design pattern, to let objects know of incoming heartbeats the player made. The objects are quite literally, listeners.

By night I started on the sound locks, or rather, a sound gate. I just went with the standard idea I had, a cat blocking your path, wherein you need to play its opposing sound for it to stand aside.

I couldn't think of a really nice looking dog (his bark would be the "key") but I did see a really cute drawing of a small cat, so on a whim, I made a small cat whose meow opens the gate.

I probably should have used a dog instead. A dog would have been easily associated with a cat, rather than a cat with another cat.

My idea then, was that pulsing a heartbeat on an animal will bring it to life, which will then follow you around.

After that, whenever you pulse heartbeats, your animal friend will meow or bark to the tune of the beat you did.

I had the sound gate working by 4 AM I think.

I then turned my attention on the really glaring problem of what the whole place will be and how you will achieve your goal.

So the goal was to bring the world back to life. My simple idea was to have a tower at the end of the level where you do something and a shining, blinding light you activate will finally brings things to life.

Something like that. Journey had a mountain you went to, so I thought mine would be a tower.

My idea then was the player needs to search the place for three animals and bring them to the tower. With all of them there, the tower rumbles with some mechanism and activates a pillar of light of some sort, and the game ends.

The three animals would be the cat, a wolf, and an owl.

Getting to the wolf would be puzzles based on driving away sheep with the use of the wolf's howl.

I thought of the standard see-saw puzzle where you need to put things at one end to tip the platform to where you want it, but it was kinda weird to explain it in story. Why would there be sheep in a see-saw platform anyway.

I also thought of raised platforms that act as levers. This is pretty standard puzzle fare on many 3d games.

I then thought of a Sokoban style puzzle where you push flocks of sheep so you can find a way to the exit. I spent too much time on that when in the end I decided the see-saw platform was more intuitive.

All of the ideas were pretty generic puzzles that don't really take a lot of advantage of the sound mechanic, it was basically conforming the sound idea to already existing game ideas (i.e. the see-saw physics puzzle, switch-platforms, or the Sokoban puzzle).

Then the owl was mainly on the idea of illuminating the darkness. It was a pretty standard puzzle: you walk on a platform of square tiles. There is usually only one path of tiles that are walkable but since it is pitch black, you can't tell which tile is a hole and which isn't.

The idea then was to manipulate light so you can see the path, usually for a limited time, which then you had to commit to memory as you walk through the path in pitch black again.

So I thought the owl, while having a hoot, will also illuminate the path with its eyes like a pair of spotlights.

It was again, a pretty generic puzzle but I had little time left so I had to settle with that.

It was already Sunday of something like 5 or 6 AM, and I had only settled on the concept of it.

Things didn't look very good. I called it a day.

Day 3

When I woke up at 10 AM or something, I thought, why don't I just sleep through the rest of it? I felt defeated.

Inside my head I can already hear the critics and the I-told-you-so's. I can already imagine my friends berating me.

Somehow I felt that I had to prove to myself that I was better than that. There are people whose greatest critics are their own selves.

I knew I had to drop some a lot of features. That much was clear. (That's also how it goes in work when the reality of deadlines loom on your face.)

So in the end, I just made the tower and basically when you went inside it, the game ends.

But I couldn't resist adding another puzzle so I put in a big fire bowl inside that you had to activate by sending continual heartbeats. Doing it enough would cause the whole tower to gain color and, at its peak, some flash of light would activate whatever power was sleeping in that tower.


Play tests proved that the game sorely needs a tutorial level. I purposefully decided against a help/instructions screen explaining the finer details because I want the game to naturally teach you as you play.

It seems to me people don't want to bother reading walls of text instructions anyway.

Unfortunately I wasn't able to deliver that "natural teaching" part. In this regard, I consider my game in its current state then to be a definite failure.

Maybe I should have made a tutorial level instead of the ending?

Yes, this was my genius plan to compensate for the lack of content. I got quite a few laughs from the audience at this, so it was probably worth it.

I also realized not everyone is keen on the rhythm puzzles (i.e. the speed of the heartbeat, the Barber's knock puzzle), so it was something I wanted to revise.

I probably could have seen it coming if I had people play-testing the game early and often. I had totally disregarded the "inspect and adapt" mantra of Scrum.

Someone actually had mistaken me for a student. Haha, seriously? How old do you think I am from this image?

Unexpectedly, I was awarded "Best Art" for the game.

I guess they liked the cats.

So that was my first Global Game Jam experience. Expect me in all future Global Game Jams as well! I'll make sure to take more photos next time.

Check out my game in the Global Gam Jam website: