Sunday, May 23, 2010

No need to say good bye

It started out as a feeling
Which then grew into a hope
Which then turned into a quiet thought
Which then turned into a quiet word

And then that word grew louder and louder
'Til it was a battle cry

I'll come back
When you call me
No need to say goodbye

Just because everything's changing
Doesn't mean it's never
Been this way before

All you can do is try to know
Who your friends are
As you head off to the war

Pick a star on the dark horizon
And follow the light

You'll come back
When it's over
No need to say good bye

Now we're back to the beginning
It's just a feeling and now one knows yet
But just because they can't feel it too
Doesn't mean that you have to forget

Let your memories grow stronger ans stronger
'Til they're before your eyes

You'll come back
When it's over
No need to say good bye

Tuesday, September 18, 2007

Be Angry and Sin Not

Its not Saturday, nor I am free, but I took out some time to write this post on the emotion which I thought should be given some credit, as we in our daily life experience it lots of times. I thought I should do some research on this very important, yet hated emotion.

So, you have lots of emotions. At different times, you may be happy, sad, or jealous. Anger is just another way we feel. It's perfectly OK to be angry at times — in fact, it's important to get angry sometimes. But anger must be released in the right way. Otherwise you'll be like a pot of boiling water with the lid left on. If the steam doesn't escape, the water will finally boil over and blow its top! When that happens to you, it's no fun for anyone.

"Be ye angry, and sin not. Let not the sun go down upon your wrath, neither give place to the devil" (Ephesians 4:26, 27).

It's okay to get angry at times, but don't act upon it. Eph 4:29 says don't let corrupt communication proceed out of your mouth. Meaning if one gets angry keep it to yourself.

I think even god gets angry sometimes. Many religious or other guides to behavior discuss anger in some way.

* The Bible warns "do not let the sun go down on your anger"; that is, do not let feelings of anger last so long as to become sinful, but rather, deal with them before they reach that point. There is, however, what is commonly referred to as "righteous anger", as demonstrated by Jesus when he made a whip and cleared out the merchants in the Temple. In Romans 1:18, the sin of man also provokes the wrath of God, who not only punishes sinners, but also provides a way for them to appease His Wrath.
* In Islam, anger is seen as a sign of weakness. Muhammad said, "The strong is not the one who overcomes the people by his strength, But the strong is the one who controls himself while in anger." and "The best of you are those who are slow to anger and swift to cool down... Beware of anger, for it is a live coal on the heart of the descendants of Adam."
* Anger in Buddhism is defined here as: "being unable to bear the object, or the intention to cause harm to the object". Anger is seen as aversion with a stronger exaggeration, and is listed as one of the five hindrances. It is a common misconception that spiritual saints never get angry. This is not true: even the Dalai Lama, the spiritual Guru of Tibetan monks, gets angry. However, there is a difference; most often a spiritual person is aware of the emotion and the way it can be handled. Thus, in response to the question: "Is any anger acceptable in Buddhism?' the Dalai Lama answered:

"Buddhism in general teaches that anger is a destructive emotion and although anger might have some positive effects in terms of survival or moral outrage, I do not accept that anger of any kind as a virtuous emotion nor aggression as constructive behavior. The Gautana Buddha has taught that there are three basic kleshas at the root of samsara (bondage, illusion) and the vicious cycle of rebirth. These are greed, hatred, and delusion--also translatable as attachment, anger, and ignorance. They bring us confusion and misery rather than peace, happiness, and fulfillment. It is in our own self-interest to purify and transform them".

* In Hinduism, anger is equated with sorrow as a form of unrequited desire. The objects of anger are perceived as a hindrance to the gratification of the desires of the angry person. Alternatively if one thinks one is superior, the result is grief. Anger is considered to be packed with more evil power than desire.


What I am trying to say here is its okay to be angry. I don't know, why I am trying to justify that its okay to be angry at times but there are lots of points which helps me prove this. Another quote to support my point is :

