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.