Author Archives: Aditya Ravi Shankar

All the money and cool stuff – Why are you still unhappy with your life?

You thought you wanted money. You thought once you had enough you would be happy. But everything still seems empty. You find that you are still dissatisfied with your life. Something still seems to be missing.

The money doesn’t work like it was supposed to. Nothing you buy with it works.

Everything you get is fun for maybe a day, and then you start feeling lost and empty all over again.

New kinds of food. Yeah that works. For a while. And then even that makes you start feeling empty inside.

Why are you unhappy with your life when you have everything you wanted? Especially all the money and the things that you thought would give you the perfect life?

Why don’t you feel happy now?

Well. Here is a dirty little secret from the past that everyone has been hiding from you

Money is not really something worth considering as an end in itself. It was never meant to be the final goal.

Money has always just been a very crude and approximate way to estimate how much you have been able to help others. A simple way to keep score of how much good you did and how much it has meant to others, and nothing more than that.

It was never supposed to be the end goal.

The real goal is and has always been to help others in the best way that you know how, and always do the best that you can.

Always.

Then somewhere along the way, someone decided to destroy a beautiful system of caring for others by putting a horribly evil thought in your head – “If I just focus on money, then I can get others to do good for me without having to do any good for others”.

And after that, suddenly people started trying to make more money so that they would eventually never have to do anything and one day “retire”. But that one day never came.

Because that money never really gave any peace. All it did was bring misery. But everyone kept trying, hoping that one day this thought would magically change it’s nature and start giving them peace. And even that day never came. All that came was more misery, that they tried to push away with more things that didn’t help them find true peace.

They didn’t find peace because they didn’t realize that the thought they had started believing was a lie. Any thought that doesn’t get you closer to true inner peace is always a lie.

Because what was really meant to bring us peace was to give and care for others and love them unconditionally without expecting anything in return with complete faith and trust that every other being was doing the same.

Who wouldn’t find peace if everyone cared for you and loved you more than they did themselves? It’s all you would ever feel. Peace and everlasting bliss.

Why would you not want to go back to that? Caring about others more than yourself? When you could have this instead of all the pain?

Let go. Let go of that silly voice that says money is important. In your heart you’ve already started realizing that this isn’t true.

Listen to it again while ignoring the voice and you will know what you truly desire. And if you follow your heart, it will lead you where you truly want to go.

Then you will learn what will make you happier than you have ever felt before. You will live a life beyond your wildest dreams. Anything you think ever dreamed about is possible. And yes. Even the ones you are afraid your loved ones will laugh at.

YES. Even that one.

It is possible.

You know this in your heart.

Journey To Perfection – The Three Meditations For Finding Perfect Inner Peace

There are only three meditations that you need to find complete and permanent inner peace.

And I don’t mean a little bit of quiet or a little bit of peace. Once you reach the final step, everything will change forever.

You will feel that you have arrived. You will realize that you have finally found everything you have been searching for all your life. You will find yourself completely and totally at peace, all the time.

You won’t even need to do anything like these meditations once you reach this point. These are just meant to show your mind and heart a few different things that will help them understand what is needed to make that seemingly magical but completely effortless transition take place. And once they understand, they will do everything for you.

You don’t need to do anything but try these meditations so that you can just experience what I am describing. Once you feel and understand what I am saying completely, nothing else is needed. I promise.

So just go ahead and start these. Don’t worry about how soon it will work. Don’t wonder whether it is working. Just try them and see what happens.

The three meditations are:

1. Watching Your Thoughts

The first meditation is to watch both your thoughts and feelings and observe them.

You can do this alone in the comfort of your own home. You can even journal your observations to study them or understand them better.

Once you build confidence in your ability to do so, go out in the world and keep watching how these thoughts and feelings seem to work.

You will find two kinds of thoughts in your head.

i) Your Feelings As Words

The first kind are just a simple (and sometimes limited) translation of your feelings.

For example: “Oh I think she is cute. I just want to hug her.” (or him)

ii) Judgements On Your Actions Or Feelings

The second kind of thought is one which sometimes judges and says that what you are feeling is wrong, or what you want to do is wrong, or what you just thought was wrong.

For example: “I can’t tell her she is cute. She might think it is weird. Or she might not want me to hug her. Maybe if I say something else she will want to hug me. Maybe if I pretend not to…..”

In time, as you keep observing, you will notice that EVERY time the second thought creeps in, you usually end up feeling disconnected, lost, regretful or unhappy – some form of pain.

And every time you follow your feelings and the first kind of thought and ignore the silly “THIS IS WRONG” thoughts, you feel lighter, happier and better.

Even the times when the girl doesn’t want to hug you back, you will feel so much happier that you let her know and that you tried, than when you express a diluted version of your emotion or say something different from what you actually felt…

And want to know a little secret?

Each time you feel the desire to hug them, they sense it. They might not even realize that they do, but somewhere deep inside a part of them knows.

And each time you say something else or do something else instead of what they sensed you wanted to say or do, it breaks their heart.

It breaks their heart and hurts them, because they feel the connection between the two of you break – they feel lost because they don’t feel connected with you any more, even though they might not realize that this is what actually happened.

And every time you actually do or say exactly what you felt and that they had sensed, they feel more connected to you than ever before.

Because suddenly they feel like they know and understand you better than anyone else. Because suddenly, what they feel and what they see and what they hear is perfectly in alignment with each other whenever they are with or around you.