Love implies anger. The man who is angered by nothing cares about nothing.

Edward Abbey says love implies anger. I think he is true, someone who do not care about anything can never get angry. And if you care about someone, you will get angry. Thats a good justification for being angry.

Another interesting theory is "Anger is Love". According to Linda Dove, we have been taught that anger is destructive, that by being angry we can hurt someone or get hurt ourselves.

Anger is a way of saying to the Universe and those in it that you deserve to be treated in ways that are unconditionally loving and respectful. Think of anger as a divine “force” that cleanses and makes room for something more loving to grow. When we speak of anger, we are talking about expressing anger from an understanding of the Oneness. When this happens we come to value not only our own Selves but also those of “others.” How can this be true, you might ask, when to express your anger could be hurtful of other’s feelings or get yourself hurt?

Read the full article here:
http://neholistic.com/articles/0031.htm

So, I think is good to be angry, but whats important is that we should control it and should not let it act upon us. I have no idea, why I am writing about anger. Everything seems to work out very well in my life. I am enjoying the fast pace of changes happening in my life. I think I should stop justifying each and everything happening in my life and should concentrate on this which are important for me, or may be I am just too angry with myself.

I will continue to explore various emotions which I go through ( though I still claim that I am not angry), and would like to thanks Wikipedia in my this endeavor.

Saturday, September 08, 2007

Untitled



Title of this post is not "Untitled" but the image displayed above. I don't know whether you will understand the meaning for this image now, but by the time you will finish reading this post I think you will know what I am talking about. By the way I really don't know why I am writing this post, may be its Saturday, and I don't like to work on Saturday or may be something else.

So it all starts with Wikipedia. For those who do not know Wikipedia, it is a multilingual, web-based, free content encyclopedia project. Wikipedia is written collaboratively by volunteers from all around the world. With rare exceptions, its articles can be edited by anyone with access to the Internet, simply by clicking the edit this page link. Coming back to the point, I was reading about emotions on Wikipedia , now why I was doing that is again a mystery. I found that Emotion, in its most general definition, is a complex psychophysical process that arises spontaneously, rather than through conscious effort, and evokes either a positive or negative psychological response and physical expressions, often involuntary, related to feelings, perceptions or beliefs about elements, objects or relations between them, in reality or in the imagination. Never thought that something as simple as emotion will be so complex, and the term has no single universally accepted definition.

I thought I should research this topic more, and I found out that there are total 43 kinds of emotions. Wow, 43 is a big number. Though I was impressed by this one emotion, which also happens to be the title of this post.

This emotion is a constellation of emotions and experiences related to a sense of strong affection or profound oneness. The meaning of this emotion varies relative to context. Sometimes it is seen as an ineffable feeling of intense attraction shared in passionate or intimate attraction and intimate interpersonal relationships. Though often linked to personal relations, this emotion is often given a broader signification, its a emotion of humanity, of nature , with life itself, or a oneness with the Universe, a universal emotion or karma . It can also be construed as Platonic emotion (name) , religious emotion, familial love, and, more casually, great affection for anything considered strongly pleasurable, desirable, or preferred, to include activities and foods. This diverse range of meanings in the singular word (name of this emotion) is often contrasted with the plurality of Greek words for (name of this emotion) reflecting the concept's depth, versatility, and complexity.

Let me first tell you what are those other 42 emotions. They are:

Acceptance, Affection, Aggression, Ambivalence, Anger, Apathy, Anxiety, Compassion, Confusion, Despair, Disgust, Doubt, Ecstasy, Empathy, Envy, Embarrassment, Euphoria, Fear, Forgiveness, Frustration, Guilt, Gratitude, Grief, Happiness, Hatred, Hope, Horror, Hostility, Homesickness, Hysteria, Loneliness, Paranoia, Pity, Pleasure, Rage, Regret, Remorse, Sadness, Shame, Suffering, Surprise and Sympathy.

