Related items

How to make a ping pong ball game or brick game

12:23:00

brick and ball game
Brick and ball game

Before start making any game you have to take basic knowledge of the games and different requirements which are necessary for any game here i gonna tell you all these basic necessities in brief.So let's start.

About games:

Any game that you used play or have played before the most important part is the graphics quality.any player who plays the  game first attracted to it by its graphics quality.
second its processing time that means that the game should not hang,it should run smoothly.Through out the game without the gets hang.

About game designing:

Game designing is quite different then that of the playing a game.
Whenever we design a game we follow some of the common steps:

Load graphics      : it detects the graphics comp-abilities.
Initialise              : it initialise the game.
Input                    : in every game there is one function to process all the inputs of the game.
Logic                   : this is the heart of any game , every logic of the games are lies within logic area.
Score                   : score is most necessary part because it help in binding the user the game.
Main loop            : this runs the all process until game-over not occurs.



Requirements of game:

  1:Hardware requirements  
  2:Graphics requirement

Since we gonna use the C and C++ language to make that game in which we use the C graphics which are not very good for designing games.That by i am gonna make the this ping pong game in Python also which have the high quality graphics but don't afraid of the Python if you don't know how to work with python because i am also give my source code in C or C++ and python both which you can download from the link given at end of this post. 

1: In every game code you should place a checker to check the graphics error if any.This step should be done at the start of your game because if you device does not the graphic lib that you have used in your program then it will show some errors at the run time without giving the suitable reasons of the error and your users will get disappoint and not like your game.So the checker do nothing but to display that error on the screen so that user can understand and able to remove it on its level.In my game i use the Load graphics function to this error displaying part.

2: The Setup or initialise part in this part we actually load initial state of the game ,that means starting the environment and all other essentials such as in this game i have initialise the game modes ,initial length of snake, score is equal to zero and what ever else you want to initialise.

3: This section is the most important part because this part help the user to interact with the game.In this section we take all the inputs in a queue and pop them where the input is going to use.

4: This is the Heat of your game ,the logic of the game because it actually differentiate one game from other game and also all logic and algorithms those are used in a game are placed within this section.

5: In this section we refresh the score board. All the points gain or lost by the user during the play are changed after one cycle of your game.

6: Game Over


Download My ping pong game source code (header file from the link given below):

     1: Source code for C and C++  click here.

     2: Source code for Python  "coming soon".


Thank you for reading the post and if you like the post and you find it beneficial to you then please like and share the post. and if you have any query then please leave the comment below. 

You Might Also Like

0 comments

Thank you for your comment! and for visiting the our blog

Popular Posts

Like us on Facebook

Flickr Images