And then, whether they hug you or not, I promise you they will always be grateful for that sense of connection you created with them.

And each time you connect with a human this way, I can promise you that you will come alive, and so will they.

And that is what this meditation is really meant to show you.

2. Clearing Your Mind

The second meditation is where you spend time alone focusing on a single, simple, repetitive task and observe the nagging thought/voice commenting in the background. As you watch it, without judging it (because you would need to use that same annoying thought/voice if you were to judge), you will find the voice quiet down.

Even if you don’t find it quieting down, don’t feel unhappy or the need to judge and say “Why can’t I do this. What is wrong?” , because you would need to use the same annoying voice to even say that. Just be OK and watch what is happening as best you can.

If you do notice your thoughts going in a judgmental direction, even that is OK. Don’t judge them. Even at this level (or the next, or the one after that), finally just be OK with what is happening. At some point, just say “Fine. Whatever! It’s OK. Let me just watch and see what is going on in this crazy head of mine”.

And as soon as you start accepting it, while you may still have thoughts, the second kind of thoughts will gently start quieting down.

And then you will find the judging thoughts disappear completely for brief periods of time. In time these periods may become longer.

And in time, you will be able to do this not just while sitting alone, but in every walk of your life, just like the first meditation.

Each time you feel this quiet, you will find a sense of incredible peace and joy that you may have never felt before. You will get a taste of what perfect inner peace all the time will feel like once that annoying voice finally goes away completely.

And that is what is this meditation is really meant to show you.

3. Connection And Caring For Another

The third meditation is where for brief periods of time, you care more about another human being than your own self. You care only about their happiness, and their joy, and their well being, and their pain, and nothing but them. All you want is for them to feel better.

The three simplest examples of this that I can give you are –

i) A Hug

Each time you hug a person, you can only care about one thing – that at the end of the hug they feel better than before.

Ignore the nagging voice if necessary.

For those few seconds, focus on only one thing – the person and whether they are feeling better.

The perfect meditation would be when at the end of a hug the person looks content and peaceful and feels connected to you, grateful because you understood them and happy that you cared so much about them.

Don’t worry if you don’t get it right. Don’t judge. Just keep trying. Be OK with whatever does happen.

ii) A Conversation

If you can care about someone entirely for a whole hug, then start trying to care entirely about them for entire conversations.

During the conversation, you no longer care about proving a point, being right, whether you look or sound right or whatever else the nagging voice says.

Just trust your feelings, and directly express them into words as honestly and accurately as you can. Don’t worry about saying the wrong thing. You won’t. Whatever you say will be exactly what you need to say. Whatever happens as a result is exactly what needs to happen.

All you care about is what they are feeling and how you can help them feel better. Same outcome as before – helping them feel more connected to you and more at peace with themselves.

Try your best to quiet your inner judgmental voice, but even if you aren’t able to, just do your best and be OK with not being able to do more, and be content with whatever you just achieved.

There is no immediate goal here. Just keep trying. Each time you try, your heart will better understand what it means to care for someone else and how to get better at it. You aren’t teaching your brain, you are teaching your heart.

iii) A Partner Dance Or Any Physical Connection

This isn’t an easy one to explain. But once you can connect with people emotionally, and pay more attention to them than you do to yourself, you can try to connect to them both physically and emotionally.

A perfect dance connection lets you know what your dance partner wants to do as much as it lets them know what you want to do. So at times you are dancing not what you want but what the other person wants, but without ever realizing which one of you really wanted to do the step.

People watching from outside should never be able to tell who is leading and who is following, and in fact, after a point, neither should you.

For those few minutes, the two of you should become a single entity that think and feel as one, and nobody should be able to tell who’s thoughts they are seeing expressed in the dance. The only thing you should care about is the other person’s happiness, and if the connection is perfect, the only thing they will care about is yours.

Through practicing this, you will learn to connect with others in a way that you have craved all your life, even though you never really realized that this was what you had been craving.

Everything you have ever done in life has been in search for a complete and pure connection with someone. Once you get a taste of even short periods of total connection, you will know in your heart and soul that this is what you were truly searching for.

And that is what is this meditation is really meant to show you.

The Final Step

Once you have truly understood these three, then you will be ready for the final step.

Combining all of these experiences into a single permanent feeling that comes from within and lasts forever.

And at this point, it should just happen automatically.

You know that the inner voice hurts you, you know that with it gone you are able to hear other people’s thoughts better and connect with them better, and you know that all you have ever wanted all your life is that perfect connection with someone.

At this point, there is only one thing that needs to happen to grant you everything that you have ever wanted all your life, and in your heart and mind, you have understood it. Your heart and mind finally understand what you truly want and what they need to do to help you get it. And most importantly, nothing has to come from outside, it just has to be and adjustment that they need to make for you while you just trust them and wait patiently.

I promise you, that once you reach this point, you will forever be changed.

So just get going. Start this journey. I promise you it is worth it.

What I have described is all you need. However if you have questions or trouble in applying these steps, please ask. I’ll try my best to add more explanation to make this transition easier for you. I promise you that this works, and that it is easy and effortless.

If it doesn’t feel effortless, you are doing something wrong. It might seem slightly boring or annoying at times, but it isn’t difficult or painful. It should feel simple and easy.

Start slow, take baby steps, and try your best never to be hard on yourself. Be patient and kind to yourself just as you would be to a child trying to learn to walk. It’s OK to make mistakes.

It’s OK to take time. As long as you are on this path, you will get there eventually. And everyone else who has ever taken this path will instinctively be drawn to you to help you if you need help.

Know in your heart, that everything is going to be OK and that you are meant to get there, however long it takes. So just relax and enjoy the journey.

PS: I use a girl in my examples to illustrate the point. But connecting with every human being is the same principle. Please don’t let my inadequate mastery over the language prevent you from understanding what I intended to say.

Aiming without Aiming Part IV – Breaking Down The Details of Aiming and Shooting a Billiards Shot

An interested reader very recently reached out to ask me a very simple question – “When you are actually shooting/cueing the ball on the final stroke, where are you looking? Where and what are you focused on?”.

Most players who have been playing for a while might not even be consciously aware of where they actually look during the aiming process. However, since I have been actively working on improving my potting consistency for snooker over the last few months, I actually happened to have written notes that I used to track, fine-tune and improve my technique.

I am now going to break it down into more detail than most people will ever care about. I realize it takes a little bit of obsessive behavior to micromanage or study this level of detail, and I do admit that I can be obsessive at times. However from my experience, once you actually pay attention and take these seemingly minor things to a consistent level, the amazing improvement in your aiming and shooting more than makes up for all the effort.

So here goes. This is the series of steps that I used to shoot more consistently now days.

  1. Before getting down on the shot, I see the line from the object ball to the pocket, and in my mind, figure out where the cue ball needs to go and hit the object ball. If you are just starting out, you can use one of the simpler aiming systems I have lined out in previous articles  (How I really aim a billiards shotA system for making long cut shots). However in the long run, this becomes more of a memory/intuitive thing. At this point, I “just know” from tons of shooting where I need to hit the ball. Use the aiming systems as a temporary crutch/approximation, with the intention of moving past it eventually in the long run.
  2. I then line up my body and cue so that I am pointing precisely along the line from the cue ball to that specific point near the object where the cue ball needs to go. Note that MOST of my aiming happens before I get down on the shot, not after.
  3. While being aware of this second line, and while watching the object ball, I slowly walk forward and lower into position. It is important to be aware of this line while placing your bridge hand on the table since your bridge has to be on the line. It is also important to be aware of this line while you lower and place your chin on the cue, since not doing so will mean you might lose your alignment and not be pointing the cue along this line (that you already KNOW is the correct line). For this reason, don’t allow yourself to be distracted while getting down on the shot, and continue to look along the line from the cue ball to the special aim point on the object ball, and keep that line in mind while getting down.
  4. After getting down on the shot, while wagging/stroking the cue, I double check that I am still in alignment and that the object ball will go along the line I need it to, by verifying both the first line and the second line. During this time, my eye moves back and forth between the object-to-pocket and cue-to-object lines while I do my practice strokes. With time you will get an intuitive feeling that the shot is perfect, and that the object ball will go exactly where you want it to. You can micro adjust your elbow slightly if necessary, until it feels perfect. If it doesn’t feel right after even a while, something is probably off with your alignment, so get up and repeat everything right from Step 1.
  5. I stop moving the cue, take a deep breath to calm myself down, and while relaxed and focusing on the object ball, stroke through and strike the cue ball. Make sure you are focused on where you want the cue ball to go on the object ball and are not focused on the pocket. In fact if you are making a cut shot where the pocket and object ball can’t be seen at the same time, it becomes extra important not to let your eyes wander towards the pocket (hard as it may seem). During the final stroke/shot, you have to be looking along the line where you want the CUE BALL to GO, and looking towards the pocket will probably cause you to subconsciously drift your aim line towards the pocket, causing you to miss the shot even though you had aligned and aimed correctly.
  6. Finally, after the cue ball has hit the ball exactly where I wanted it to go, I stay down and watch where the object ball is going, saving the information in my mind (so I can tweak/adjust my aiming in the future). If you didn’t hit the object ball where you aimed, you know to fix the earlier steps to ensure you aim correctly. If you hit where you aimed but the shot goes in the wrong direction, automatically adjust your aim line the next time. This way, whether you make the shot or not, you will always get feedback, learn, and improve your game with each shot.

This is pretty much it. There are a few more things that I pay attention to including where the cue is under my chin, how I grip the cue, where the cue touches my chest and waist and my follow through. However honestly, I think even this present level of detail will be boring for most people, and I don’t see any point in bogging you down with mind-numbing levels of detail. You can check out some of my other billiards articles to get a better idea.

Just focusing on these few things should be enough until you get to a strong intermediate level.

Now bear in mind, that on the days when you are “in the zone”, you will obviously shoot effortlessly and probably won’t remember or pay attention to a single one of these steps. And that’s perfectly all right – you probably won’t need to.

The advantage of using this system, of taking this much control, and micro managing each step, is primarily on those days when you are NOT in the zone.

These are usually the days when most players end up missing a lot, not being able to shoot even half as well as they are used to, feeling completely “off”, and in general getting very frustrated with the game. Now however, by following this simple set of steps, you should still be able to shoot reasonably well. Not as well as your “on nights” of course, but decently well.

With time, you will develop so much consistency that no one other than professionals will even be able to tell that it is an “off night” for you. And building this technique in your muscle memory will mean that on you “on nights”, you will play breathtakingly well.

If you are someone looking to improve your game, hopefully this discussion will help you in some way. Once I fine tune my current snooker practice routine and feel it is reasonably optimized, I can probably share it here for interested readers.