Interesting thing is all of the above emotions are one way or another related to the emotion which I have been talking about. I can keep writing about the relation of each of these emotions with the central emotion, but I think it will all be meaning less if I write about them without feeling those emotions.

One thing which I am feeling right now, and may be that is the reason why I am writing this post, is this emotion is so strong that you would give up everything. To just feel it once, to know that you are part of something special. To know that you can feel what this emotion really is; to know, to feel, to (the title of this post).

Wednesday, March 28, 2007

FIA clamps down on flexing floors

Ferrari and BMW Sauber are likely to have to modify the designs of their cars' floors after a warning was issued by FIA technical delegate Charlie Whiting.

Apparently following an informal complaint made by McLaren Mercedes at the Australian Grand Prix, Whiting has sent a letter to all teams informing them that detailed checks will be carried out on cars' underbodies during scrutineering in future to ensure that teams are adhering to the rules about banned moveable devices.

The floor designs of both Ferrari and BMW passed the former flexibility checks in Melbourne, but the teams are likely to present modified cars to scrutineers on the Thursday of the upcoming Malaysian Grand Prix.

Spain's Marca newspaper, meanwhile, revealed that McLaren brought the matter to the FIA's attention with a letter from engineering chief Paddy Lowe, in which he asked the governing body for permission to apply a similar design to its own MP4-22 model.

2007 Technical Regulations: 3.17 Bodywork flexibility:

# 3.17.1 Bodywork may deflect no more than 5mm vertically when a 500N load is applied vertically to it 700mm forward of the front wheel centre line and 625mm from the car centre line. The load will be applied in a downward direction using a 50mm diameter ram and an adapter 300mm long and 150mm wide. Teams must supply the latter when such a test is deemed necessary.
# 3.17.2 Bodywork may deflect no more than 10mm vertically when a 500N load is applied vertically to it 450mm forward of the rear wheel centre line and 650mm from the car centre line. The load will be applied in a downward direction using a 50mm diameter ram and an adapter of the same size, Teams must supply the latter when such a test is deemed necessary.
Cliquez ici...
# 3.17.3 Bodywork may deflect by no more than one degree horizontally when a load of 1000N is applied simultaneously to its extremities in a rearward direction 780mm above the reference plane and 20mm forward of the rear wheel centre line.
# 3.17.4 Bodywork may deflect no more than 5mm vertically when a 500N load is applied vertically to it at a point which lies on the car centre line and 380mm rearward of the front wheel centre line. The load will be applied in an upward direction using a 50mm diameter ram, teams will be required to supply a suitable adapter when such a test is deemed necessary.
# 3.17.5 The uppermost aerofoil element lying behind the rear wheel centre line may deflect no more than 5mm horizontally when a 500N load is applied horizontally. The load will be applied 800mm above the reference plane at three separate points which lie on the car centre line and 250mm either side of it. The loads will be applied in an rearward direction using a suitable 25mm wide adapter which must be supplied by the relevant team.
# 3.17.6 In order to ensure that the requirements of Article 3.15 are respected, the FIA reserves the right to introduce further load/deflection tests on any part of the bodywork which appears to be (or is suspected of), moving whilst the car is in motion.

Thursday, March 22, 2007

JavaME Tips: Safe Mobile coding

Did you know that I make mobile games? Yes I do and I code games using programming langauge called Java 2 Mircoedition(J2ME). I found this wonderfull article on one of the mobile game developer magzines. If you are also in mobile gaming and coding you will enjoy it..

Author Bio: Pascal Bestebroer, Technical manager, OrangePixel

With an experience of game design and development going all the way back to the old 8-bit era, Pascal Bestebroer has, in the last couple of years, written and designed over a dozen games for mobile devices. From original concepts to classic platform and shooter games, he has proven to understand mobile games and game design in general. He has been actively helping begginers and independent developers by writing various articles with an endless enthusiasm.

