Sunday, July 31, 2005

A small revision to my game.

My first game (aptly titled "shooter") had square balls. Which was a big disgrace. I have now made them disc shaped, which now makes the game-play less boring. If anyone wants to take a look at it you can check it out here. If you want you can take a look at the source too.

Saturday, July 30, 2005

A day of cleaning

After a long period of deliberation we decided to clean our house.
As anyone who has been here would know that, our house remains in a state of utter orgranized chaos. You will find bills, books, newspaper, clothes, pens, hangers, CDs etc all in the same pile (with a layer of dust on top). Apart from this, our house also serves as a breeding ground for all kinds of insects and reptiles. Thus helping the ecological system maintain its balance. If an insect died we let the ants take care of it. If an ant died.. hmmm well I don't know what happens. Maybe next time I will try and find out. You see we respect the food cycle unlike most people. We take the teachings of Charles Darwin very seriously. It is survival of the fittest all the way (ya but mostly or maybe only in the case of food).
Anyway, enough of the lame excuses. The house is clean. All are invited to come have a look as it won't remain the same for many days (ya, the "ecological system" is expected to rise its head again).

Wednesday, July 27, 2005

The seminar

I had my seminar on Denial of service attacks today. Although mine was the shortest seminar with the largest font, it went well. I am pretty happy and relieved that it is over.
Among other things I heard that all your base are definitely belong to us.

Sunday, July 24, 2005

My first game

I had been playing around with SDL and OpenGL for the past few days. It was about time that I did something constructive with what I had gained. So I came with an idea for this game where you have to shoot randomly moving balls with the help of a mouse. I sat down and started coding. At the end of an hour I had a playable game. The balls, well, didn't look like balls. They had turned out to be square ! But rest of the things were fine. The cross hair did look like a cross hair. When I clicked the mouse it did give me the sound of a gun shot. So all in all I'm satisfied with my ugly looking game which has no future whatsoever. The source code and executables are (as always) available. The program was written using Bloodshed Dev C++ IDE and xemacs. You will be needing SDL.dll and SDL_mixer.dll to compile the file under windows and the same corresponding libraries under Linux . These dlls are provided with the executables or you can get them from here.

Saturday, July 23, 2005

Harry potter - 6

After a lot of debating with myself I came to the conclusion that it would be a waste of time to read the book. The main reason to read the book, for a lot of people would be the popularity of the series. I guess thats why I read the first five. But, I guess I have grown a bit more impatient these days. So, instead I just read the whole plot summary on wikipedia. After reading the summary I would give it a 3/5, but certainly not worth Rs 900.
Amongst other things I have a new found respect for the Arctic Warfare Magnum (aka AWP).


Currently my favorite weapon in Counter Strike.

Friday, July 22, 2005

Cross compatibility with OpenGL and SDL

I was trying to make OpenGL work through SDL. It took me some time to get things right and I was able to make a small program which animated a multicolored triangle. The rotation of the triangle is controlled by the mouse.
The beautiful thing about it was I was able to compile and run the program in both Windows and Linux without a single modification. Neither did I run into any trouble during the build process. Here is the source and Windows executable. Call me crazy, but I then tried to run the Windows executable in Linux through wine and it worked again.

Thursday, July 21, 2005

War of the worlds

I had heard that "War of the worlds", Steven Spielberg's latest offering, was not upto the mark. They were all wrong. War of the worlds is in fact a well paced sci-fi movie. It has the common theme of aliens attacking the planet, but it separates itself from the others by showing that: In the face of danger not everyone can act as a hero and/or think morally. The graphics and sound effects are really nice. And yes the big alien machines did look like the striders of Half-Life 2 (look below).



Tuesday, July 19, 2005

Counter Strike