Please feel free to leave a comment and share your thoughts and insights.

Commandos: BEL – HTML5 – Recreating the classic 2.5D real time tactics game in the browser

After my last game recreation project, Command and Conquer in HTML5 (a complete real time strategy game with multiplayer implemented in HTML5), I was looking for a new and bigger challenge.

My most recent project, a recreation of Commandos: Behind Enemy Lines in HTML5, makes Command & Conquer feel like a kiddie project.

While Command & Conquer took me around three weeks for a first version, and then a couple of months of iterating to create the polished version that it is today, Commandos has been 8 months of slogging just to get the first working game level out.

Every few weeks into the project, I would reach a point where I would think “There is no way I am going to be able to do this bit. I have no idea how to…”, and a few days later, magically, I would find just the thing that I needed to get it done.

Over this period, I’ve gone through what feels like hundreds of articles and computer science Phd papers on path-finding, handling polygons, depth sorting and various aspects of game artificial intelligence.

This has honestly been one of the toughest projects I have ever taken on by myself. Looking back, I have no idea how I ever came this far. In fact, I am amazed that I actually managed to complete this project.

Here is a quick video of the project.

But what really made this project so hard?

I consider Commandos: Behind Enemy Lines a 2.5D, real time tactics game.

What the 2.5D means is that while the game used 2D assets and images, all the game elements contain 3D position information (x, y and z coordinates) as well as shape information (length, breadth, height). This simple difference however brought on most of the challenges that I had to face.

The first and biggest challenge while recreating the game was just rendering everything onto the screen. C&C was entirely 2D, so depth sorting was as simple as drawing everything from back to front and left to right, and everything just looked more or less OK.

Depth Sorting in Commandos HTML5

Depth Sorting is so simple with these blue lines

However with Commandos, things got a lot more complicated. Game elements are not positioned along the X & Y axis, and can overlap each other in very different ways, making depth sorting slightly more challenging.

I tried several different implementations. With each implementation, I would find some items rendered correctly, while others would render incorrectly.

After tons of research and experimentation, I finally managed to come up with a reasonably simple and elegant solution – First do a simple comparison to decide whether or not each item is in front or behind every other item, then run a topological sort to order the items for rendering. The image shows how I use a simple line across each item to decide whether another item is ahead or behind. As you can see, the results are pretty decent.

Commandos HTML5 Path Finding

Pathfinding  using a mesh of polygons

The next big challenge was path-finding. Unlike C&C and it’s simple grid based A* path finding, Commandos uses a polygon based mesh and needs some pretty flexible pathing. I originally started with a simpler implementation using points-of-visibility pathing, however I finally had to switch to a full-blown navigational mesh with path smoothing to allow for everything that commandos needs, such as climbing up ramps and traveling across bridges.

Again, everything had to implemented from scratch and I didn’t use any libraries for it.

Commandos HTML5 Guard AI

Guard AI – Guards follow footsteps in the snow

The next big headache was the guard AI.

The guard vision and visibility cone computations needed to be fast and optimized since they were calculated in real time so they could be used to decide when a guard could see something.

That, combined with a very tricky AI involving some crazy state flip-flopping, meant it took me a couple of months before the guards could even see and attack a commando properly.

At this point guards can patrol or watch areas, investigate suspicious noises (explosions, gunshots, yelling), follow foot steps, and finally chase commandos and attack or detain them.

Apart from these were all of the little things that I never thought would take much time, which in hindsight turned out to not be so little and took quite a lot longer.

Climbing Walls - Who thought this would be so hard

Climbing Walls – Who thought this would be so hard

  1.  Building a complete in-game multi-window system.
  2.  Teaching the commando how to climb walls (starting with detecting whether a surface was climbable).
  3.  Building a very intricate game loader system that handled mission files, sprite sheets, audio sprite sheets and the in-game menu files
  4.  A custom in-game menu system.
  5. Handling Weapons, Driving vehicles, Rowing boats, Scuba diving, Explosions, Using Decoys, Hiding inside buildings and every other action the commandos can take.

After 8 months of work, I’m happy to say the game is now finally ready and playable.

If you haven’t tried it out yet, you can play Commandos: Behind Enemy Lines – HTML5 here.

Looking back, I don’t know if I regret taking on this project. Thanks to this project, I’ve learned an incredible amount – about  computer science and AI, about better game programming techniques and practices, about automating and streamlining my entire game development process. But the biggest thing I learned was what it takes to build a really big game in HTML5, and how to push myself to achieve something that I never thought possible.

Now that the first mission is finally complete, I’ll probably take a break for a while. Once I come back, the plan is to add more missions, and a multi-player cooperative mode using HTML5 Websockets. Again, all playable in your browser without needing any installation.

If you have any feedback or questions about this project, please feel free to leave a comment below or on the game page.

If you would like to get notified about future game projects, get exclusive access to beta test new project updates, or learn advanced game programming and collaborate with me on future projects, please sign up using the form below. Make sure you fill out the check boxes correctly so I know what you are interested in.

* indicates required



Which of these do you want to do?

Cue Ball Position Control Basics – Part III – The Draw Shot

In the first two articles of this series on cue ball position control, we looked at using the stop shot and the follow shot for basic position play.

Now, it’s time to look at the draw shot.

The Draw Shot