There are many talented developers out there who are writing mobile games. Thanks to the free tools available and the fairly simple language, J2ME has become the most popular environment to write mobile games in. It brings us back to the days of bedroom and basement coders writing a complete game in a months time, unlike the huge PC and Console projects that require 30-100 people working a couple of years.

However, even though most developers can write a fairly decent game, the big problem that this area of game-development has is the fragmentation of mobile devices. No matter what developers forum you visit, or what industry people you talk to, they always come up with the same problems: every mobile phone works in a different way.

Now this was a huge problem in the early days of mobile games, and although it still is a problem today, it should be noted that it is a lot less of a problem and one that can be remedied for the most part.

In this article I will discuss some tips, mainly aimed at the indie-developers out there that want their game to be distributed and/or published by other companies. We (www.OrangePixel.net ) get weekly requests of people offering their games for publishing, and in most cases we have to say “no thanks”. Not because the games are bad, cause as mentioned before there are some very talented developers out there, but we say no because the game simply is not trusted to run on a lot of phones.

Emulators are crap

First the main rule: Don’t trust an emulator! No matter who created it or what phone it tries to emulate. Don’t trust the freaking things. You would think a specific emulator for a specific phone brand or model would do the exact same thing as the phone. However most emulators don’t seem to use the same J2ME environment as the actual device.

Our developers usually just use Sun’s WTK Emulator to do most of the development and testing of the game logic, and for some simple things we use a brand specific emulator to test out some low resolutions and special API support.

For the rest, we use real phones in most of the major phone families.

We are family


You can usually trust all Nokia40 devices to run things in the same way, same with all Nokia60. Further more all Sony midp2 devices seem to have much the same code and they usually don’t have any strange bugs in them. Same with Sagem midp2 devices.

For the Motorola phones most of the 300,400,500,600 series are the same, except for some issues with the soft keys where some firmware versions use negative numbers and others use positive numbers.

You can find lists of most of the major brands on their developer sites, and it is worth checking into to find the similarities, of course you will need some testing out, but once you know where the bugs are it isn’t that hard to code around them.

Midp2 got nothing on me

Now let’s start with some of the code tricks and tips to make your code run on as many devices as possible. The first and easy trick is: midp1. Just write your code in midp1, cause there is not much that midp2 offers anyway.

All the fancy sprites and layers stuff is usually very badly implemented. No optimising is done, and it can be done A LOT better using your own specific code. The only useful stuff that MIDP2 provides is the setFullScreenMode () call and MIDI playing.

Most developers that dive in will start using the layers and sprites and collision stuff, etc. I’ll be honest, I did the same thing a few years ago. So trust me on this, be warned, learn my lessons, and keep your code simple and keep control.

Sprites

“So how do I handle sprites?” you might ask, well, it’s simple. You just clip and draw images. Really it is that simple. Say you got the below image strip:


Figure 1.1

As with the normal sprite class you store your images in a sprite-strip. Let’s say every frame in your image is 24x24 pixels in size, now if you want to display frame 0 it’s a simple matter of:
Int x=0;
Int y=0;
Graphics.setClip(x,y,24,24);
Graphics.drawImage(mySprite,x,y,Graphics.LEFT|Graphics.TOP);



The X and Y variables define the location where you want to display the sprite and the 24x24 defines the width and height of your sprite. The clip will make sure only the first frame is displayed at position X,Y.

If you want to display the next frame in your strip, you simply shift the drawImage with 24 pixels (size of the first frame) like so:
Int x=0;
Int y=0;
Graphics.setClip(x,y,24,24);
Graphics.drawImage(mySprite,x-24,y,Graphics.LEFT|Graphics.TOP);



As you can see we set the clip still at the position of (X,Y) but we draw the image 24 pixels to the left of that area, effectively showing the second frame in the strip since that image will fall in our “clipped window”. The advantage of drawing your sprites with this technique is that you have a lot more control over what you draw and how to optimise your images, and it should be faster then the Sprite class on most phones.

Old school collision detection

Although the pixel-based collision detection of midp2 is very nice, it is not something we can’t live without. There are many ways to do collision detection, and these range from very simple to very bloated.

