Wendy dev/blog

Archive for the ‘Coding’ Category


GDC Wrap up

Mar 13, 2012 Author: Wendy | Filed under: Coding

I just got back from GDC in San Francisco. While I didn’t end up getting to a ton of sessions, being able to reconnect with friends and contacts was exceptionally useful. I got the chance to pitch Traveler’s Quest to Sony for their mobile platform Vita. The response I got was positive, so I’m going to try and push that forward and see what happens. No commitment on that one from either side, but it would be a lot of fun to create.
I was amazed to run into so many people that I knew at GDC both students and people I’ve worked with. It was weird to see how many people had actually left larger companies and are working on their own projects with smaller teams. It’s pretty neat to see.

Unity3D – Keypresses in a Custom Editor

Feb 27, 2012 Author: Wendy | Filed under: Coding

A few weeks ago I switched my strategy game development from XNA to Unity. The main reason was cross-platform deployment. As I’m targeting XBLA as the end platform for my game I needed to make sure that the technology I went with was able to run there but in the event I couldn’t get it published on that platform I didn’t want all of my work to go to waste. In came Unity. If needed, I can turn around all that I’ve done for the Xbox and deploy to Windows or iOS devices. Since we are still a small company, this flexibility is necessary.

Another of the huge benefits I’ve seen with Unity is the ability to use their toolset as a game editor, allowing me to lay out the levels without creating an additional set of tools. Over the past week I’ve been creating my own custom editor windows and components to handle the creation of levels for the game. One of the things I needed to be able to do was create not only a hex grid but be able to change the materials associated with each hex quickly.  The first part, creation of the hex grid based on width and height input came together pretty fast, but the editor for the hex material has taken a bit longer. Originally I created a dropdown when a hex is selected with the list of the materials available, but even with a 20×20 grid, doing a dropdown for 400 items gets tiring fast. I needed a quicker way of changing the item in the dropdown and wanted to be able to select material based on keypress as well. Now selecting a single hex and hitting a key allows the material to be switched really quickly. Since I had a hard time finding examples as to how to use keypresses in an editor window I’m going to make mine available for anyone else that might need something like this. You can find the code below.


public class HexEditor : Editor
{
/// OnEnable - hit when the script is triggered
public void OnEnable()
{
SceneView.onSceneGUIDelegate = Update;
}

/// <summary>
/// Update the specified sceneview.
/// </summary>
void Update(SceneView sceneview)
{
Event e = Event.current;

if ((e.isKey && e.character >= '0') && (e.isKey && e.character <= '9'))
{
int index = e.character - '0';
ChangeTile(HexTileInfo.HexType.HEXTYPE_EMPTY + index);
}
}

/// <summary>
/// Raises the inspector GUI event.
/// </summary>
public override void OnInspectorGUI()
{
ChangeTile((HexTileInfo.HexType)EditorGUILayout.EnumPopup("Tile",((HexTileInfo)target).hexType));
}

/// <summary>
/// Changes the tile - Switches between the type of material needing to be assigned
/// </summary>
private void ChangeTile(HexTileInfo.HexType type)
{
if ((type < HexTileInfo.HexType.HEXTYPE_EMPTY) || (type >= HexTileInfo.HexType.HEXTYPE_NUMTYPES))
{
return;
}

// set the type for this hex
((HexTileInfo)target).hexType=type;}
}

Is the Freemium Model Worth it?

Feb 17, 2012 Author: Wendy | Filed under: Coding, Game News

Traveler's Quest
For the longest time I was a big supporter of the premium model. Release a product and charge people to buy it. Seems like a simple concept, but the Apple AppStore isn’t a simple environment. With such a huge install base it made sense that if you could get your game into the hands of just a small percentage of those users you could survive and grow. The hard part is getting people to make that jump from just looking at your game to clicking the purchase button to try it for themselves. The price is the user’s greatest barrier to entry, even if it is only $0.99. Expectations of quality have risen while expectations of price have dropped.
Traveler’s Quest, the first GPS social treasure hunt game, was launched to the AppStore in 2009. Traveler’s Quest challenges users to track down virtual treasures in the real world. Initially the user base grew steadily while the game sat in the new release list but as the game slipped down so did the influx of new users. Advertising, releasing updates, putting the word out on Twitter and Facebook did little to get the attention the game needed.
For two years, Traveler’s Quest has had a small, yet extremely loyal fanbase that have spread treasures around the world from the U.S. to Australia, to Europe and Japan. Some treasures have traveled the world as they’re buried only to be found by other players to continue on their travels.
In late 2011 we signed up for a Free App a Day promotion and took away the largest barrier to gathering new users. Over the course of a few days, our user base doubled. A few thousand new users streamed into the game, spawning new treasures and giving our existing players new competition. After the promotion ended, the stream of new users slowed back to the trickle we had seen before. Even though new users were slow to come in, the revenue the game was making was steadily increasing through In-app purchases for upgrades. Although the game is completely playable without making any additional purchases, a lot of the new users were giving themselves a quick boost.
We had originally hoped that the influx of new users would tell their friends about Traveler’s Quest who would then purchase it after the promotion was over. Unfortunately that word of mouth advertising we were hoping for didn’t materialize. What did happen though surprised us. After doing a quick comparison, we saw that even though we had given the game away for free, the amount of revenue coming in had increased. The freemium model started to make sense.
In the months since the last promotion, we spent our time adding new features to the game and updating the server side to handle a lot more users. As of the start of February 2012 we’ve removed the largest barrier to play, Traveler’s Quest has gone free permanently. The amount of new users has doubled again and steadily growing. While it will be a bit before we can say definitively that this was the best move, initial revenue reports are promising.

The greatest feeling though is finally seeing a larger number of people enjoying the game and seeing treasures crossing the globe. I wonder where they’ll end up?

Extending the XNA Framework Content Manager

Sep 8, 2011 Author: Wendy | Filed under: Coding

I’ve been spending the past few weeks putting together a game project using XNA and ran into a brick wall in the functionality of the built in content manager. When I load in my game resources, internally they all get dumped into a single list. This causes me to have to dump all my resources from the content manager at one time. Normally, for small games this isn’t much of a problem, but start having games with multiple stages and VRAM gets filled awfully quick.

Doing some research, I came across a blog post by Shawn Hargreaves detailing how to extend the Content Manager and replace the default tracking implementation.

The content managers I’ve worked with in the past on Xbox360 and PS3 gave the ability to load resources in and track them in separate bins and I was looking for something similar for the XNA Framework. To this end I inherited a new class from ContentManager called BinContentManager.


class BinContentManager : ContentManager
{
// dictionary of contentBins
private Dictionary _contentBinDictionary = new Dictionary();

// single bin active at one time
private ContentBin activeBin = null;

public BinContentManager(IServiceProvider services) : base(services)
{
}

public BinContentManager(IServiceProvider services, string rootDirectory)
: base(services, rootDirectory)
{
}
}

The BinContentManager class needs a few methods to make it usable:

// Add a new bin to the manager
public ContentBin AddBin(string name)
// remove an existing bin and free all internal resources
public void RemoveBin(string name)
// get a bin back to the caller
public ContentBin GetBinByName(string name)
// switch to another active bin for loading, using resources
public bool SwitchActiveBin(string name)
// overridden version of Load from the ContentManager
public override T Load(string assetName)

The main functionality of this class comes from the dictionary of ContentBin objects. Each time I load in a new resource, it gets loaded and dropped into the currently active ContentBin. By sectioning off resources into separate bins, I can load in menu UI resources into a separate list from my resources that I use in game. This allows me to dump the UI sepecifically when going into game and then dump game resources when going back to the main menu. As the game I’m creating has a lot of team specific resources, each time a new game is run, different resources will be necessary based on the user team selection. This extension to the content manager allows me the freedom to use and drop resources as I wish.

To make the system completely usable from a higher level, I did create another class on top of this called ResourceManager who has the job of abstracting away the content manager functionality from the main game code as it doesn’t really have to know how all this works. The ResourceManager also understands the concept of ResourceBundles, which are groups of resources compressed into a zip type format and can all be parsed and loaded in one go.

My next major step is to make the BinContentManager threaded to allow resources to be loaded on other threads, but at the moment this is working fine for me allowing me to get on with the game play I should be working on.

About - Wendy Jones

    Wendy Jones I am co-founder of KittyCode, LLC, a software development studio in Orlando, Florida and a Course Director at FullSail University teaching iPhone mobile programming.
    Geek girl, gamer, and Twitter lover. This blog is my outlet, so expect to see posts about my progress, products, and life.

Flickr PhotoStream

    queenMinnie  DragonSlayerAcademy boardgame  DragonSlayerAcademy boardgame  fairytale-fights-10  

Twitter Updates...

  • If you love Hurricane for iPhone, give us your honest review on the app store http://t.co/gB0mcwQL. If you don't have Hurricane grab it! 4 hrs ago
  • First tropical storm of the Atlantic Hurricane Season has formed off the North Carolina coast. http://t.co/M3buhVnc 7 hrs ago
  • Going to see if I can find a new desk today. I've had my current one since highschool. My dad built it and it's lasted forever. 11 hrs ago
  • Anyone have any experience with Havok's Vision Engine? 13 hrs ago
  • Picking up my daughter from Magic Kingdom, traffic sucks. 1 day ago
  • More updates...

Pages


Blogroll


Game News


Interwebs


Categories


Archives