A draw shot (or screwback shot), occurs when the cue ball has a reverse spin (or backward rolling motion) at the time when it hits the object ball. After it hits the object ball, the reverse spinning motion cause the cue ball to get backward momentum, causing the cue ball to start moving backwards after contact.

draw-shot-straightIf the cue ball is aimed directly towards the center of the object ball, then the cue ball will first come to a dead stop, after which it will slowly start returning towards the cue stick, usually at a lower speed than the object ball. The final speed and distance that the cue ball travel depends on the amount of reverse spin that is imparted to the cue ball.

While it can take some practice, it is possible to draw the cue ball an entire table length by using proper stroke and follow through.

draw-shot-angleIn case the cue ball is aimed off center (a cut shot), just like in the case of the follow shot, the cue ball will deflect off the tangent line path that a stop/stun shot would take. This is the result of the reverse spin adding a component of movement in a direction opposite to the cue ball’s original direction.

In the diagram, the light gray line shows the path the cue ball will take once it strikes the object ball. Notice that draw shots cause the deflection angle to widen.

Now, that we know what this shot is, how do we go about adding the reverse spin to the cue ball?

Unlike the follow and stop shots, the draw shot can be a little tricker to master.

Typically, you add reverse spin by striking the cue ball anywhere from one to three cue tips below center as needed. Unlike with the the follow and stop shot shots it is essential to have a straight stroke, and a smooth follow through during the shot

In fact, I have a detailed set of instructions on the essentials for mastering the table length draw shot.

Try to pot the object ball into one of the side pockets while keeping the cue ball about a half table breadth away along a straight line, so that the cue ball slowly comes back a few inches after striking the object.

A good exercise to build your stroke that I strongly recommend is trying to draw back the cue ball and scratch in the opposite pocket to where you just hit the object ball. This take some very decent cueing and is another shot I’d recommend practicing until you can hit it perfectly at least 9 out of 10 times.

When in a straight line, the draw shot will let you move anywhere from a few inches to a few feet back from the object ball’s position, as needed. When shooting a cut shot, this will widen the deflection angle slightly, allowing you to move the cue ball to different areas than with the stun and follow shot.

Let’s take a look at an example like before.

draw-shot-position-zoomedImagine you had to run the three balls in numerical order, starting with ball in hand, using only the shots you have learned so far. How would you do it?

The simplest solution? Set up for a straight shot on ball 1, and draw back a few inches to get a decent angle for ball 2. Notice the tangent line when trying to pot ball 2 will cause the cue ball to potentially bump into ball 3. To avoid this, again use draw while cutting ball 2 in to deflect the cue ball by a wider angle, to place yourself for a relatively simple shot on ball 3.

Again, this is a simple and easy solution that would have been very difficult using only stop and follow shots.

Between the stop, follow and draw shots, you already have an incredibly powerful arsenal of tools to control the cue ball position and play better than most of your friends who don’t understand these basics of position play.

However, once you master these three shots, it’s time to move on to the more advanced tools, including using the half ball shot, and using side-spin with the rails.

In the next article in this series, we will look at how the half ball shot can become one of the most important tools that you will ever use to build long breaks effortlessly.

Cue Ball Position Control Basics – Part II – The Follow Shot

In the first article of this series on cue ball position control, we looked at the stop shot, and using the stop shot for basic position play.

In this article, we will add to our position play toolkit with the follow shot.

The Follow Shot

Very simply put, a follow shot occurs when cue ball has a forward spin (or forward rolling motion) at the time when it hits the object ball.

After it hits the object ball, the rolling motion cause the cue ball to regain forward momentum, causing the cue ball to continue moving forward after contact.

follow-shot-straightIf the cue ball is aimed directly towards the center of the object ball, then the cue ball will first come to almost a dead stop, after which it will slowly start following the object ball, usually at a lower speed than the object ball.

The final speed and distance that the cue ball travel depends on the amount of forward spin that is imparted to the cue ball.

follow-shot-angleIn case the cue ball is aimed off center (a cut shot), the cue ball will deflect off the tangent line path that a stop/stun shot would take.

This is the result of the forward spin adding a component of movement along the original direction of the cue ball.

An interesting thing to note is that, in roughly half ball shots the cue ball is deflected off its original path by approximately 30 degrees. This is a special case that we will study in greater depth when we look at the uses of the half ball shot in positional play.

In the diagram, the light gray line shows the path the cue ball will take once it strikes the object ball. Note how the deflection is lesser than if you had used a stun shot.

Now, that we know what this shot is, how do we go about adding the follow to the cue ball?

As we discussed in the previous article on the stop shot, any cue ball given reasonable time to slide on the table cloth will slowly start rolling forward as the friction from the cloth acting on it. If you hit a cue ball center ball over a large distance, by the time it arrives at the object ball, it will having rolling motion.

This is one of the reasons lots of beginners end up with the cue ball following the object ball into the pocket and scratching on long straight shots. The only way to avoid this is to either hit low on the cue ball to cause a stop-shot/draw shot, or not hit a straight shot in the first place.

For shorter distances, it is usually necessary to force the follow onto the cue ball by striking the cue above center, usually between half a cue tip and 2 cue tips depending on the amount of follow. By combining this with a good follow through, and a medium to hard strength, you can also get the cue ball to keep rolling a significant distance after striking the cue ball.

As with the stop shot, by using a combination of hitting hard and above center as needed, we can have the cue ball spinning forward when it hits the object ball. Calibrating how hard or how high to hit the ball is a matter of practice.