As you can imagine I prefer the very simple collision detections. It will not be as accurate as some other ways, but let’s face it, we are looking at a tiny mobile screen that doesn’t have the best of quality (on most devices anyway). So why would you want to do pixel-perfect collision detection? Who would notice the 2 empty pixels at the edge of a sprite? (Answer for those thinking this is a quiz: nobody).

So how to do the most basic collision detection, well the ingredients are: The (X,Y) values of 2 sprites (player + monster, or monster+bullet, etc) and the (width,height) of both those sprites. Finally mix those ingredients with this cool function:
public final boolean collide( int pX1, int pY1,
int pW1, int pH1,
int pX2, int pY2,
int pW2, int pH2) {

if ((pX1<=pX2+pW2) && (pX1+pW1>=pX2) && (pY1<=pY2+pH2) && (pY1+pW1>=pY2)) {
return true;
} else {
return false;
}
}



That fairly simple function should take care of your collisions! What you do is a rectangular check on the two images, by checking if the 2 object-positions overlap. To break it down into some normal English, the overlapping happens when all of the below are true:

* * If the left edge of Object1 is smaller then the right edge of Object2

* * If the right edge of Object1 is bigger than the left edge of Object2

* * If the top edge of Object1 is smaller than the bottom edge of Object2

* * If the bottom edge of Object1 is bigger than the top edge of Object2



If you want to give the player a bit more advantage, you could decrease the width and height values of either both or one of the two objects. This gives the player a little extra margin of error and could give your game a better feel.

Independent resolutions


Something that is hard to work around is the variation in screen resolutions. Now you could write different versions for every resolution available, but you would be much smarter to make your game scale dynamically to the resolutions.
All our games are written with resolution-variations in mind. We constantly use the displayWidth() and displayHeight() values to centre images, draw extra status bars, display a bigger playing field, etc.

As some would argue that you can’t use the images designed for a 128x128 display on a 176x220 display, I say “yes you can”. Of course you have to decide what the most important resolutions are to target. These days I think the 176x220 resolution is the most common one, with the 128x128 still very much available on the many nokia40 devices that are in use.

With this in mind, we tend to create our sprites in a size of 24x24 pixels, this looks bright and clear on a 176x220, while not being “to big” on a 128x128 resolution. For background images (tile’s) we generally go with a 16x16 size for every tile.

It will require some extra thinking and creativity about your game interface, but making your game independent of the resolution will make porting to many different devices so much easier.

Image management

One of the stranger and more annoying problems is probably the problems with Images. Although this is slowly becoming a problem of the past, there are still phones around that have problems with images that are bigger then the display screen. Now I have no clue how this can happen, and why the phone manufacturers bugged it like that, but it happens.

So to be on the safe side, try to keep all your images at a maximum size of 128x128 pixels. Images that are wider or higher then 128pixels can cause problems on handsets out there.

Some more crappy phones will even demand a 127pixel size as maximum, but then you are talking about phones that shouldn’t be running games to begin with cause they can’t handle it. So stick to the 128x128 size and you should be safe.

Finally try to keep your images to only 256 colours, this should be more then enough for decent looking sprites, as I would personally say that a palette of 64 colours is usually enough to cover most of the images in a game.

Memory management

Another problem that is luckily becoming less and less of an annoyance, is with memory. As we all know Java works with a garbage collector, however this can be a fairly lazy garbage collector. Although the java implementation SHOULD do garbage collection, on a fair amount of phones it will not always do it’s job.

I’m not going into the problems with this, cause there are many different views on how things work on some phones, ranging from only collecting garbage that won’t leave gaps to not collecting at all.

From our experience the following few tricks should help you stay on top of things:

* * Try to load your most general images at the start of your game, and never release them. So think about the main player sprites, a bitmap-charset, a logo image, special effect images, etc. Basically the images you use through out the complete game.

