Sunday, June 28, 2009

More Tankwar Pics




I actually plan to make the game available for download, for windows as well as for linux. However, i'm too lazy to do that :-D
Maybe I'll upload it tomorrow, once I find out how to do it.

Back to the Normal World


Finally I have left that shithole. During the past 10 days, the heat there had increased exponentially. No wonder they have sucides in IITs. We had like the hottest water on the planet, all day long. I don't know how I managed to go though the last few days. Maybe it was the belief that I would be in Delhi in a few days, or maybe it was just south park.

My game looks pretty good right now. I drew the tank using MS paint, so now I'm using sprite based graphics instead of the traditional vector based graphics. I just needed an image creating software that I could use to draw a quick image. All I wanted was a tank image. I tried gimp too, but it seems to have a steep learning curve. I do all the cropping stuff in Ubuntu using Gimp, that shit is easy.

I have included rotation using the rotate_sprite function. The tank can now basically rotate in 8 different directions. Also, whenever the bullet gets fired at an obstacle, it gets reflected according to the laws of reflection. A friend of mine thought that was kind of lame, but I included it anyways, as I had worked my ass off to program that feature.

Also, it now has 2 screens, one for each player, and actually uses vertical and horizontal scrolling. I'm using a not-so difficult technique in which basically your temporary buffer, in which you draw everything will be of a bigger size than the window, and is drawn on the screen using blit function. It looks pretty neat.

I have started learning web designing all over again. I think I need another project for myself, whenever I get really frustrated with making a game. so I've started modifying my website.




However, I'm not too happy with the layout. I've modified it a lot. But I can't change it right now. We can only upload it when we are in campus. which kind of sucks, I'll have to wait for a month to change my website. I'm using KFTP grabber to upload the files.

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.