Monday, 13 June 2016

Game operating with sensors


                           
                               Game operating with sensors


I have developed a game which can operate with sensors. For this project I choose MSP30G2 and python
In this project I have developed a game in python and I interface it with MSP430G2 to take the sensor values and according that sensor values I just operated the game which I have developed using python.
For this project we need to install pygame. Here I need to tell you people to the develop the game  we need to have a good knowledge of logic, mathematics, programmng skills,etc. it’s a fun topic to develop game that to with our own logic isn’t it great then let us begin!
I will try to do my project in step wise

Step1: First I need to download python along with pygame and pyserial library after that I need to import those libraries into python. After that I need to set the display height and width and color and caption

Step2: Here in this step I draw the character which plays a major role in my game. As I am developing the snake game I will draw the rectangle for my snake and circle as a food for my snake.


Step3: This is the major step for entire project  i.e.,in this step my task is to move the snake according the sensor value which I am sending throw MSP430G2.


Step4: In this step I will add some rule like boundaries when my snake touches the edges of the screen the screen has to display warning


Step5: We finish with snake part now I will concentrate on food after eating the food snake has to be doubled along with we need to produce more food at random position, For this I imported random library.

Step6: Finally I need to decorate my game by adding “start screen” , “end screen” ,“pause screen” and I need to add the images of  snakehead ,apple and game icon



                             

                                                                                                                                                                                   

I have developed other games in the same way with slight difference in the logic.









I need to work more on this project because I am facing the problem while moving snake/car around using sensors may be i need to prefer more accurate sensors and i need to change some part of logic too even though it a successes for certain extent thought of sharing it with you people it may help some or the other for their project..!
But I am happy to tell you it’s working by using keyboard I will share you the executable files for windows installer with you  so that you can download it and enjoy the game..!

 How to install these games:
Step 1: download the folder and click on setup file install it

Step 2: After installing it go to the> program files(x86) as shown in the above figure>there you will find the folder called deepu game folder for snake  and racer folder for racer game as in t




 Step 3(for snake game): Now open the folder there you will find the snake game file as shown in the below picture. double click on it your game will run
 Step 3(for racer): Now open the folder ther you will find the snake game file as shown in the below picture. double click on it your game will run



finally you will get the game.play according to the instruction and enjoy..



 You’re always welcome to give me your valuable suggestion , if you need more information regarding this project please leave a comment so that I can answer you.

No comments:

Post a Comment