* * Avoid loading when it’s not needed. If you load new graphics for every world of your game, make sure you only load them when the world changes. So if a player just finished level 1 of world 1, and continues to level 2 of world 1, don’t load the graphics since you already have them. It saves a lot of memory issues and garbage collection problems to keep the loading of graphics to a minimum.



A good test is to set the memory of your emulator to a low value and play around a bit. Make sure to set that memory lower then an actual device would have, since the Emulator most likely does a better job of garbage-collection. Personally I prefer to use the Nokia40 emulator with it’s 120kb memory limitation, cause if a game runs on that, you should have no memory problems on any of the newer devices.

Jar sizes

Although it’s hard to give tips on this that are new, I still feel like this is a very important part of making your game available on as many handsets as possible. Most of the games I see submitted for publishing are bloated JAR files that are around 200kb in size. Although in a few more years this might not be a problem due to better data-traffic rate’s and phones, right now 200kb is just way to big.

Tricks to keep your JAR files down in the order of small optimisations to big optimisations:

* * Use small file names; Not a big thing, but using 1 or 2 characters for file names, and removing the extensions saves bytes.. simple as that. If possible don’t use many subdirectories for your resources, just dump it all in one directory, again saving extra bytes by not having to keep track of sub directories and their names in the Jar file.

* * Remove messy files; Very often you will see things like “thumbs.db” files in jars, or “temp.txt” files that are obviously not used by the game but are stupidly included in the Jar file. Make sure this don’t happen as they can easily add kb’s to your Jar.

* * Use PNG optimisers to make your images smaller. This can range from simply optimising the colour palettes of the PNG files, to removing the shared-palette from all PNG files and assembling those PNG files in your game, saving about 768bytes per image.



Although many people will tell you to use different Zip methods to create your Jar, we strongly recommend NOT to do this. It is asking for problems with phones that can’t handle those methods and simply won’t run or recognise your Jar files.

Finally

I honestly hope the above tips will help people getting their games to run on more phones. I guess that the most important thing to understand is that you should stay away from any strange tricks and geeky idea’s.

Keep your code simple and your resources optimised. Create your own framework, or blueprint if you like, to build your games on. This will allow you to build more games faster, with shorter test periods, and less strange bugs.

And finally, don’t give up when your first game crashes on most phones you test it on. Identifying those bugs and problems will help you in future projects.

Tuesday, February 06, 2007

Vodafone Mclaren Mercedes Blog

After was about thinking about starting another blog exclusively for Formula 1 (my interest and my hobby) and Team Mclaren Mercedes for quite some time. On my 23rd Birthday, I gifted my self a new blog dedicated to my favorite Formula 1 Team Vodafone Mclaren Mercedes. I present to you "Vodafone Mclaren Mercedes Blog":

http://mclarenf1-akash.blogspot.com

This blog covers team Mclaren Mercedes and will have all the news,views and analysis about all the Formula1 events. This is my second effort on Web to show my love to Mclaren Mercedes team. Earlier one, is a Orkut Community "TEAM McLAREN MERCEDES INDIA" which is India's Biggest Mclaren Fan community. You can visit this community at: http://www.orkut.com/Community.aspx?cmm=10621278

Please visit the blog and feel free to comment on it.

Friday, February 02, 2007

Orkut adds Videos

Orkut is now is the same league as Myspace, Hi5, Porkolt and other social networking websites which allow user to upload the videos. Only differnece is you have to upload videos to Google video or Youtube (Bought by Google) and then add the link of video under favourite video. I could see this coming as only features which Orkut missed compared to Myspace and Hi5 were Music and Videos, and with Google have power of Youtube and Google Video, favourite video was the next thing.

Orkut turned 3 years old and they added videos. I turned 23 today and even I am adding video to my blog. Also I will be posting more frequently from now on and you will get lots of Formula 1 news/videos/and pics on this blog. Becuase I am a Mclaren Mercedes Fan, blog will be focused on it.

To begin this I am adding my first video. I hope you enjoy it.