Try to pot the object ball into one of the side pockets while keeping the cue ball about a half table breadth away along a straight line, so that the cue ball slowly follows the object ball atleast a few inches.

A good exercise to build your stroke that I strongly recommend is trying to follow the cue ball and scratch in the same pocket where you just hit the object ball. This take some very decent cueing and is another shot I’d recommend practicing until you can hit it perfectly at least 9 out of 10 times. If you have trouble doing this, I’d recommend working on your stroke using the bottle drill.

This shot should now increase the positional options available to you.

When in a straight line, the follow shot will let you move a few inches to a few feet beyond the object ball’s position, as needed. When shooting a cut shot, this will narrow the deflection angle slightly, allowing you to move the cue ball to different areas that with the stun shot.

follow-shot-positionLet’s take a look at an example like before.

Imagine you had to run the three balls in numerical order, starting with ball in hand, using only the shots you have learned so far. How would you do it?

The simplest solution?

Set up for a straight shot on ball 1. Of course, since the 7 ball would come in the way of aiming for the 2 ball, a stop shot will no longer work. We can use a follow shot to allow the cue ball to move a little further to a more convenient location.

Once there, a stun shot would cause the cue ball to bump into the 5 ball, so we use another follow shot while shooting ball 2, to reduce the angle that the cue ball is deflected, placing yourself for a relatively simple shot on ball 3.

Simple isn’t it?

Choosing between the stun/stop shots and the follow shots is usually dictated by which provides easier and simpler position, and just causes subtle differences in the way the cue ball moves. However paying attention to the table and applying this information can be the difference between perfect position on the next shot and blaming bad luck or the table for being difficult.

How many players do you know, who complain or blame luck when they make a shot, but are out of position or blocked by another ball for the next shot?

Well, knowing what you do now, do you still think it is bad luck?

One last thing to keep in mind. Whenever you are aiming for an object ball that is far away from the cue ball, it is usually easier to use follow since the cue ball naturally tends to get forward spin when moving over large distances.

In the next article in this series on the draw shot, we will look at the last piece of the puzzle – how draw (reverse spin) can be used to either modify the angle at which the cue ball leaves the object ball or to have the cue ball move backwards, allowing for position play that is just not possible with the stop and follow shots.

If you enjoyed this article, continue on to the next article in this series, Cue Ball Position Control Basics – Part III – The Draw Shot.

Cue Ball Position Control Basics – Part I – The Stop Shot

When watching a master pool or snooker player in action, what stands out isn’t the difficult shots that they hit, but how rarely they seem to need to make difficult shots; how they automatically end up with relatively simple shots; and how they seem to magically make the game seem incredibly easy and effortless.

One of my favorite players to watch for this is Ronnie O’Sullivan.

In fact, why don’t you take a few minutes to watch one of his classic breaks and look at how easy he makes the game look.

You could have made most of the shots that he made, couldn’t you?

The fact is, I wouldn’t be surprised if you said that you could. Most of the shots Ronnie had in that break were fairly straight forward, medium distance shots.

However, the trick isn’t just making the shot, it is making sure that you get an easy next shot as well; and then finding a way to keep getting easy shots until you have cleared the entire table.

That is the real secret of break building – cue ball position control.

Controlling cue ball position is the most important thing you can learn once you understand the basics of aiming and making shots. It is what separates the beginners who can make breaks of one or two balls, the intermediate players who can make 5-7 balls and the masters (You just saw Ronnie clear 36 balls on a 12 foot table without missing even once).

Over the next few articles in this series, I will be breaking down a few fundamental elements of positional control that when combined, will massively improve your ability to control the cue ball and make long breaks. These core shots and principles should be more than enough to handle most of the situations that you will encounter in your games.

None of these will be hard or flashy shots, or require vast amounts of skill. The key to good position play is trying to keep things as simple as possible.

Before you focus on position play, you should already have a decent stance and be able to make shots. If you are still struggling with these basics, you should check out my article on how to play pool well in under 30 minutes. Also, if you want to be able to consistently and confidently run tables, you should also develop a good pool stroke and fine tune it using practice techniques like the bottle drill.

Once you have got these out of the way, it’s time to look at the three basic shot types.

  1. Stop/Stun shot
  2. Follow shot
  3. Draw/Screw back shot

There are a few more shot names that you might have heard being mentioned such as drag shots and stun run-throughs, however once you master the fundamental shots, you will find that these are just simple variations of the three basic shots.

The Stop Shot

The most fundamental of all shots is the stop/stun shot.

Very simply put, a stop/stun shot occurs when the cue ball has no forward or reverse spin at the time when it strikes the object/target ball.

What this means is the cue ball is essentially sliding on the table cloth (and not rolling) when it hits the object ball. Once the cue ball hits the object ball, momentum is transferred from the cue ball to the object ball.

stop-shotIf the cue ball is aimed directly towards the center of the object ball, then the cue ball will come to a dead stop and the object ball will start moving at almost the same speed as the cue ball, in the same direction.

In the diagram, the light gray circle shows the point where the cue ball will stop once it strikes the object ball.

stun-shotIn case the cue ball is aimed off center (a cut shot), the cue ball will move along a perpendicular line (also known as the tangent line) to the object ball’s path.

The speed of the cue ball is then distributed between the two balls – In case of a thin shot, most of the speed remains with the cue ball, while in the case of a more solid contact, most of the speed will be transferred to the object ball and the cue ball will slow down significantly.

