0% found this document useful (0 votes)
2 views20 pages

Project Report

The project report by Aditya Jain for the academic year 2025-26 details the development of a 3D maze game using Python and the Pygame library. It includes sections on the project's objectives, source code, and system requirements, highlighting the use of event handling, collision detection, and 3D rendering techniques. The report emphasizes the hands-on experience gained in game development and programming concepts through the project.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views20 pages

Project Report

The project report by Aditya Jain for the academic year 2025-26 details the development of a 3D maze game using Python and the Pygame library. It includes sections on the project's objectives, source code, and system requirements, highlighting the use of event handling, collision detection, and 3D rendering techniques. The report emphasizes the hands-on experience gained in game development and programming concepts through the project.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

INDIRA IDEAL SCHOOL

ACADEMIC YEAR: 2025-26


PROJECT REPORT

BOARD ROLL NO. :

NAME : ADITYA JAIN

CLASS : XII - A

SUBJECT : COMPUTER SCIENCE

SUB CODE : 083


TABLE OF CONTENTS

S.NO DESCRIPTION PAGE


NO.
1. CERTIFICATE 3
2. ACKNOWLEDGEMENT 4
3. INTRODUCTION 5
4. SYNOPSIS 6
5. SOURCE CODE 11
6. OUTPUT 18
7. BIBLIOGRAPHY 20
CERTIFICATE
This is to certify that Aditya Jain has successfully
completed the project work entitled "Maze 3D in
PYTHON with PYGAME" in the subject Computer
Science (083) laid down in the regulations of CBSE
for the purpose of Practical Examination in Class
XII during the academic year 2025–2026.

Upasna Malhotra
P.G.T.(C.Sc)
ACKNOWLEDGEMENT

Apart from my efforts, the success of any project


depends largely on the encouragement and
guidelines of many others. I take this opportunity
to express my gratitude to the people who have
been instrumental in the successful completion of
this project.
I express my heartfelt gratitude to our Principal
Mam, Ms. Ritu Kulshrestha, who has been
continuously motivating and extending their
helping hand to us.
I am overwhelmed to express my thanks to our
computer science teacher, Ms. Upasna Malhotra,
for constant encouragement and the guidance
provided during this project. She critically viewed
my project and helped in solving each problem,
occurred during implementation of the project.
PROJECT ON MAZE 3D GAME WITH PYGAME

INTRODUCTION

My project is based on the game Maze 3D,


developed using Python and the Pygame library.
The player navigates a three-dimensional maze
from a first-person view, aiming to reach the exit
while avoiding dead ends. Along the way,
collecting coins increases the score, indicating
performance.
The game uses core concepts such as event
handling, collision detection, and 3D rendering
through raycasting. Pygame efficiently manages
graphics, user input, and the game loop.
This project gave me hands-on experience in
Python, enhanced my logic and spatial thinking,
and deepened my understanding of simulating 3D
gameplay within a 2D framework.
SYNOPSIS

Table of Contents: -
 Objective
 Program and System Requirements
OBJECTIVE:

This project is a Python-based recreation of the


popular game Maze 3D using the Pygame library. It
involves designing a simple 3D puzzle game where
the player moves in a maze to find the exit and the
movement of the player is controlled by user.

The main objective of this project is to understand


the fundamentals of game development using
Python and Pygame, including graphics, 3D
rendering, raycasting, event handling, and user
interaction.

 Python (Programming Language)


 Pygame (Library for game development)
 Code Editor (Visual Studio Code)
The game runs in a loop where the player
navigates through a three-dimensional maze from
a first-person perspective. The player uses the 'W'
key to move forward, the 'S' key to move
backward, and the mouse to look around or
change direction. The player has to explore the
maze, he or she must find the correct path to reach
the exit while avoiding dead ends. Coins are
scattered throughout the maze, and collecting
them increases the score. The challenge lies in
finding the exit as efficiently as possible while
maximizing the score.

This project helped me gain hands-on experience


in game development, improved my
understanding of Python programming, and
introduced me to concepts such as animation,
sound integration, and real-time user input
handling.
PROGRAM & SYSTEM REQUIREMENTS:
The modules used in while programing this project
are mentioned as follow:
pygame: This is the main library used for
developing the game. It handles graphics,
sound, game loops, user input (keyboard and
mouse), and rendering of the 3D-like maze
environment from a 2D perspective.

math: The math module provides mathematical


functions such as trigonometry (e.g., sin, cos,
tan, square root, etc.) It is essential for
calculating angles, distances, and movement
directions in the 3D raycasting logic.
sys: The sys module is used to interact with the
Python runtime environment. In this project, it's
mainly used for exiting the game cleanly using
sys.exit() when the player quits.

random: This module is used to introduce


randomness in the game. For example, it helps
generate the positions of coins or obstacles at
random locations inside the maze, making each
gameplay experience different.
SOURCE CODE
Importing different libraries and modules like pygame, sys,
math, random and adding background music also add a
function to choose fps (Frames Per Second) for the game.

Adding a sound of coin collection and window height and


width, creating a windows with screen variable, naming the
window, set fps runner, loading the images of sky land and
wall from the directory.
Setting tilesize (size of wall in pixels),creating some variables
which will help further.

Designing map of maze in which 1 stands for wall and 0 stands


for empty space, maintain the map to be 32 row x 32 column.
Adding map width and map height, adding player’s x-axis
position by playerx and player’s y-axis position by playery
Adding the coin position in the game and creating a function
raycast to be added in program so that the program can be
upgraded to 3D from 2D.

Now in the next picture of code we are graphically adding the


coin in the game by creating a function named drawcoin this
function will randomly add coins in whole over the game and
when the player touch the coin it will play cashsound and
increase score by +1.
Now creating a score variable which will count the user score
and will be displayed on the top left corner of the screen.

Now creating a loop for the game with while running: function
(in line 203).
1. Rendering sky.
2. Rendering land.
3. (From line 207 to 210) add a condition to exit the game
while window is closed.
4. Adding controls over the game for keys w and s for
forward and backward respectively and mouse for left
and right.
Calling the functions one by one and the functions clock.tick(fps) set
the fps of the game in this the fps variable let the user to choose the
fps before starting the game as defined in line 11 to 20.
OUTPUT
BIBLIOGRAPHY

1. COMPUTER SCIENCE WITH PYTHON – CLASS


XIIth BY SUMITA ARORA

2. WEBSITE :
(i) https://www.youtube.com/
(ii) https://www.vscode.dev/
(iii) https://www.pygame.org/tags/pygame/
(iv) https://www.google.com/
(v) https://www.github.com/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy