Thursday, May 14, 2009

Upgraded to Ubuntu 9.04, and loving it

So for the past 2 weeks, I've been trying to get my Ubuntu figured out. The story goes something like this: I had ubuntu 8.10 fully functional on my Leneovo y330 laptop, when suddenly I was welcomed by a black screen just before login. I tried to do whatever I could, short of pulling my hair out, to make things right, but it was adamant not to run on my machine. I posted I dont know how many posts on linuxquestions.org and ubuntuforums.com, but still, nobody had any clue how to make it right. I ended up learning a lot about linux along the way, as well as about my graphics card. Today I came back to IITK. I was adamant on getting my graphical mode back. I thought all that it needed was a quick upgrade of about 330mb. How very wrong I was. I couldn't even set the network settings in the text mode. Seriously man, text mode sucks.

I had given up hope when my friend, Shivam told me about a thing called wubi. It made installing ubuntu so much easier. As I had already backed up my ubuntu data, I decided to go ahead with it. But the gods were still against me. I tried installing 8.10, but there was something wrong with the wubi. At first, I thought wubi was the same for all ubuntu versions. But actually, for every ubuntu version , there's a different wubi. I spent around half an hour trying to install 8.10 using a wubi of 9.04. After that, I downloaded the wubi of 8.10, but it still wont work. Meanwhile, the wubi of 9.04 was showing some network problems, so it wont download 9.04! Bloody ass.



I took one last shot. I tried downloading ubuntu 9.04. I had been putting this off as it was not available on dc, which meant a long and lengthy download. I fell asleep during the download( having given up all hope). When i woke up, I decided to give it a shot, and guess what! It actually DIDNT try to download 9.04 and worked with the current version! What a relief! Finally I had my ubuntu back!

Monday, May 11, 2009

The First Step


So i've been thinking of taking up game programming for quiet a while, and i decided to write a simple game in allegro just to start things out. Allegro is a free game programming library which is good for beginners. I really did not want to think of an idea, as I was more focussed on the game design/structure rather than the game idea. I chose to make the snake game. It seemed a simple, yet an addictive game.

At first, I tried making it on my own. The basic idea was simple, I would be having 3 files, one of them a header file containing the declaration of the classes 'snake' and 'food'. Another one would contain the definition of the functions of these 2 classes, and finally, the main file. However, I soon learnt that it was causing a lot of problems. I needed 1 file for each class. Also, I really couldn't figure out how to get the snake to move. I looked for some examples on the internet, and I found some really cool ideas. One of them was to keep adding a pixel in front of the snake, and deleting the one at the tail. Also, I would be needing 2 variables. Also, i needed a variable to store the direction of the front as well as the tail.

However, I still don't get how I am supposed to know when to change the direction of the tail. I'm stil working on it. Hell, who am I kidding. I spend most of my time watching How I met your mother, the IPL or on Facebook. The holidays are not the right time for work, it seems. Maybe the internship will put some discipline into me.

Well, keep visiting this blog for more updates on my game. My aim is to finish it off before the end of this month.