Thursday, June 25, 2009

I got inspired to try out GAMEMAKER 7.0 after skirting through the wonderful book by Jacob Habgood and Mark Overmars.

Fig 1 . The Game Maker's Apprentice

GAMEMAKER reduced the 'coding' aspects and allows creation of games using GUI. Excellent software ! in some beginnner's pursuit I was able to create game snippets similar to PAC-MAN and SUPER-MARIO.The software is also supported by GAME MAKER LANGUAGE (GML) which is similar to Java/C++.

Fig 2. Game snippet similar to SUPER-MARIO. The 'mushrooms' add life and energy whilst the 'snakes' reduces it.

Monday, June 15, 2009

A 1 pound coin bouncing randomly with a 20 pound note in the background ! Another PyGame creation !

Fig 1. 21 Pounds

Fig 2. 21 Pounds

Fig 3. 21 Pounds

OBSERVATIONS AND THE CODE

The code is somewhat different than my earlier PyGame creations. Further, there is a parameter 'e' to slow down the speed of the 1 Pound coin. At e = 0.98 the 1 Pound coin comes to a stop after about 141 seconds , at the upper left corner of the pygame screen. For e = 1 , the coin never comes to stop while for e > 1 , the motion becomes faster and erroneous and the software rejects it after some time.

Video 1. 21 Pounds

The PyGame screen is also made to suit to that of the 20 pound note (591 x 326)and not the usual (640 x 480).

Fig 4. 21 Pounds , the code

It is also worth noting that random motion is obtained without the use of the random module.

Friday, June 5, 2009

Trying to animate a fire , using python game platform , pygame. I got the fire 'to life' by combining together 16 different sketches or 'sprites'. The primary plume and the wood being the static parts while the other smaller portions of the flame being in repetitive motion. Black is used as background for best contrast.

Fig1.Fire, Screen-Shot 1

Fig2. Fire , Screen-Shot 2

Superimposing the main plume with 14 other minor plume allows creating a seeming movement of the flames upward.

Fig 3. Without the main plume (14 minor plumes and the wood)

Video 1. PyGame Fire

The 'effect' is created by motion of the 14 sprites both in horizontal and vertical axis and the variation of the colour.Not often 16 different pieces are sewn together to form an animation in PyGame.

Sometweaking has to be done with the various parameters in order to 'liven-up' the fire.