Reportformat UPDATED
Reportformat UPDATED
NAME USN
ADITYA.VERNEKAR 2GI23IS004
CHAITAN.TALAWAR 2GI23IS026
APPASAB.WADDAR 2GI23IS014
1.Engineering Knowledge: Apply the knowledge of mathematics, science, engineering fundamentals and an
engineering specialization to the solution of complex engineering problems.
2.Problem Analysis: Identify, formulate, review research literature, and analyze complex engineering problems
reaching substantiated conclusions using first principles of mathematics, natural sciences and Engineering sciences.
3.Design/Development of solutions: Design solutions for complex engineering problems and design system
components or processes that meet the specified needs with appropriate consideration for the public health and
safety, and the cultural, societal, and environmental considerations.
4.Conduct investigations of complex problems: Use research-based knowledge and research methods including
design of experiments, analysis and interpretation of data, and synthesis of the information to provide valid
conclusions.
5.Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern engineering and IT
tools including prediction and modeling to complex engineering activities with an understanding of the limitations.
6.The engineer and society: Apply reasoning informed by the contextual knowledge to assess societal, health, safety,
legal and cultural issues and the consequent responsibilities relevant to the professional engineering practice.
7.Environment and sustainability: Understand the impact of the professional engineering solutions in societal and
environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.
8.Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of the engineering
practice.
9.Individual and team work: Function effectively as an individual and as a member or leader in diverse teams, and
in multidisciplinary settings.
10.Communication: Communicate effectively on complex engineering activities with the engineering community
and with society at large, such as, being able to comprehend and write effective reports and design documentation,
make effective presentations, and give and receive clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the engineering management
principles and apply these to one’s own work, as a member and leader in a team, to manage projects and in
multidisciplinary environments.
12. Life-long learning: Recognize the need for and have the preparation and ability to engage in independent and
lifelong learning in the broadest context of technological change.
INDEX
1) PROBLEM STATEMENT 1
2) OBJECTIVES 1
3) TOOLS USED 2
4) INTRODUCTION 3
5) METHODOLOGY 4
6) CODE IMPLEMENTATION 5
7) OUTPUT 11
8) CONCLUSION 15
9) REFERENCES 15
BALL CATCHER GAME
1) PROBLEM STATEMENT:
2) OBJECTIVES:
1
3) TOOLS USED :
v. Libraries Used:
• Random: For generating random positions for falling balls, making
the game unpredictable and exciting.
• Time: For recording timestamps in the log file, providing a detailed
history of gameplay sessions.
2
4) INTRODUCTION:
➢ SIGNIFICANCE:
1. Entertainment and Skill Development:
The game offers a combination of fun and skill enhancement. It sharpens
players’ reflexes, hand-eye coordination, and decision-making abilities.
2. Learning Opportunity for Developers:
For developers, this project provides hands-on experience in combining
game development with user authentication, database management, and
real-time data handling.
3. Practical Use of Programming Concepts:
The game incorporates essential programming concepts like GUI design,
collision detection, database interaction, and file handling, making it a
great project for learning and applying coding skills.
4. Customizable and Expandable:
The design allows for future enhancements, such as adding new levels,
power-ups, or additional gameplay mechanics, ensuring long-term
engagement and adaptability.
3
5) METHODOLOGY:
➢ Steps/Process Followed:
This methodology ensures the game is intuitive, scalable, and enjoyable, while also
teaching key programming concepts through its implementation.
4
6) CODE IMPLEMENTATION:
import tkinter as tk
from tkinter import messagebox
import sqlite3
import random
import time
5
if username and password:
conn = sqlite3.connect(DB_NAME)
cursor = conn.cursor()
cursor.execute("SELECT * FROM users WHERE username = ?",
(username,))
if cursor.fetchone():
messagebox.showerror("Error", "Username already exists!")
else:
cursor.execute("INSERT INTO users (username, password) VALUES
(?, ?)", (username, password))
conn.commit()
messagebox.showinfo("Registration", "Registration successful!")
conn.close()
else:
messagebox.showwarning("Input Error", "Please enter both username
and password")
conn = sqlite3.connect(DB_NAME)
cursor = conn.cursor()
cursor.execute("SELECT * FROM users WHERE username = ? AND
password = ?", (username, password))
user = cursor.fetchone()
conn.close()
if user:
messagebox.showinfo("Login", "Login successful!")
log_session(username, "Login", "-", 0)
open_game_window(username)
else:
messagebox.showerror("Error", "Invalid username or password")
6
# Ball-catching game
def open_game_window(username):
game_window = tk.Toplevel(root)
game_window.title("Ball Catching Game")
# Game variables
levels = {1: {"speed": 5, "level_name": "Easy"},
2: {"speed": 8, "level_name": "Medium"},
3: {"speed": 12, "level_name": "Hard"}}
level = 1
speed = levels[level]["speed"]
ball_count = 0
score = 0
# Move catcher
def move_left(event):
if canvas.coords(catcher)[0] > 0: # Prevent moving out of bounds
canvas.move(catcher, -20, 0)
def move_right(event):
if canvas.coords(catcher)[2] < 400: # Prevent moving out of bounds
canvas.move(catcher, 20, 0)
7
game_window.bind("<Left>", move_left)
game_window.bind("<Right>", move_right)
# Drop balls
def drop_ball():
nonlocal current_ball
if current_ball is None: # Only create a new ball if none exists
x = random.randint(20, 380)
ball_color = random.choice(["#FF6347", "#FFD700", "#00FA9A",
"#1E90FF", "#FF69B4"])
current_ball = canvas.create_oval(x, 10, x + 20, 30, fill=ball_color)
game_window.after(1500, drop_ball)
8
canvas.itemconfig(level_text, text=f"Level:
{levels[level]['level_name']}")
game_window.after(50, update_game)
drop_ball()
update_game()
9
tk.Label(popup, text=f"Game Over!\nLevel: {level}\nScore: {score}",
font=("Arial", 14)).pack(pady=10)
def restart_game():
popup.destroy()
log_session(username, "Restart", level, score)
open_game_window(username)
tk.Button(popup, text="Restart",
command=restart_game).pack(pady=5)
tk.Button(popup, text="Exit", command=popup.destroy).pack()
tk.Label(root, text="Username").pack()
entry_username = tk.Entry(root)
entry_username.pack()
tk.Label(root, text="Password").pack()
entry_password = tk.Entry(root, show="*")
entry_password.pack()
10
7) OUTPUT:
I. REGISTER/LOGIN DASHBOARD:
11
III. GAME DASHBOARD:
a. LEVEL 1: EASY
12
c. LEVEL 2: MEDIUM
d. LEVEL 3: HARD
13
IV. GAME OVER DASHBOARD:
14
8) CONCLUSION:
The Ball Catching Game is a perfect blend of fun and learning. It provides an
engaging and interactive experience for players while also showcasing key programming
concepts. Built using Python, a graphical user interface, and database integration, the
game offers a reliable and entertaining platform for users and developers alike.
For players, the game is an exciting challenge that sharpens reflexes and decision-
making skills as they progress through increasingly difficult levels. Features like score
tracking, real-time progress display, and a restart option make the game more engaging
and easier to access.For developers, this project demonstrates how to combine essential
programming skills such as user authentication, database management, file handling, and
GUI design. It emphasizes the importance of writing clean, scalable code and focusing on
user-friendly design.
What makes this game stand out is its versatility—it’s not just about
entertainment but also practical application. With room for future enhancements, such as
power-ups, multiplayer options, or improved graphics, the game can easily evolve into
something even more exciting. In essence, the Ball Catching Game is a fantastic example
of how programming can be both educational and enjoyable.
9) REFERENCES:
i. SQLite Documentation
https://www.sqlite.org/docs.html
ii. Tkinter Documentation
https://docs.python.org/3/library/tkinter.html
iii. Random Module Documentation
https://docs.python.org/3/library/random.html
iv. Time Module Documentation
https://docs.python.org/3/library/time.html
v. Game Design Tutorials
https://www.geeksforgeeks.org/python-tkinter/
15