Author Archive

- bash: gcc: command not found

February 28th, 2010 shyam No comments

I was recently trying to use gcc from Terminal on my Mac. My path was set up properly, and I had used gcc before without any problems.

When I upgraded to Snow Leopard, apparently the upgraded developer tools were not installed. To solve the problem, I had to run Xcode.mpkg in the “Optional Installs” folder on the Snow Leopard installation cd.

Thanks to the following link for providing the solution: “Snow Leopards Ate My C Compiler”.

Categories: General Tags:

XNA DebugOverlay Utility

November 21st, 2009 shyam No comments

The DebugOverlay utility is a class that I’ve been using in my XNA projects for a while. It allows me to draw visualization objects from anywhere in my application – even in separate threads.

Some areas where I have used this utility are:

  • The AI system can display a units’ velocity and position through Lines, Arrows, and Spheres. Use ScreenText to show the current state or goal hierarchy of a given unit.
  • The Physics system can use bounding boxes and spheres to show collision volumes. Points can be used to show raycast intersections or points of impact.
  • The Graphics system can use Spheres, Lines, and Arrows to show the position and direction of lights.
  • The Editor (or other tools) can use Lines, Arrows, and Bounding Boxes for axis representation during translate/rotate/scale.
  • Vertex Display – For a software-based skinning implementation, I used Points to visualize the locations of my vertices, and Spheres for the locations of the bones. It’s possible to use Spheres for everything, but thousands of Spheres can get a little expensive.

This utility is only meant for Debug purposes, and therefore uses the [Conditional("DEBUG")] tag on each of it’s exposed methods.

To use the DebugOverlay, create the object during Initialization:

1
new DebugOverlay(GraphicsDevice, Content);

Call the visualization functions from anywhere in your code:

1
2
3
4
5
6
void ScreenText(string text, Vector2 pos, Color c)
void Line(Vector3 start, Vector3 end, Color color)
void Arrow(Vector3 start, Vector3 end, float arrowSize, Color color)
void BoundingBox(BoundingBox boundingBox, Color color)
void Point(Vector3 pos, Color color)
void Sphere(Vector3 pos, float radius, Color color)

In your Draw routine, call the DebugOverlay.Draw method, passing in the projection and view matrices:

1
DebugOverlay.Singleton.Draw(mCamera.ProjectionMatrix, mCamera.ViewMatrix);

I made a small sample application to show off the functionality. Below is a screenshot and the complete source code.

Download: source + demo

Categories: Code Tags: , , ,

EverQuest – 10 Years Later

October 1st, 2009 shyam No comments

I stumbled upon an interesting journal at GameStudies.org. The current issue is titled Special Issue – EQ: 10 Years Later. (EQ aka EverQuest).

The article entitled Towards a Critical Aesthetic of Virtual-World Geographies, focuses on the first few years of EverQuest, when it was still a game very much oriented towards the hard-core player. It was an extremely dangerous world, with harsh and unforgiving penalties (corpse runs!). Without many of the forms of instant travel that appeared later in the development of EverQuest, the continuity and spatial layout of the world was preserved. It took a long time to get from point A to point B. Because of this, there were secluded areas that were hard to get to, and there was a real sense of a large, dynamic, and truly epic world. This brought rise to trade and economic systems that closely mimicked the real world.

In EverQuest and other online worlds, the game designer and the player indirectly work together to shape the geography of these virtual playgrounds. Geography, as described by Wikipedia, is split into two main branches: Physical Geography and Human Geography. In the case of EverQuest, the designers physically create the world, and are therefore responsible for the physical geography (walls, terrain, building placement, etc). The players are the inhabits of the world, and are responsible for the human geography (social, cultural, and economic aspects).

Through the course of the article’s analysis, I came to understand why players often established their own trading outposts in areas such as the East Commonlands Tunnel, Greater Faydark, and North Freeport. Although these locations may be very different from where the designers intended them to occur, they have a root cause that ties back to the original game design.

East Commonlands and Greater Faydark are both easily accessible via druid and wizard low level teleport spells. North Freeport is a little farther from it’s closest teleport location (West Commonlands), but it has a bank, and is easily accessible by both good and evil races (via the sewer system).

Although I am only pointing out a very specific example (ad-hoc market creation and trading in EverQuest), it sheds light on much broader concepts of migration and human interaction in the real world.

There is never any explicit consent or agreement from the players as to where to create these ‘hubs’ of interaction. Creation is driven unknowingly by the player and the player’s necessity. This creation process is guided (also sometimes unknowingly) by the rules that the game designer has created, and which are governing the world. These ingredients serve to create a truly living and dynamic virtual world.

* * * * *

I will end, in tribute, with an extremely nostalgic video – the original EverQuest intro video.

Categories: General Tags: ,

FreeMind

September 30th, 2009 shyam No comments