In the diagram, the light gray line shows the path the cue ball will take once it strikes the object ball.

Now, that we know what this shot is, how do we go about making the cue ball purely slide when it hits the object ball?

Well, here’s the deal – any cue ball when struck reasonably hard in the center, will start by sliding forward and then slowly start rolling forward as the friction from the cloth starts acting on it. If you hit the cue ball below center, then the ball will start rotating backwards while sliding forward, then the friction will take over and reduce the backward rotation until it stops rotation and starts purely sliding, and finally just like in the center-ball shot, will start rolling forward.

By using a combination of hitting hard and below center as needed, we can have the cue ball purely sliding when it hits the object ball. Calibrating how hard or how low to hit the ball is a matter of practice.

For the most common half-table-breadth distances a firm shot, within half a cue tip below center is usually enough.

Try to pot the object ball into one of the side pockets while keeping the cue ball about a half table breadth away along a straight line, so that the cue ball stops while the object ball goes into the pocket. This is one shot I’d recommend practicing until you can hit it perfectly at least 9 out of 10 times.

Now try setting up a cut shot, and watch the object and cue ball go in perpendicular directions.

Learning this shot alone should significantly improve your ability to control the cue ball. So how do you use this shot in practice?

stun-positionLet’s take a look at a simple example shown in the illustration.

Imagine you had to run the three balls in numerical order, starting with ball in hand, using only the shot you have learned so far. How would you do it?

The simplest solution? Set up for a straight stop shot on ball 1, then stun the cue ball slightly while shooting ball 2, so that the cue ball is deflected to place yourself for a relatively simple shot on ball 3.

By keeping your cue ball off the straight line shot, you can move the cue ball as far along the tangent line as you need for your next shot, by controlling the pace of the cue ball and the angle at which you are shooting.

In fact by planning one or two balls ahead, you should be able to make fairly long runs as long as you maintain a little angle which will allow you to move the ball along tangent lines instead of just stopping it in place.

Of course, not ever ball is an easy tangent line position away. Sometimes you might need to go in a slightly different direction from the basic tangent line. That is where follow and draw shots come in.

In the next article we will look at how follow (forward spin) and draw (reverse spin), can be used to modify the angle at which the cue ball leaves the object ball to achieve finer control over position.

If you enjoyed this article, continue on to the next article in this series, Cue Ball Position Control Basics – Part II – The Follow Shot.

Six Pack Abs and a Toned Body – You don’t really want it

Do you want to be extremely fit and healthy? Maybe have a toned body with a six-pack instead of a growing belly with flabby arms? Is getting fit and healthy a priority in your life?

Over the last year, while focusing on fitness and nutrition, I dropped nearly 14 Kgs (31 lbs) and 6 inches off my waist. I’ve now reached the point where people automatically stereotype me as “the fitness guy”, or “the bodybuilder”.

Since then, more and more people have reached out to me for fitness, nutrition and weight loss advice. Everyone wants to know exactly what I did, and how easy or difficult it would be for them to replicate.

I usually go out of the way to try and help friends when they ask for advice, since fitness is still a very big part of my life, and I’m always happy to help others on the same path. I freely share information about my diet/nutrition, exercise routines, and how I keep myself motivated.

It’s a pleasure to see the excitement in their eyes when they see how simple it can be to get into great shape; when they realize that their “stretch goal”, is in fact realistically possible in just two or three months.

However I’ve come to a bitter realization over the last year of trying to help people get fit.

Most people don’t really want to get fit and healthy. Most people don’t want to look like the models they see in magazines. In fact, they don’t even want to get half-way to that point to look “not unhealthy”.

All most people really want to do is talk about how much they want it, while continuing to remain in their current unhealthy state, or worse getting even more unfit.

Every time someone takes home one of the workout programs I recommend, I get hopeful that maybe this one person will stick with it and achieve great results. Often they message me after a few days about how amazing it feels and share the initial results they are getting, which gets me optimistic since unlike ninety percent of their peers, they actually started and committed to it.

And then, even though they see the results they have already got in just a few days, even though they know that this program works, without fail, they stop.

They abruptly stop messaging updates, and just as abruptly stop talking about fitness.

When I make the effort to reach out and check up, out come the excuses – no time, too tired, suddenly very busy.

Almost consistently and without fail, each of them usually says that they haven’t quit, they have just stopped for a little while and they plan to start again when they “have the time”. I still don’t know of one person among dozens of friends who started again or managed to find time.

I had someone tell me once, “exercise is a priority for me, however I just don’t get the time“.

My response? “No. It isn’t. Your priority is eating and drinking with your friends, watching movies, or relaxing and watching tv. If exercise was your priority over these things you would first exercise, and then say you didn’t have time to watch movies or hang out with friends. The fact that exercise doesn’t come before these things clearly means, by definition, that fitness isn’t the priority in your life.

So now let me ask again – Do you want to be fit and healthy? Is being healthy a priority in your life?

Answer honestly, and if the answer is no, then learn to accept it. Start admitting to people that you find it easier to be fat and unhealthy and prefer making excuses to getting fit and healthy. That you don’t want to be the best that you can be.

Don’t lie to yourself. At least this way you won’t feel guilty about missing out on exercise or eating unhealthy.

And when you truly decide to make fitness your priority, you can commit fully and achieve results.

Thank you – Expressing your feelings so others can feel them too

I was still in school. I think it was 7th grade.

