Thursday, July 28, 2005

True Spirit

26th July 2005 – Mumbai, the financial capital of India was hit by a cyclone and the city witnessed almost 944mm of rainfall in less than 24 hours. The city has suffered serious damage both in life and property; army has been called upon for help. Normalcy will take time.

But what makes me write this blog, it’s the true spirit of Mumbai that the world always talked about and yesterday I witnessed it myself.

A time of disaster in India means extra moneymaking time for the corrupt and taking sadist advantage of the situation, but Mumbai witnessed heroes rise.

The rains was so severe that the Local trains stopped (the heart of Mumbai travel), busses stopped, taxis and auto stopped and most of the personal vehicles lay stranded in more than 10s of kilometers of jam. More than 100 of thousands of people took the roads on foot with more than 4 feet of water.

My office is 32 kilometers from my home and it took me 2 auto rickshaws, 1 taxi ride, 2 truck rides and a 10 km walk to reach home in more than 5 hours. But I consider myself lucky as some had to suffer more.

What failed?

Government failed miserably, I would say India should again go back to the status of under developed country. Mumbai had no disaster management service. People lay stranded for more than 36 hours, 1000s become homeless, 100s died and only thing that one got to hear in media was -

Police blames municipal corporation, municipal corporation blames the fire brigade department, fire brigade department blamed it on the Navy and the cost guard, they in turn blamed it on the failure of the mobile networks.

So you can see this is what we are best at, I am sorry not the people, let me rephrase this

“So you can see this is what are MINISTERS and LEADERS are good at, eating away the money and at time of questioning blame it on each other”. It’s so sad.

What did not fail and will never ever fail?

It’s the people. No one was there except the people and citizens of Mumbai for each other. Shopkeepers served tea and gave free food to the stranded; truck drivers and taxis gave free rides to people, travelers held each other and became support for one another. The true spirit of Mumbai and its people filled up the air.

I will never ever in my life will forget this day, as this day I realized the country is not of its leaders but of its people, a company is not of its bosses but of its employees and instead of me wasting time cursing our corrupt leaders, I should utilize it by helping the needy and praising the Heroes, praising all those unknown faces who came to the rescue with a single motive of serving humanity, god bless them all.

Thursday, July 07, 2005

Rains, Dishes and Dilemmas

Rains have started, water level is going up and so is the number of people falling Ill. I am down with fever and a terrible body ache. I am feeling very restless and i have not felt like this in a long time, I am sure it’s the fever and a very dull weather outside that is contributing a lot to this but I guess there is one more thing which in sub conscious state is adding to the misery.

I am stuck with one of the components of the game. Chef Rastogi

I have completed the Level Editor (more or less), its good enough for me to make levels, save them, load them and re-edit them, so that’s good enough for the time being.

When I started the design work for the Restaurant part of the game, in which the player decides what dish he wants to serve to the AIEaters, I landed in a dilemma. The problem is how can a Chunk of Computer Code figure out whether a Dish it just inputted was tasty enough or not.

A Brief on the Dilemma.

In the game dishes can be made up of a finite number of Ingredients (These are fixed).

Ingredients are divided into the following categories (If required these categories can be changed - but will be fixed for the final game)

  • Non-Veg
  • Vegetables
  • Fruits
  • Spices and Herbs
  • Pulses and Cereals
  • Others (Things like salt, Coffee, Milk, oil etc comes here)
So a dish can be made up of
  • 3 ingredients from Non-Veg category
  • 1 ingredient from vegetable category
  • 0 ingredients from fruit category
  • 4 ingredients from spices and herbs category
  • 1 ingredient from pulses and cereal category
  • 2 ingredients from others category
The name of the dish is a Chicken-Ham-Fish Sizzler with Rice and Potatoes

Sounds yummy

What are the various approaches for a Computer controlled entity - AIEater deciding whether it likes this dish or not?

Theory of Taste: There are in all 5 different kinds of taste buds
  1. Saltiness
  2. Sourness
  3. Sweetness
  4. Bitterness
  5. Umami

My Approach:
Each ingredient has 6 properties
  1. Salt Value [0-1-2-3]
  2. Sour Value [0-1-2-3]
  3. Sweet Value [0-1-2-3]
  4. Bitter Value [0-1-2-3]
  5. SPICE Value [0-1-2-3] (Note the difference here, not take Umami)
  6. Non-Veg or Veg Flag (Boolean)

Each AIEater also has his set of taste values besides his living standards, health, thrill of dinning out etc ,which are not required here)

  1. Salt Value [0-1-2-3]
  2. Sour Value [0-1-2-3]
  3. Sweet Value [0-1-2-3]
  4. Bitter Value [0-1-2-3]
  5. SPICE Value [0-1-2-3] (Note the difference here, not take Umami)
  6. Non-Veg or Veg Flag (Boolean)