I learned of a new program today, called FreeMind. FreeMind is a cross-platform, open source, mind-mapping application. It looks like a great tool for both brainstorming and conceptually solidifying ideas. It also can be used as a convincing presentation tool, visually showing the flow of data and information to the audience.

Categories: General Tags: ,

Ritsurin Park

September 27th, 2009 shyam No comments

This past week was Silver Week (シルバーウィーク) here in Japan. I visited the southern island of Shikoku (四国). While there, I made a trip to the city of Takamatsu (高松市), and a famous park within the city, called Ritsurin Park (栗林公園).

Categories: Japan (日本), Photos Tags: ,

Palak (Saag) Paneer

September 26th, 2009 shyam 2 comments

This recipe was originally inspired by the VahRehVah website, and the corresponding Youtube video. There are some great recipes there, but I think some of them are slightly more complicated (and spicy!) than they need to be. I have made some modifications to the original recipe, and posted my version below. Notable differences include the omission of green chili, some whole spices (I prefer powders, in general), and the inclusion of yogurt.

Recipe: Palak (Saag) Paneer


Picture:

Ingredients

  • 2 medium onions (diced)
  • 1 medium tomato (diced)
  • paneer cheese cubes – (usually comes frozen; may or may not be fried – either is fine)
  • fresh spinach
  • canola oil
  • 1 tbsp ginger garlic paste
  • 1 tsp cumin seeds
  • 1/2 tsp turmeric
  • 1/2 tsp garam masala (too much will be overpowering)
  • 1/2 tsp chili powder (adjust to taste)
  • 1 tsp coriander powder
  • 4-5 curry leaves (optional)
  • plain yogurt (optional)
  • cream (optional)

Instructions

  1. Rinse spinach and blanch in boiling water for ~2 minutes. Put spinach in a blender and liquify – retain some of the water to help purée the spinach better. It is also full of vitamins !
  2. Put oil in pot.
  3. Add cumin seeds (you could also add mustard seeds if desired)
  4. Add onions and some salt to help cook the onions faster. Fry till nice and brown.
  5. Add the ginger garlic paste. Cook for a minute or two.
  6. Add in tomatoes. Cook for 5 minutes or so until the tomatoes are very soft.
  7. Add spices (turmeric, garam masala, chili powder, coriander powder).
  8. Add a little water so everything mixes well (1/4 cup or less). You can add more/less at the end to get the desired consistency. Bring to a slight boil.
  9. Add in the liquefied spinach. Cook till nice and bubbly.
  10. Add in cubed paneer. Heat on low for a few minutes to get the paneer warm, especially if it was previously frozen.
  11. Finish off with a splash of cream and a few tablespoons of yogurt.

Cooking time (duration): 40 minutes

Diet type: Vegetarian

Number of servings (yield): 3

Categories: Recipes Tags: ,

Chickpea Curry

September 25th, 2009 shyam 1 comment

My mom’s recipe, slightly modified.

Recipe: Chickpea Curry


Picture:

Ingredients

  • 2 medium onions (diced)
  • 2 medium tomato (diced)
  • 1 can chickpeas – (aka garbanzo beans)
  • canola oil
  • 1 tbsp ginger garlic paste
  • 1 tsp mustard seeds
  • 1 tsp cumin seeds
  • 1/2 tsp turmeric
  • 1/2 tsp garam masala (too much will be overpowering)
  • 1/2 tsp chili powder (adjust to taste)
  • 1 tsp coriander powder
  • coriander leaves (optional)

Instructions

  1. Heat oil.
  2. Add mustard seeds. Heat for a minute.
  3. Add cumin seeds.
  4. Wait till mustard seeds start to pop. The cumin seeds are added slightly after the mustard seeds, because the cumin will burn if added too early, and you need to wait for the mustard seeds to pop before proceeding.
  5. Add onions and salt to help cook the onions faster. Cook till slightly brown.
  6. Add ginger garlic paste. Cook for a minute or two.
  7. Add tomatoes. Cook them well.
  8. Add spices (turmeric, garam masala, chili powder, coriander powder).
  9. Add 1/2 cup of water or so to help mix the spices together. Bring to simmer.
  10. Add the chickpeas from the can. You can also use some of the water from the can to add natural salt. I don’t use all of it, because it is too salty.
  11. Bring to simmer.
  12. Top with coriander leaves (optional).

Cooking time (duration): 40

Diet type: Vegetarian

Number of servings (yield): 3

Recipe by on.

Categories: Recipes Tags: ,

Mattar Paneer

September 24th, 2009 shyam 2 comments

This recipe originally came from VahRehVah, but I have heavily modified and simplified it for my own tastes.

Recipe: Mattar Paneer


Picture:

