Wednesday, March 17, 2010

And Back Again ...

So back I am to my projects. I've started studying a bit of Neural Networks (through L Behera's lectures on Youtube) and I find it really fascinating. After studying 2 of them, I was ready to jump into it. I've started a project on sourcefourge, which is basically a Character Recognition Program. It uses the Backpropagation Algorithm. The graphics have been done using Pygame, and its to be written in Python.

I've also started work on another Game Project. I'm going to be cloning Breakout this time. I've made the welcome screen, menu, and a bit of the actual gameplay. It's written in Pygame, and I'm also using PGU(Phil's Pygame Utilities). It contains certain stuff like level editor, tile editor, GUI, State Engine, High Score maintainence etc. This is the first time I'm using a Level Editor, and I have to say, it was really overwhelming at first, but when I finally got it, it felt awesome. I can't help realizing how giant a step this is in game development.

What else I've got planned up? Well, I'm looking for game engines again. And the same old criteria : Python bindings, Map Editor, blah blah. I'm back to 2d games for now.

I also plan to use a Web Framework called Django Web Framework for my website. A Web Framework is to a Website what a game engine is to a game (Most probably, I made this definition on my own). Django is also written in Python.

Here are some of the screenshots from my game :



Wednesday, February 17, 2010

When Firefox stops responding

One problem that we all must have faced at some point of time in the CC or CSE Lab is the problem of firefox not responding. It gives the following message :



Even after restarting the system, it gives the same message.
Also, on typing "ps -e" on the terminal (which is supposed to show you a list of processes running), it doesn't show firefox.

I remember facing this situation during First year. I finally gave up and started using someone else's account.
Now I faced the same situation in CSE Lab, and decided to find out how to deal with it.
It's quite simple, really. Open the terminal and type firefox -profilemanager. It will open the firefox profile manager. Right now, the current profile is causing problems. So just make another profile. You will most probably lose all your saved passwords, etc.

Now open firefox and select your new profile on being asked to select a profile.

A better method which I read somewhere involved deleting a lock file in your profile folder. However, I could find no such lock file in my profile folder. If you do, let me know.

Saturday, January 2, 2010

Guess who's back!



So, after a hiatus, I am back again. Last semester was a complete disaster in almost every way possible : my studies, hobbies, social life, etc. Finally during the holidays I got some learning started.

I have always wanted to make 3d games, but I don't just want to make them, I want to program them. I finally decided to take the plunge from 2d to 3d in the winter. I got started with a game engine called Soya3d. I also got started with some Modelling and Animation using Blender. Nothing fancy, just some basic armature stuff for animation. I made some models, some of them will be uploaded on my website soon enough. For GUI, I plan to use Tkinter (for now), so I read some Tkinter tutorials too.


However, Soya3d is a bit of a buggy game engine. It was everything that I needed, its just that it wasn't designed too properly. So I had to let it go. There is another game engine called PySoy, which has been started with one of the developers of Soya3d who wasn't comfortable with soya's design. It looks pretty good for now, the only problem is that it's current version is not supported. I'm looking forward to the next version. It was a pain to install. Imagine spending 3 hours to install a software (with 10 dependencies), and then finding out that that version isn't supported!


For now, I'm taking a break from game programming till I end up finding a better game engine or till PySoy Beta 3 is released. I have plenty of stuff to keep me occupied. We got an assignment in CS355 to build a website, and this gave me an oppurtunity to improve my website. I included a photo gallery and a random pic on each page, just to make it a bit more interesting. The pics are all random pictures of my room. You can visit the photo gallery here.

And remember : Lameness Always Prevails!

Sunday, November 1, 2009

Why Python kicks C right in the nuts

Program to reverse a string in C:

#include

int main()
{
char s[3] = {'a', 'b', 'c'};
int i, temp;
for(i = 0; i < strlen(s)/2; i+=1)
{
temp = s[strlen(s) - i - 1];
s[strlen(s) - i - 1] = s[i];
s[i] = temp;
}
for(i = 0; i < strlen(s); i+=1)
{
printf(s[i]);
}
return 0;
}


The corresponding program in Python:

s = 'abc'
s = s[::-1]
print s

Enough said.

P.S. : Sorry about the intendation.

Sunday, October 18, 2009

Second Prize Baby! Takneed pwned!

So finally I've uploaded a video of one of my games on Youtube. This game won the second prize in the Game Programming event of Takneek (An inter hall cult fest of IITK). I made this video using the software RecordMyDesktop in Ubuntu. Right now, its very slow as RecordMyDesktop really uses a lot of your system resources and reduces the FPS to around 5-6. I tried using other things like glc, but then I found out that it was only for applications that used OpenGL for drawing. I figured it out by first recording my own video and then recording Urban Terror (a First Person Shooter game for Linux), it played Urban Terror but didn't play my game.

By the way, the competition was full of Hall Politics. The third placed team used FPS Creator, a point-and-click type software in which you didn't need to program anything. But who cares, we won Takneek anyways.


Monday, September 21, 2009

Just Eat It!

For my next game, I was thinking of making a Pacman clone. It will be my first game with some AI in it. For it I'll be using the cocos2d game engine. This is my first experience with using a game engine instead of coding the game from scratch.

I researched a lot to figure out which game engine to use. I wanted to code in python, or some other high level language like lua or ruby. Also, I wanted that engine to fulfill 2 requirements: one, that it would help me out with all the boring rendering, input, physics etc and make it much easier for me. The other was that it should have a tile/map/level editor as I really wanted to use a level editor for my next game.

Most of the engines in my list had one of those 2 things. The engines that had the first one didnt have a tile editor while those that did have a tile editor were merely and API like pygame with a tile editor. Only 2 satisfied my needs: cocos2d and ika. I tried installing ika, but it was a pain, so I left it and stuck with cocos2d. It looks really good and easy to use, plus it has all the features.

I had a nightout today and managed to make all the starting screens basically. I will need to change their fonts and make backgrounds later on, but here's how it looks for now:



I know, I'll probably think of a better name when I get the time.

Sunday, September 13, 2009

Python Baby!

I had been suggested by a friend of mine to start using python, but I had been putting it off for quiet a while now. I finally got started with it, and within a day i fell in love with it. Its such an awesome language. Why had I not found this earlier? It increased my productivity quiet a lot. Why should I have to worry about things like memory and all the stupid syntax, when all I wanted was to make a game?

So I read a book called byte of python, and since I had already been learning python in bits and pieces for over an year, I became quit comfortable with it in a day. Then I starting using the API pygame. I coded the engine within a single day, something which I never would have achieved when I was using C++ and Allegro. It felt so good to actually see the results so quickly.

The game that I have been working on in pygame is basically a 2d racing game where you get a top view of a car and have to navigate around the track. It's a scrolling game, more of the track keeps appearing as you move around. It has single player and 2 player modes, and you can select from 3 types of cars (with different acceleration, max speed, etc) and 2 tracks. You can also specify the no of laps you want, and it calculates your timing when you finish the lap.

This is really my first COMPLETE game, with a menu and all. So I guess I'm a bit proud of it. I've also been using version control, which helps a lot.





To get the source code, click here
(you will need to have python and pygame installed)



I had also planned to make a windows executable version using py2exe, but it was too much messy stuff, so I gave it up.