Computation of a dish

Ingredient A - 1 2 0 1 3 True
Ingredient B - 1 3 1 1 1 False

if you add the above to make a dish, the dish will have
Dish XYZ - 1 3 1 1 3 True (Higher value is taken; note 1 and 1 does not make the dish (2) twice salty as the proportion of food (Quantity) also increases.

Now AIEater will like this dish if the values match his taste buds (with some variance)

PROBLEM WITH THIS APPROACH:

The taste properties of more than 1 dish can be same, despite of being made up of different ingredients.

Therefore,

Chicken ADD SOYA SAUCE - Taste Good to AI
Chicken ADD ICE-CREAM - ADD Salt - ADD Vinegar - Taste Good to AI

But the later is YUCK!

Phew!

What I am looking for is a more practical and sensible (Making Sense out of a dish) approach for the AIEater to enjoy his food.

PS: AIEater are working on a very simple genetic algorithm (right now)
They are born with a set of taste buds and they evolve their taste buds as the game progress.

Any ideas or random thoughts on this can help me out. Please mail me

Wednesday, May 25, 2005

Chef Rastogi's Development Progress

A good set of tools is priceless for any game development, it streamlines and eases out the entire process.
So i decided to start off the project by making a level editor for Fight Arena. I am trying to make it as simple as possible for anyone to make good clean levels, place enemies, traps and play test it there and then. The test can be paused, things can be edited at run time and the AI and game codes will update themselves accordingly.

Here is a screenshot of the Chef Builder (Work Under Progress)


Thanks to Amit's Game Programming Pages I also implemented A* algorithm for pathfinding, right now i am using Manhattan distance (Heuristic) for it, this is the simplest of all. Later i will modify it to accomodate moving obsticals and planned huntdowns.

I plan to have a alpha build ready soon, and i will post the executable on the website.

Next Steps for the editor:

  1. Movable Objects in the Editor
  2. Realtime level updation
  3. Power-up/ingredients placements
  4. Some UI thingis
  5. Documentations


Next Steps for the game:


  1. Collecting data on popular dishes and their ingredients.
  2. Designing the FSM for the AIEater

So till the next update, cheers and have a nice time

Thursday, May 05, 2005

Food for Aliens

Food for thought Aliens

Couple of week’s back I was playing a game called Diner Dash. This - a very simple game with cute art and good sounds really kept me engrossed. I always liked the idea of owning a restaurant. I am a food lover, the shear idea of going out to a restaurant makes my mouth water, besides the love for food a lot of time me and my friends have discussed this idea of opening up a restaurant of our own. Every time the discussion starts seriously and after couple of rounds of beer, we end up blowing up the chef and waiters with a bazooka.

But this time, at my friend’s place we landed up talking about how fun will it be to make a game on restaurant simulation with a prospect of some bad guys to be blown away. We all are die hard fans of Bomberman; I even designed and programmed - Bomberbabe a 3d make over of this game for my company around a year back.

Anyways so we decided that I will start putting up a design document on a game which has both the core fun of bomberman and a reasonably extensive toon restaurant simulation.

Chef Rastogi and The Food Stealing Aliens

Story: Aliens from planet ME-HA-RA invade and they steal all the food from planet earth (Dhuh! Don’t ask why please!). A group of earthlings develop a teleporter that can be used to travel back I forth between Earth and ME-HA-RA.

Mr. Rastogi thinks of a bright idea to use this teleporter. Steal back the food ingredients from the Alien planet and set up a restaurant in Khau-Gali (Slang for Eating Lane).

Yeah I know I am terrible story writer :(

So that’s the story for the time being, if you think that you can help me a bit more to develop this story please email me, though this story has nothing in practical to do with how the game will be played. But its always nice to have a good story.

So, what will be the game play you might ask?

  • Buy space for your restaurant at Khau-Gali.
  • But tables and chairs to start it all up.
  • Invade ME-HA-RA, bomb their place to find hidden food ingredients, example find cheese, buns, and chicken.
  • Unlock dishes from the existing menu, example Chicken Cheese Burger.
  • Hire Chefs, waiters, bar tenders, valet parkers etc.
  • Upgrade restaurant for better tables, chairs, lighting, music, ADD interesting DISHES.
  • Buy bomb powers from the local arms shop.
  • Control your won money the way you want.
  • Get more ingredients to unlock different cuisines.
  • Make your own dishes.

And yes competing with other restaurant owners in matching price, variety and quantity.

Who will come and eat food?

AIEaters – Computer controlled characters, they will have their own set of moods and taste buds.

I can keep on going with lots of crazy ideas, but I think its now time to write up a proper document and start planning and coding.

If you love food or if you love bomberman and would like to comment on this please mail me.