Ingredients

  • 2 medium onions (diced)
  • 2 medium tomato (diced)
  • paneer cheese cubes – (usually comes frozen; may or may not be fried – either is fine)
  • frozen peas
  • 1/4 handful of cashews
  • canola oil
  • 1 tbsp ginger garlic paste
  • 1 tsp cumin seeds
  • 1/2 tsp turmeric
  • 1/2 tsp garam masala (too much will be overpowering)
  • 1/2 tsp chili powder (adjust to taste)
  • 1 tsp coriander powder
  • cream
  • coriander leaves (optional)

Instructions

  1. Heat oil. Fry cashews till light brown.
  2. Add onions and salt to help cook the onions faster. Cook till slightly brown.
  3. Add ginger garlic paste. Cook for a minute or two.
  4. Add tomatoes. Cook them well.
  5. Put entire mixture into blender. Blend until completely liquefied.
  6. Clean out the previously used pot completely (or get a new pot!).
  7. Put some oil in the empty pot and heat up.
  8. Add the cumin seeds.
  9. Add the mixture from the blender.
  10. Add spices (turmeric, garam masala, chili powder, coriander powder).
  11. Add 1/2 cup of water or so to help mix the spices together. Bring to simmer.
  12. Add frozen peas. Cover and bring to boil (~5 minutes).
  13. Add paneer cubes. Simmer 5-10 more minutes.
  14. Add a splash of cream.
  15. Top with coriander leaves (optional).

Cooking time (duration): 40

Diet type: Vegetarian

Number of servings (yield): 3

Categories: Recipes Tags: ,

Artemis Chronicle Tools

August 15th, 2009 shyam No comments

During the first semester of working on NitroX and Artemis Chronicle, our design and content pipeline was very slow. Simple things like creating a level and placing a box were arduous tasks. Placing an item involved flying the camera around the level, writing down it’s rough coordinates, hard coding the coordinates, and then tweak these values until the box is in the desired position. (Thankfully, we were using C# which pretty much eliminated any compile time. Doing this in C++ would have been impossible).

This created a situation where we were unable to prototype levels quickly, and time that could be better used somewhere else was being wasted.

Because of this, I devoted the first few weeks of the second semester to full-time tool development. Two of the more useful tools created are described below. These tools, once created, were continuously used and refined throughout the entire life of the project.

Level Editor:

Artemis Chronicle and the NitroX engine have a completely integrated level editor. The editor allows 3D navigation through the world (using Maya camera controls), object placement (translation, rotation, scale), object property exposure (including physics volumes), trigger volumes (used for scripted events), and interactive camera sequencing (allows us to create cut-scenes and cinematics in a point-and-click fashion instead of in code).

The editor runs on Windows and is written in C#, allowing for close integration into the XNA content pipeline. The editor data is serialized out to an XML format (which is later compressed for application deployment), sent through the content pipeline, and imported directly into the NitroX engine for use on both Windows and Xbox 360.

Mesh Viewer:

The Mesh Viewer is a tool that lets our artists quickly preview their work before sending it off to be integrated into the latest build of the game. As anyone who’s used the FBX exporter knows, exporting from Maya does not always go smoothly, so this tool allows the artist to catch any errors early, thus saving time for the entire team.

Animations can be chained together to create sequences, and then previewed in a real-time manner. Playback speed, blending parameters, and looping can also be adjusted via the user interface.

Categories: Code, General Tags: , , , ,

Bananas Foster

August 11th, 2009 shyam No comments
Recipe: Bananas Foster

Ingredients

  • 2 bananas
  • 1 cup brown sugar
  • 1/2 stick butter
  • 1/8 cup spiced rum (1 shot)
  • 1/2 tsp vanilla extract/essence
  • vanilla ice cream

Instructions

  1. Peel and cut bananas lengthwise and in half, then set aside.
  2. Remove the ice cream from the freezer and allow it to soften.
  3. Set burner to medium to high heat.
  4. Place the butter into the saucepan, stirring continuously to prevent burning.
  5. Add 1 cup of brown sugar to the melted butter and stir constantly, this should be allowed to cook and caramelize for about 3-5 minutes. Once the brown sugar and butter mixture is the consistency of warm maple syrup, turn the burners to low.
  6. Add the banana slices. Allow these to soften. The bananas should be completely coated by the sugary mixture.
  7. Once the bananas have reached a more rich color of yellow add the vanilla extract. The vanilla will seem somewhat overpowering until thoroughly stirred in, and allowed to cook. When the smell of vanilla has reduced in strength, add the spiced rum to the mixture.
  8. Give about 10 seconds to simmer. After this, take the lighter and carefully light the mixture.
  9. Let the mixture burn itself out.
  10. When the fire has extinguished itself, pour the Bananas Foster (while still warm) over (or next to) vanilla ice cream.

Notes

  • Have a pan lid to smother unusually wild-FLAMES!
  • Keep a fire-extinguisher / container of water handy just in case!
  • Use a metal pan if possible. Teflon pans may not get hot enough, so it may not catch on fire properly.

Cooking time (duration): 10 minutes

Number of servings (yield): 4

Meal type: dessert

Categories: Recipes Tags: