gamingdirectional: The final adjustment of the main menu page buttons

In this chapter, we will make a final adjustment of the main menu page buttons so they will be positioned nicely on the game scene. We need to edit three files in this chapter. We will adjust the button positions on the start scene class. from BgSprite import BgSprite from GameSprite import GameSprite from pygame.locals import * from pygame import math as mt import pygame import pygame.

Source

Planet Python

gamingdirectional: Put the power bar on the game scene

Finally we have came to the last chapter of this pygame project, in this chapter we will put three things on the game scene, a text which indicates what is the power level of the player, a game level indicator as well as a power bar which shows the power level of that player in the graphic form. We will need to edit three files in order to create such a mechanism. The first file we need to edit is…

Source

Planet Python

gamingdirectional: Touch up the about scene

Hello and welcome back, in the next few chapters we will touch up all the game scenes one by one for our new pygame project. In this chapter, we will touch up the About scene where we will adjust the position of the credit text accordingly. We will only need to edit one file and that is the start scene class in order to touch up the about scene. from BgSprite import BgSprite from GameSprite import…

Source

Planet Python

gamingdirectional: The screenshot mechanism

I have just completed the screenshot mechanism for this latest pygame project. Basically, we will need to edit a few files in order to implement that mechanism. The first file we need to edit is the scene class which will show all the screenshots that player has taken when he presses on the s key during the game stage! from BgSprite import BgSprite from GameSprite import GameSprite from pygame.

Source

Planet Python

gamingdirectional: Pause the gameplay

In this chapter, we will continue to tidy up the game interface of our latest pygame project by creating a pause mechanism to pause the game when the user presses on the p key on the keyboard. In order to pause the game, we need to edit three files. The first one is the main file where the program will detect the key up event of the p key whenever the user has pressed the p key on the computer…

Source

Planet Python