building games with pygame the games refresh rate is slower then the the given ticks per second this can be used to help limit the runtime speed of game by calling clock tick ( once per framethe program will never run at more than frames per second more interactive pygame application the first pygame application we looked at earlier just displayed window with the caption 'hello worldwe can now extend this little by playing with some of the features we have looked at above the new application will add some mouse event handling this will allow us to pick up the location of the mouse when the user clicked on the window and draw small blue box at that point if the user clicks the mouse multiple times we will get multiple blue boxes being drawn this is shown below this is still not much of game but does make the pygame application more interactive the program used to generate this application is presented belowimport pygame frame_refresh_rate blue ( background ( white width height def main()print('initialising pygame'pygame init(required by every pygame application