Inventory got all AJAX’d up

Over the weekend I enlisted the help of my old pal Zach Lysobey to give me some tips on adding Ajax functionality to Nano. Zach and I have been working together as a web design and development duo for years now as Rough Giraffed. He’s no stranger to javascript, AJAX and programming in general so he was able to hook me up with the basics real quick.

Ajax is a technology that does lots of stuff for websites/applications, but for Nano the primary benefit is avoiding full page refreshing. This is another step into making Nano feel less like a browser game and more like a standard video game. Avoiding the flicker of a full page refresh will hopefully make the player feel like they haven’t left the game world to enter an Inventory screen. Instead the Inventory screen opens right there, as an overlay to the standard World screen.

The screenshot above can’t show the Ajax functionality in action, that’ll have to wait for the video demo. But what you do see is how the current, basic Inventory screen looks. On the left is the character’s inventory with a list of Cards, and Items gathered from the world or winning events. You see a bunch of Kick cards because, while testing, I had my ol’ Test Dummy only dropping Kick.

On the right is the character’s Deck list. These are cards that the player can use while in combat. Currently, there are only about 15 cards in the deck, but later there will be a minimum deck size that will, most likely, be greater than 15.But, I’ll get more into Deck editing, and Items in another post.

For now, just know that there will be a lot of this kind of effort put into making this browser game not feel like a traditional frame-based browser game.

Basic Survival and Character Score Added


You’re wandering around a forest. You’re don’t know where you are, but you aren’t lost. Where you are isn’t something you are concerned about, but where you are going to get your next drink of water, or bite of food is.

I’ve added some basic ‘Survival’ mechanics to Nano. As you move from location to location you gradually build up Hunger and Thirst. Meat and Water Jug consumable items have been added to sustain your character. If a character reaches a certain hunger or thirst threshold they will begin taking damage whenever they move to a new location as they slowly dehydrate or starve to death.

Currently the only way to get your hands on Meat or a Water Jug is to win a random encounter with an enemy, and then hope that enemy drops the consumables. This is causing a bit of an issue because there is currently only a 10% chance a character will get into a random encounter, and on top of that there is an 20% chance the enemy will NOT drop a consumable. Meaning, consumables are fairly rare, while starvation is common. It’s like a virtual 3rd world country.

So next up is adding more sources of food and water. One thing I plan on adding is environmental sources of sustenance. Rivers, streams and lakes that provide water, and edible plants to reduce hunger. I hope this will keep vegans off my back as well.


I also added some simple Scoring mechanics. Currently, a player is awarded points for every combat encounter that they win. The value of the combat is determined by the type of enemy encountered. Soon I’ll be adding more ways to up one’s score, such as points for discovering new locations, or perhaps acquiring hard to get items.

The idea of having character’s maintain a score is that eventually there will be a leaderboard. Where players can compete to be top dog. Aside from that I’d like to have a character history page. A page where a player can go and see all of his/her old, deceased characters, along with the character’s score upon death. This will allow players to try to beat their personal best score as well as compete against other players.

Weekend Update 05-12-13

Some updates from this weekend:

  • UI improvements for the World screen. It still have a ways to go, but it’s a start.
  • Random Monster Encounters! Characters are now hurled into combat randomly when they enter a new location.

Probably going to need to reconjigger Cards and combat again to make room for more complex card interactions. I’d like to avoid making a separate method for each card, but I think some cards will require it.

Thinking about making more complex card interactions means I might have to step my AI’s game up. Perhaps that is where I can begin implementing the learning AI I’ve been wanting to experiment with.

I need to add a lot more content, more Cards, Enemies, Terrains, Items, etc. I’ll make a form that I can use to easily add those things to the database.

I hope to have a veeeeery early build “playable” in a few weeks, if anyone is interested in trying out what I have so far.