I was just another shy school kid who brought his teacher a card for teacher’s day. I didn’t really put much effort into the card. She wasn’t even my favorite teacher. But she was a good teacher who loved her job and taught like it meant a lot to her. I just gave her the card because lots of other students were giving cards in class and I thought even I should.

When I gave her the card, she looked me in the eyes and said “Thank you”. Nothing more.

But that moment changed my life in a way that I can never really explain. Because what really shocked me, was the fact that I didn’t just hear that Thank you. I felt it !!!

Maybe it was the way she looked at me like I was the only person in the room. Maybe it was the way her eyes were glistening, almost with tears, when she said it. The way that she seemed to really, really mean it.

I knew she meant it, and I knew she was trying to convey what she was feeling. At that moment she was sharing everything that she felt – the joy, the gratitude, everything. And as I looked at her, I felt every bit of it, almost radiating from her.

And all she had said were the two words – “Thank you”.

Until that day, in my mind, “Thank You” was just something you automatically said when people gave you something, whether you cared about it or not. It was something you said because your parents taught you that you were supposed to say it.

It was never said like this!!! Words weren’t supposed to have so much feeling and emotion in them. Words were just words. How was she doing this?

But that day she changed my life. Because from that day, I kept wondering how someone could say something with so much emotion. Wondering what I had been missing because I didn’t even know it was possible.

It was the day I realized that I too wanted to be able to say and express what I felt. To be able to communicate not just with words, but with emotions and feelings. And I wanted to be around more people who could talk to me the same way. People who could connect with more than just words.

That day, as much as any other, has made me who I am today. And for that I am truly grateful.

HTML5 Game Development: Using sprite sheets for better performance (and protecting your server)

When I started developing the HTML5 version of Command and Conquer, I never expected more than a few close friends to look at the game. (Based on the experience with my last game, Breakout).

Command and Conquer Javascript ScreenshotSo while I spent a lot of time making the game look as close to the original Command and Conquer as possible, I never spent much time optimizing the code. Most of my development and testing was on my own Macbook, and I didn’t pay attention to the image loading time or network traffic.

Unfortunately, this game uses a lot of images.

Each unit can face 32 different directions. This means at least 32 different images for each unit (more if there are animations like ‘harvesting’).

Buildings need a whole set of images for each state – under construction, regular – with different sets of images for healthy and damaged buildings, and for any additional states (like ‘unloading a harvester’). The Construction Yard for example needs 82 different images for it’s animations.

As a result, when the game loaded, it made nearly 1,000 HTTP requests to load all the assets (including images and sounds).

Since most browsers only make a few simultaneous requests at time, downloading all these images took a lot of time, with an overload of HTTP requests.

While this wasn’t a problem when I was testing the code locally, it was a bit of a pain when the code went onto the server. My patient friends ended up waiting for the game to load for 5-10 minutes (sometimes longer) before they could actually start playing.

AdityaRaviShankar.com - Traffic Screen ShotThe problem came when my game hit the front page of Hacker News and Wired.com on the same night, resulting in a slight spike in traffic :). It then got worse when the game got 1,000+ tweets and 1,000+ FB likes in just a few hours. The last time I checked, searching for my game gave over 5,000 google results.

What this meant was my shared hosting server was getting close to 14,000,000 HTTP requests in one day from just my domain.

I don’t think too many shared hosts are designed to take this kind of load, which resulted in my account being disabled with this interesting email from my provider.

Hello,

Your account adityaravishankar.com on the server quebec.unisonplatform.com was recently found to be causing high load that resulted in slowness/outages of various system services. In order to ensure quality of service to the other clients on this server we regret to inform you that the account had to be disabled to prevent any further interruption of service to our other clients.

If nothing can be done to lower the resource usage you may need to look into purchasing a dedicated server or cloud server which you can find more information about at http://www.eleven2.com. Please contact us as soon as possible to resolve this issue.

I was able to find temporary hosting on another server but the biggest priority was to optimize the way I stored images, which of course brings us to sprite sheets.

Hand of Nod Sprite SheetSprite sheets store all the sprites for an object in a single large image file.

When displaying the images, we calculate the offset of the sprite we want to show and use the ability of the drawImage() method to draw only a part of an image.

Creating these sprite sheets is incredibly simple using ImageMagick’s montage command line tool. This single command will convert a folder full of images into a single row sprite sheet.

After comparing PNG and GIF, I found that PNGs tend to compress the sprite sheets a lot more.

The advantages of using Sprite Sheets?

  1. Fewer HTTP requests – The Command Center went from 81 requests to a SINGLE HTTP request
  2. Better Compression – An advantage of storing the images in a single file is that the header information doesn’t repeat and the combined file’s size is much smaller than the sum of the individual files. The command center went from 496KB in 81 files to only 37KB in a single file. (Less than 8% of the original size, which is incredible)
  3. Easier Manipulation – With all the sprites in a single image file, it became easier to do RGB color manipulations, and I was able to optimize the drawing code for performance.

From almost a 1,000 requests to 120 requests in one simple code rewrite. And the total download size went from a few MBs to around 200KB.

Game load time went from 10+ minutes to under a minute. The bandwidth usage dropped to a tenth of the original. The number of requests dropped to a tenth of the original. And now my shared hosting can survive a very decent amount of traffic.

Moral of the story? When developing a large game that is image heavy, track your network usage and when possible use sprite sheets 🙂