0% found this document useful (0 votes)
14 views18 pages

Game Presentation 2

Mr. Man's Adventure is a 2D game developed using Pygame, inspired by the Mario series, featuring smooth animations and dynamic backgrounds. The game includes character movement, obstacle generation, and collision detection, all implemented through various programming techniques. Players can control the character and score points by pressing the right arrow key, enhancing the immersive gaming experience.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views18 pages

Game Presentation 2

Mr. Man's Adventure is a 2D game developed using Pygame, inspired by the Mario series, featuring smooth animations and dynamic backgrounds. The game includes character movement, obstacle generation, and collision detection, all implemented through various programming techniques. Players can control the character and score points by pressing the right arrow key, enhancing the immersive gaming experience.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

PYGAME

START
Pinky Todkari Prerna Shimpi

Avani Rashi
Mahendrakar Bambugade
INTRODUCTION

MR.MAN’S
ADVENTURE
Mr.Man’s Adventure is a 2D game developed
using Pygame , inspired by the classic Mario
series. Players control Mr. Man as he
navigates through various obstacles, with
smooth animations and dynamic backgrounds
INSTRUCTION
creating an immersive experience. The game
leverages Pygame’s capabilities to provide a
nostalgic yet fresh gaming experience,
featuring colorful graphics and vibrant
soundscapes.
PACKAGES
USED

• PYGAME
• OSINSTRUCTION
• RANDOM
• MATH
ARE
YOU
READY?
LET’S PLAY
LOOPING SYSTEM IN
GAME

• The amazing feature of the game building is


INSTRUCTION
that the background moving , character
moving , even obstacles are in loops.
• That means even though character , obstacles
are moving they are in repetitive motion.
CHARACTER ANIMATION
• A class “player” has been created to develop the character in the game.
• To move the character right , left , jump we have used methods or function
and to display the character we have used function “def draw()” for the
output.
• The character that is moving in the game is not in motion, it is actually
images which shifting while pressing a key to move it.
• Depending on the FPS(Frames Per Seconds) the object will move otherwise it
will be stationary.
! SCORE

• THE SCORE IS
CALCULATED USING
RIGHT ARROW KEY
• WHENEVER THE
RIGHT ARROW KEY IS
CLICKED SCORE IS
INCREMENTED
HOW OBSTACLES
GENERATE

• SET THE OBSTACLES ‘X’,’WIDTH’,’HEIGHT,.


• CHOOSES A RANDOM IMAGE FROM THE
INSTRUCTION
IMAGES LIST.
• SETS ‘Y’ CO-ORDINATE TO POSITION THE
OBSTACLE AT THE BOTTOM OF THE SCREEN
MINUS THE HEIGHT OF THE SCALED IMAGE.
• NEXT OBSTACLE WILL BE DRAWN ON THE
GAME WINDOW.
! How collision
• The works
total widtd occupied by obstacle and
gaps is calculated:
total_obstacles_width=num_obstacles*ob
stacle_gap
• The starting x position is calculated to
ensure obstacles are properly spaced
apart ,taking into account screen width
‘w’.
• An ‘obstacle’ object is created with the
calculated x position y position ,random
height, ‘mushs’
• Then the created obstacle is appended to
the ‘obstacle’ list
collision
• The ‘check_collision’ function
determines if a ‘player’ collides with
an object ‘obj’ by checking for
overlap in their bounding boxes
• Horizontal overlap:
checks if the player’s right edge
is left of
the objects right edge
checks player’s left edge is right
of the objects left edge
• Verticle overlap:
Checks if player’s bottom edge
is above the object’s bottom edge
Checks if player’s top edge is
THANKS FOR
PLAYING!
END

You might also like