Showing posts with label hobbies. Show all posts
Showing posts with label hobbies. Show all posts

Tuesday, July 7, 2009

I've been using ancient technology

Ok, I kind of knew my website kind of sucked really bad. So I decided to make some modifications today. The first one was to somehow get rid of frames. I heard from a LOT of people, how disadvantageous and ancient they are.

I googled for alternatives to frames, and found a website that showed 4 ways to do it. The first one was using a thing called SSI, which didn't work for me. It basically just included all the files that needed to be displayed in all the pages, instead of setting up frames for them. This is sort of like the #include used in c++ and other programming languages.

I moved on to the next method, which involved using javascript to display the links on a div section. The thing to be displayed would be included in a js file. It didnt appeal much to me, since I didnt know how to layout the div in such a way that it displayed on the left, and I was too lazy to find out how to do that.

The third method was the one that I used. It was basically identical to the first one. I used a php command in all my files to include the title and the file containing the links.

The fourth one involved using iframes.

Now, the links are on top of the page instead of being on the left. I dont know how to do that right now. It might involve formatting the div element using a css file.

Another modification that i made was removing those annoying jscript boxes. I had only included them for practice. They dont really serve much purpose on the site.



I also included the links in a table and used div to enclose them in boxes. This is my first experience with using the div tag.

Saturday, July 4, 2009

Site Updated

The feedback section on my site has been updated. Now people can enter their comments, along with their names. This information will then be entered into a database using a php script. After that, to actually show all the comments, I am using another php script to recover that information from the database.




My net officially sucks. It gets disconnected on its own every half hour. Thank god I'm not running my website using Apache on my laptop.

I went to my cousin's house and took a day off from all this. I actually spent 24 hours without my laptop, can you imagine that?

Wednesday, July 1, 2009

I finally got a website

Finally, my game is available for download. Go to my
website, then go to the downloads section.

Ok, so ever since I returned from campus, my focus has suddenly shifted from game programming to web programming. I ended up learning HTML , CSS and Javascript in a short amount of time (mainly because I had already done these things earlier).
I got some free web hosting at this website www.freei.me. It looks pretty decent. All I have to do is learn PHP and how to use it with mySQL. Initially I tried it by running Apache web server on my own laptop. However, it was too complicated, and besides my laptop doesn't stay on 24X7.

Not much else to update about. So I will leave it at that.

Sunday, June 28, 2009

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.

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.