Home About Recent D&D Journal: I Generic A* for Games Procedural Island Generation Data-Oriented Design Matters Favorite Android Games Game development Generic A* for Games Procedural Island Generation Data-Oriented Design Matters Misconceptions of Component-Based Entity Systems Level of Detail Experiments Planet Generation - Part II Planet Generation - Part I Procedural Generation in Games Oculus Rift Integration Android Favorite Android Games NDK with Android Studio Android NDK Programming - Part III Android NDK Programming - Part II Android NDK Programming - Part I Personal Personal Stuff: Running! Global Game Jam 2014 Experiences Anime Claymore The Twelve Kingdoms Games Favorite Android Games Dungeons & dragons D&D Journal: I

Google+ Shanee Nishry Twitter @Lunarsong

Hi and welcome to my blog in which I pretend to know HTML and hope nothing breaks :)

I am a game developer working at Google and I love graphics programming, virtual reality and game engine architecture.

Hope you'll enjoy my blog and feel free to reach out on social networks.

Comments? Feedback? Send me an email! stream+feedback@shanee.io.

This is a journal page from a D&D adventure played at Google London. It was written very late but someone might enjoy it.

"Ah, you are awake" said the red haired wood elf as the woman opened her eyes. Trying to speak, the woman realizes that she is gagged and tied to a tree.

That's right... She been knocked out.

The evening before...

After fighting off the werewolves, the group recovered the tracks of the wagon and have made their way north.

On the way they encountered the cart of a traveling merchant with two guards, going to see the chestnut festival. Garrett asked the merchant halfling if he had seen people with a similar pin to that of the cultists. The merchant who asked for money in return for the information had noticed Garrett, not happy to pay, trying to conjure an illusion of coins. Deciding the information is worth some coin, Garrett reached to offer 5 gold pieces.

Jenny who snuck into the merchant's cart decided otherwise and threatened the halfling with a dagger to the throat. The two guards guarding the cart were surprised to the appearance of the elf and unsure where to aim their crossbow,...

Read more

The A* algorithm is most commonly used for pathfinding. However most developers neglect its ability to be used for other purposes.

In this post I will briefly go over the A* algorithm and then show how to generalize it and use it for purposes other than pathfinding, such as AI.

GOAP AI

Brief Introduction to A*

A* is an algorithm to find the shortest path from one node to another. It evaluates the current node and if it isn't the end node it finds all nodes linked from the current node, estimates their distance to the end node, sets the current node as a parent node, and adds them to a list called the open list.

The open list is then polled for the node evaluated as closest to the end and repeats the process until the end node is discovered or no more nodes are available in the open list, in which case there is no possible path to be found.

Heuristics

The estimation works by giving each node three heuristics, called the G, H and F costs:

G value is the cost of moving to this node from the start node. This is...

Read more

In this quick tutorial I will go over a simple method to generate the data needed for representing an island for a game or graphic application.

Islands are the natural extension to simple terrain generation. Islands can be of many different sizes with their own internal biomes and ecosystems and the surrounding water creates a natural game border limiting the playfield of the player without the use of fake borders and error messages that tend to break immersion.

Procedural Island

Read more

Lately I had the opportunity to speak about game development in quite a few conferences and I always tried to sneak a few minutes about data-oriented design. I feel it is very important and will explain why in this post.

The first thing a programmer must understand is that memory is slow and the way you code affects how efficiently it is utilized. In most programs the CPU tends to wait idle for memory to work on because programmers declare the data in a way which is meaningless to their order of operations.

The easiest way to see that is with an example. See this code:

char data[1000000]; // One Million bytes
unsigned int sum = 0;

for ( int i = 0; i < 1000000; ++i )
{
  sum += data[ i ];
}

An array of one million bytes is declared and iterated on byte by byte. Now let's change things a little to gain some understanding over the hardware.

char data[16000000]; // Sixteen Million bytes
unsigned int sum = 0;

for ( int i = 0; i < 16000000; i += 16 )
{
  sum += data[ i ];
}

The array is changed to contain sixteen million bytes and we iterate one million of them, skipping 16 at a time. It seems like there shouldn't be any effect on performance as the code is translated to the same number of instructions, however that is not the case. Here is the difference graph on a logarithmic scale.

Benchmark Graph

The average difference in performance is 5x and is consistent when iterating 1,000 bytes up to a million bytes, sometimes increasing up to 7x. This is a serious change in performance that must be accounted for in programs.

Read more

One Friday a colleague complained to me saying there are "no good games on Android" and while I can't deny it isn't easy to find good games, especially being an avid gamer who loves role-playing and strategy games and doesn't enjoy most casual games, saying there are "no good games" is still a stretch.

The question came at the end of a Friday and to ensure he gets a good number of games for the weekend I sent him a list including some of my personal favorites. After receiving the list he told me I should put it online for others. Normally I wouldn't do so but I decided if I keep posting new lists every now and then it should be OK. So let it be the first of many.

Strategy Games

I love strategy games and for a long time I have wished for Civilization, Heroes of Might & Magic and the Settlers to come to Android.

While the Settlers is still not here in a good form, I've got two thirds of my wish granted.

Civilization Revoulution II

Play Link

For those who are not familiar with Civilization: It is a game where you play as a leader of a country and advance through time until you reach to victory (or defeat). Victory conditions include cultural, conquest, science and diplomacy which allows for a varied way to play the game.

For those who are familiar with Civilization, I feel the Android "Revolution" version is very much true to the original when compared to Civilization V, although somewhat simplified to fit the touch screen but overly simplified and is still a great game.

Civ Rev II

Read more
Home About Recent D&D Journal: I Generic A* for Games Procedural Island Generation Data-Oriented Design Matters Favorite Android Games Game development Generic A* for Games Procedural Island Generation Data-Oriented Design Matters Misconceptions of Component-Based Entity Systems Level of Detail Experiments Planet Generation - Part II Planet Generation - Part I Procedural Generation in Games Oculus Rift Integration Android Favorite Android Games NDK with Android Studio Android NDK Programming - Part III Android NDK Programming - Part II Android NDK Programming - Part I Personal Personal Stuff: Running! Global Game Jam 2014 Experiences Anime Claymore The Twelve Kingdoms Games Favorite Android Games Dungeons & dragons D&D Journal: I