After a long wait, our house has been blessed by Counter strike Condition Zero (shame on you if you haven't heard about it). Now follow the sleepless nights with all the screaming and shouting, with gun fire in the background.

Monday, July 18, 2005

Seminars

So, I was sitting here happily thinking that no one would have done a seminar on DoS (Denial of service not MS-DOS), turns out that one person of the very first batch (1997) of CS CUSAT had done it. As repetitions are not allowed in our department, my seminar topic would be rejected. But, interestingly I could find a lot of topics which have been repeated, in the register.
I also recieved our seminar guidelines. Apart from the usual ones, I found the last one amusing.


5. Refreshments: Arrange for some refreshments during the seminar session
(Preferably tea/coffee +snacks) . Expenses should be met by the four persons taking the seminar on that day.



Sunday, July 17, 2005

Efforts to create acceptable programs.

In a previous post I said that I will try to create stand alone python appilcations. So, I tried and failed. But the one thing which I did find out, was that when you try to create a standalone program (which basically means that you won't be needing python for it to run) you get a really bloated final package. The executable may be small, but the other pyd, pyc and dlls really take up a lot of space. The unfortunate part is that the python interpreter is not as popular as the JVM, so you have to try and create a standalone program for a larger target audience. The other alternative I guess would be to use Jython, to create bytecodes out of programs and run them on a JVM.
Talking about Java, I managed to find a blog entry of John Carmack (The guy who made the graphics engine of wolf, doom, quake, quake 2, quake 3, doom 3 etc) about his latest endeavor to make a doom-rpg on a cell phone. He talks about how Java restricts the speed of execution of a program. An interesting read.

The infinite mokey theorem

The infinite mokey theorem states that almost surely (i.e. with probability equal to 1) a monkey hitting keys at random on a typewriter keyboard will eventually type out the collected works of William Shakespeare.
So, does it really happen? Some people (who had spare PCs and spare time) tried it out. This quote from the wikipedia article

""In 2003, scientists at Paignton Zoo and the University of Plymouth, in Devon in England reported that they had left a computer keyboard in the enclosure of six Sulawesi Crested Macaques for a month; not only did the monkeys produce nothing but five pages consisting largely of the letter S, they started by attacking the keyboard with a stone, and continued by urinating and defecating on it.""


Come to think of it maybe even before "infinity" occurs, the monkey(s) could actually evolve into a more intelligent lifeform and then take over the world.

Friday, July 15, 2005

Game programming

I had been reading a few articles on gamedev, as well as reading the Black Book of graphics programming by Michael Abrash (and yes, penny arcade too). The thing which sets game development apart from other areas of development in CS, is that it has almost a little bit of everything.
Here is something which I dug up from an article in penny arcade.

"You have to understand, game programming is the hardest type of programming there is (although my friend Epistax claims that advanced accounting software is), and it makes perfect sense: while ordinary software has a very specific goal, games create a world, an experience, a virtual reality, and therefore incorporating a little bit of each programming domain: AI, graphics, database, math, optimization, etc. That will take more lines of code, more art sketches, more music... I really didn't think such a commitment could ever be achieved by me. But all that was about to change..."

Tuesday, July 12, 2005

The First class

Today was the first day of the 7th semester. I did a fabulous job of turning up late to class. We didn't have much of studies. We were given a list of our graphics lab cycle. The unfortunate part is that the lab will be done in Turbo C++, which I consider as outdated. We will be using the BGI library for our programs. It would have been nicer if he had some exposure to something like openGL. Some of the programs given involved animation.
I wrote a program which simulated a ball (gravity and stuff). It is written in python using pythoncard. Source can be found here and the resource file can be found here.
Unfortunately you need python, wxPython and pythoncard to run it. I guess I will try to write a standalone application next time.

Sunday, July 10, 2005

A GUI for the SuDoku solver

At the request of Sourav, I have made a GUI for the SuDoku solver using pythoncard. The source code can be found here and the resource file is here. You will be needing python, wxPython and pythoncard to run it.
The GUI code is not pretty as this is my first day with pythoncard but it works all right.

Tuesday, July 05, 2005

A little bit of programming

I managed to dig up another programming challenge site which promises to be good : mathschallenge.net. I was able to solve a few of the problems with my new found knowledge of python.

Saturday, July 02, 2005

Back to square one

I returned from Delhi to Cochin today. The two days of travel were not too uncomfortable given the fact that I was coming in AC and I had Venkat, Vikas, Siddharth and Sumit for company. Patni is in the campus today and as I speak Anshul and Addy have gone to give the GD. My lab exam is on 6th and I came to know that the college will open on 11th *damn* .