Friday, June 10, 2011

Simple block game: Java work

Mr Sulabh Bista wrote an article about different programming languages in SEEE magazine, Encipher-2010. The title of his article "Learn language for life" was an inspiration for me. He suggested four important languages: Phython, PHP, MATLAB, JAVA. I knew MATLAB and i decided to learn JAVA. From then, it has been about 8-9 months and now I am in the level of making simple GUI games (I had made snake and ladder, published earlier in this blog). I also can't help thanking Mr Pranav Nandan for his kind support during my initial learning days. 

Taking about this block game, it is a simple single player game, you have to put all red blocks in brown square to win. The GUI in "stage 1" looks like as shown in figure below:

figure: sample GUI of stage 1

Blue areas are restricted, objects can not go there. To move red object, user has to push it by blue object. User can not push red object if two or more blocks are in same line or there is blue area after red object. To load different stages, press different keys: 1,2,3,4,5,6,7,8,9,0,-,+ (There are all together 12 stages). To move blue object, press: w = up, a = left, s = down and d = right. You can win if you could place all red objects in brown square.

To play game, download "blockgam.rar" file from here
(Warning: Please carefully read "read it.txt" , don't forget to place image folder "blockgam" in C:\ drive of your computer). Please comment down if you have any problems and suggestions about this game.

2 comments:

  1. nice work...ramro cha... AI use gareko ho?? sabai code afai haneko ho???

    ReplyDelete
  2. This is single player game, Why computer should play? (AI halna pardaina.).. Code afai garera ta blog ma rakheko.

    ReplyDelete

Visualization of Electromagnetic wave in MATLAB

Wave is imaginary and mysterious thing to us. Many of them are invisible and we even don’t know their pres...