Ninja Game
Team Members:
Prasanna Regmi(THA080BEI007)
Keshar Singh Sunar(THA080BEI022)
Prabesh Parajulee(THA080BEI029)
Santosh Gadtaula(THA080BEI042)
DEPARTMENT OF ELECTRONICS AND
COMPUTER ENGINEERING
THAPATHALI CAMPUS
Date : 27 February ,2025
Presentation Outline
• Introduction
• Motivation
• Objectives
• Methodology
• Result and Analysis
• Scope and Application
• Future Enhancement
INTRODUCTION
• This 2D Ninja Game is an action-packed platformer developed using
pygame, where players control a stealthy ninja navigating through
various levels filled with obstacles and enemies.
• Main objective in this game is to defeat enemies,
avoid obstacles and progress through levels.
• Well-designed character and enemy animations
enhance realism and fluidity in movement and combat.
• Skill Development.
• Get hands-on learning of computer
graphics concepts.
• Foundation for future projects.
• Enhancing python skills and
exploring pygame library.
OBJECTIVES
• To apply computer graphics concepts such as graphics rendering,
animations, and transformations.
• Provide a engaging gaming experience to the user.
• To cultivate game development experience.
• Experiment with game mechanics and visual effects.
METHODOLOGY
1. Coordinates system in graphics
Coordinate System:
• Pygame uses a 2D Cartesian coordinate system where (0, 0) is the top-
left corner of the screen.
• X = Horizontal position, Y = Vertical position.
Player Movement:
Example :
player_rect.x += 5
player_rect.y += 0
2.Transformations in game
A.Scaling
• Pygame allows you to scale image using pygame.transform.scale()
functions.
Example :
player_image = pygame.transform.scale(player_image, (new_width,
new_height))
B.Rotation
• You can rotate images using pygame.transform.rotate() functions.
Example:
rotated_image = pygame.transform.rotate(player_image, 45)
3. Physics in the game
Collision detections:
• Use colliderect() for detecting collisions between two objects.
Example :
if player_rect.colliderect(enemy_rect):
# Handle collision
Movement physics:
• Basic physics for player movement, such as gravity for jumping or falling.
Example:
gravity = 0.5
player_velocity_y += gravity
player_rect.y += player_velocity_y
4.Enemy Behaviour
• How enemies track the player or move towards a set position.
Example :
if player_rect.x > enemy_rect.x:
enemy_rect.x += enemy_speed
elif player_rect.x < enemy_rect.x:
enemy_rect.x -= enemy_speed
5.RGB Values in Game Design
• RGB (Red, Green, Blue) color model to define colors in your game.
• Discuss how RGB values are used for the character (player), enemies,
background, etc.
Example :
player_color = (255, 0, 0) for red
6.Resolution and Pixels
Resolution Basics:
• The resolution of the game window affects the clarity and size of game
objects.
Pixel Manipulation:
• Discuss how each pixel is drawn on the screen and its relation to the
resolution.
Example :
pygame.display.set_mode((width, height)
Effects of Resolution:
• Screen resolutions impact pixel clarity and performance.
RESULT AND ANALYSIS
• Beginning Interface
• Instructions Screen
• Map Screen
• Gameplay Screen
SCOPE AND
APPLICATIONS
SCOPE:
• A great project for student learning python and game
development.
• Teaches a basic physics and graphics based concept like rotation,
scaling , velocity and so on.
APPLICATIONS:
• Interactive gaming experience for relaxing and gaming
environment.
• Can be used as a starting point for developing more complex
games.
FUTURE ENHANCEMENT
• Multiple levels and interactive environments.
• Storyline with objectives.
• Advanced AI Enemy bots.
• Cross Platform Adaptability.
THANK YOU !!!!
Any query ???