Introducing The 'Mini Arcade' PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

COMPUTER SCIENCE

INVESTIGATORY PROJECT
MINI ARCADE

DONE BY:
NAME: M.POORANASRI
CLASS: 12 SEC: D
ROLLNO:
SCHOOL: THE PSBB MILLENNIUM SCHOOL
ACKNOWLEGEMNT

A project is a golden opportunity for learning and self-


development. The main objective of our Computer
science project is to inculcate creativity, coding skills
and enthusiasm in spirit and performance, amongst the
students. Firstly I would like to thank our beloved
Principal Dr.Mrs.BHAVANI BASKAR and Vice
Principal Mrs.V.R. VIDHYA LAKSHMI for allowing us
to do this project. I am also grateful to the Head of the
Department of Computer Science and our guide for the
project, MRS. SUGUNA DEVI AMRITHARAJ for the
immense support given towards the completion of the
project. Her exemplary investment in the complete
process, constant encouragement and insightful
feedback helped us achieve our objectives. Lastly, I
would like to thank our family members whose support
helped us complete the project within the deadline.
INDEX

I. ABOUT PYTHON 01
II. FEATURES OF PYTHON 02
III. ABOUT MYSQL 04
IV. SCOPE OF PROJECT 05
V. SOURCE CODE 09
VI. PROGRAM ANALYSIS 19
VII. SAMPLE OUTPUT 23
VIII. FUTURE SCOPE 28
IX. REFERENCE 30
ABOUT PYTHON

Python is a high-level, versatile programming


language known for its simple, readable syntax,
making it popular among both beginners and
professionals. Created by Guido van Rossum in
1991, Python supports multiple programming
styles—object-oriented, procedural, and functional
—providing flexibility for developers. As an
interpreted language, it allows for quick testing
and debugging. With a large standard library and a
vast ecosystem of libraries like Pandas, Django,
and TensorFlow, Python is widely used in fields like
web development, data science, AI, and
automation. Its strong community support and
extensive resources make Python a top choice for
developers worldwide.

01
FEATURES OF PYTHON

Simple and Readable Syntax: Python’s easy-to-read code


makes it beginner-friendly and allows for quick development.

Interpreted and Dynamically Typed: Python executes code line


by line and manages data types automatically, simplifying
debugging and coding.

Cross-Platform Compatibility: Python is portable and works on


multiple operating systems, like Windows, macOS, and Linux.

Extensive Standard Library: Built-in modules for tasks like file


handling and math reduce the need for external libraries.

Vast Ecosystem of Libraries: Specialized libraries (e.g.,


NumPy, Django, TensorFlow) support fields like data science,
web development, and AI.

02
Multi-Paradigm Support: Python supports object-oriented,
procedural, and functional programming, offering flexibility.

Automatic Memory Management: Python’s built-in garbage


collection handles memory allocation, preventing memory leaks.

Strong Community and Open Source: Python’s large community


provides extensive resources and support, making it highly
accessible.

These features make Python versatile for applications


across web development, data analysis, machine learning,
and automation.

03
ABOUT MYSQL
MySQL is an open-source relational database
management system (RDBMS) that enables users to
store, organize, and retrieve data efficiently.
Developed by Oracle Corporation, MySQL is known for
its reliability, speed, and ease of use, making it one of
the most widely used databases in the world. It uses
Structured Query Language (SQL) for database
operations, which allows users to create, modify, and
manage databases through commands and queries.
MySQL is cross-platform, compatible with Windows,
macOS, and Linux, and supports various applications,
from small-scale websites to large, data-intensive
applications. It offers features like data security,
scalability, and transaction processing, making it ideal
for e-commerce, data warehousing, and enterprise
applications. MySQL also integrates well with
programming languages such as PHP, Python, and
Java, and powers many popular platforms, including
WordPress, Facebook, and YouTube.

04
SCOPE OF THE PROJECT

The Mini Arcade project is a comprehensive


initiative to develop a compact and engaging
gaming platform that caters to a wide
audience. The project aims to provide a
collection of small, entertaining games that
are easy to access and play, fostering a
seamless user experience. Below is a detailed
exploration of the scope, objectives, and
potential of this project.

05
1.Objective:
Develop simple yet engaging games to enhance coding skills
and provide entertainment through interactive user
interfaces.
Demonstrate knowledge of game logic, algorithms, and
Python programming by implementing three different types
of games.
Provide an opportunity to explore different areas of game
development like text-based games (Hangman, Jumbled
Words) and graphical games (Snake).
2. Features:
Hangman:
Implement a word guessing game with a set number of
attempts.
Display user progress visually (correct guesses,
remaining attempts).
Jumbled Words:
Scramble a word and allow the user to guess the original
word.
Provide feedback on success or failure.
Snake Game:
Develop a simple graphical interface using a Python
library (e.g., pygame or turtle).
Implement snake movement, growth, collision
detection, and game-over conditions.
06
3. Target Audience:
Beginner to intermediate Python learners interested in
practicing game development.
Casual gamers who enjoy simple, nostalgic games with
minimal complexity.
4. Tools and Technologies:
Programming Language: Python
Libraries/Modules: turtle for graphical games, random for
word games, and time for managing delays and timing in the
games.
Development Environment: Any Python IDE (e.g., VSCode,
PyCharm, Jupyter).
5. Expected Outcomes:
Improved understanding of Python's capabilities in creating
interactive applications.
Completion of three games with fully functional code, ready
for execution and modification.
Implementation of basic game mechanics, user interaction,
and event handling.

07
6. Challenges:
Handling user input and game flow in each game (especially
with text-based interaction in Hangman and Jumbled
Words).
Designing smooth graphical experiences for the Snake Game
using Python's libraries.
Debugging and testing each game to ensure they are
engaging and free of errors.
7. Future Enhancements:
Add levels or difficulty modes to make the games more
challenging.
Integrate a scoring system to track high scores and
encourage replayability.
Add graphical improvements to the text-based games, like
animated word displays or custom themes.

08
SOURCE CODE
def insert_hangman():
n=int(input("enter no of values you want to enter:"))
level=input("enter dificulty level:") word_list=eval(input("enter all
the word in a list:")) for i in word_list:
s="INSERT INTO hangman VALUES (%s, %s,%s)"
t=(level,i,len(i)) cur.execute(s,t)
con.commit()
def insert_jumbledwords():
n=int(input("enter no of values you want to enter:"))
level=input("enter dificulty level:") word_list=eval(input("enter all
the word in a list:")) for i in word_list:
s="INSERT INTO jumbled_words VALUES (%s, %s,%s)" t=
(level,i,len(i)) cur.execute(s,t)
con.commit()
def delete_hangman():
val=input("enter the word you want to delete:") s="delete
from hangman where word=%s;" cur.execute(s, (val,))
con.commit()
def delete_jumbledwords():
val=input("enter word you want to delete:") s="delete
from jumbled_words where word=%s;" cur.execute(s,
(val,)) con.commit()
def display_hangman():
cur.execute("select dificulty_level,word from hangman;")
data=cur.fetchall() con.commit() for i in data:

print(i)
def display_jumbledwords():
cur.execute("select dificulty_level,word from jumbled_words;")
data=cur.fetchall() con.commit() for i in data:

print(i)
import mysql.connector as sql
con=sql.connect(host='localhost',
user='root',passwd='admin',database='game_world')
cur=con.cursor() import random global SCORE SCORE=0
while True:

print("WELCOME TO GAME
WORLD!!") print("SELECT THE
GAME") print("1..HANGMAN")
print("2..JUMBLED WORDS")
09
print("3..SNAKE GAME") print("4.EXIT")
ch=int(input("ENTER CHOICE OF GAME:"))
if ch==1:

W=input("ARE YOU THE PLAYER OR


ADMIN:") if W.lower()== "admin":
PW=input("enter password:")
pw="game#123" if PW==pw:
while True:
print("1.INSERT NEW WORD INTO THE WORD LIST")
print("2.DELETE A WORD FROM THE WORD LIST")
print("3.DISPLAY ALL WORDS")
print("4.EXIT")
cho=int(input("Enter choice:"))
if cho==1:
insert_hangman() print()
print("NEW WORD
INSERTED")
elif cho==2:
delete_hangman()
print()
print("WORD DELETED")
elif cho==3:
display_hangman()
elif cho==4:
print("THANK YOU!!")
break
else:
print("PLEASE ENTER CORRECT
CHOICE")
elif W.lower()== "player":
name=input("ENTER PLAYER NAME:")
print('''RULES:
*YOU WILL BE GIVEN A WORD THAT CONTAINES '_' FOR LETTERS"
*GUESS THE LETTER FOR THE WORD
*IF YOUR GUESS IS CORRECT ,THE'_' WILL BE REPLACED BY THE LETTER
*IF YOUR GUESS IS WRONG, THEN IT WILL BE COUNTED AS A FAIL AND THE MAN WILL BE HUNG
*YOU WILL GET A TOTAL OF 7 CHANCES OF FAIL BEFORE THE MAN IS HUNG
*FIND THE WORD BEFORE THE MAN IS HUNG
*THIS IS A CONTINUOUS GAME, SO THE GAME WILL ONLY STOP WHEN YOU ENTER 'STOP' OR
WHEN THE MAN DIES GOOD LUCK!!!''')
level=input("enter level:")

10
cur.execute("select word from hangman where dificulty_level=%s", (level,))
data=cur.fetchall()
list_hangman=[]
def check_word(word):
if word not in list_hangman:
list_hangman.append(word)
return True
else:
word=choose_word()
def choose_word():
n=random.randint(0,len(data)-1)
word=data[n][0] st=check_word(word)
if st==True:
return word

HANGMANPICS = ['''
+---
+ |
| |
|
|
|
=========''', '''
+---
+ |
| |
O |
|
|
=========''', '''
+---
+ |
| |
O |
| |
|
=========''', '''
+---
+ |
| |
O |
/| |
|
=========''', '''
+---
+ |
| |
O |
/|\ |
|
=========''', '''

11
+---
+ |
| |
O |
/|\ |
/ |
=========''', '''
+---
+ |
| |
O |
/|\ |
/\ |
=========''']

def display_word(word, correct_guesses):


return " ".join([letter if letter in correct_guesses else "_"for letter in word])
def play_hangman():
global word
word = choose_word()
correct_guesses = []
incorrect_guesses = []
print("Welcome to Hangman!")
print(display_word(word, correct_guesses))
global attempts
attempts = 7 while
attempts > 0:
guess = input("Guess a letter: ").lower() if
len(guess) != 1 or not guess.isalpha(): print("Please
enter a single letter.") continue
if guess in correct_guesses or guess in incorrect_guesses:
print("You've already guessed that letter.") continue
if guess.lower() in word.lower():
correct_guesses.append(guess)
print("Correct!")
else:
incorrect_guesses.append(guess)
attempts -= 1 if attempts==6:
print(HANGMANPICS[0])
elif attempts==5:
print(HANGMANPICS[1])
elif attempts==4:
print(HANGMANPICS[2])
elif attempts==3:

12
print(HANGMANPICS[3])
elif attempts==2:
print(HANGMANPICS[4])
elif attempts==1:
print(HANGMANPICS[5])
elif attempts==0:
print(HANGMANPICS[6])
print("THE MAN HAS HUNG")
print("GAME OVER") break

print(f"Incorrect! You have {attempts} attempts remaining.")


print(display_word(word, correct_guesses))
if all(letter in correct_guesses for letter in word):
print("Congratulations! You've guessed the word:", word) global
SCORE if level.lower()=='easy':
SCORE+=5
elif level.lower()=='moderate':
SCORE+=10
elif level.lower()=='hard':
SCORE+=15
else:
SCORE+=20
break
else:
print("You've run out of attempts! The word was:", word)
play_hangman()
elif ch==2:
W=input("ARE YOU THE PLAYER OR ADMIN:")
if W.lower()== "admin":
PW=input("enter password")
pw="game#123"
if PW==pw:
while True:
print("1.UPDATE THE WORD LIST")
print("2.DELETE A WORD FROM THE WORD LIST")
print("3.DISPLAY ALL THE WORDS")
print("4.EXIT")
chi=int(input("ENTER CHOICE:"))
if chi==1:
insert_jumbledwords() print()
print("NEW WORD
INSERTED")
elif chi==2:

13
delete_jumbledwords()
print()
print("WORD DELETED")
elif chi==3:
display_jumbledwords()
elif chi==4:
print("THANK YOU!!")
break
else:
print("PLEASE ENTER CORRECT CHOICE")
elif W.lower()== "player":
name=input("ENTER YOUR PLAYER NAME:")
print("RULES OF THE GAME:")
print('''*ENTER THE LEVEL YOU EANT TO PLAY
*THE LEVELS ARE: EASY, MODERATE,HARD,EXTREME
*YOU WILL GET A JUMBLED WORD FOR THE CHOSEN LEVEL
*YOU WILL GET 3 TRIES
*IF YOU GOT THE WORD CORRECT ON THE FIRST TRY THEN YOU WILL GET 15 POINTS *IF
YOU GOT THE WORD ON SECOND TRY THEN YOU WILL GET 10 POINT
*IF YOU GET THE WORD ON THIRD TRY THEN YOU WILL GET 5 POINTS
*IF YOU DIDN'T GET THE WORD CORRECT EVEN AFTER 3 TRIES YOU WILL GET -5 POINTS
*THE GAME WILL END WHEN YOU DIDN'T GET THE WORD FOR 3 TIMES AND OUR TOTAL
SCORE WILL BE SHOWN
*OR YOU COULD END THE GAME WHEN YOU TYPE STOP FOR YOUR ANSWER''')
LIST_jumbledwords=[]
level=input("enter level:")
command="select word from jumbled_words where dificulty_level=%s"
cur.execute(command, (level,)) data=cur.fetchall()

def check_word(word):
if word not in LIST_jumbledwords:
LIST_jumbledwords.append(word)
return True
else:
word=get_word()
def get_word():
n=random.randint(0,len(data)-1)
word=data[n][0] st=check_word(word)
if st==True:
return word
Word=get_word()
def jumble_word(word):
letters = list(word)

14
random.shuffle(letters) jumbled_word =
''.join(letters) return jumbled_word
quest=jumble_word(Word) print("YOUR
JUMBLED WORD IS:") print(quest) for i in
range (1,4):
ANS=input("ENTER YOUR ANSWER:").lower() if
ANS.lower()==Word.lower():
print("CONGRATULATIONS!! YOU GOT YOUR WORD CORRECT!!")
if level.lower()=='easy':
if i==1:
SCORE+=15
print(SCORE)
elif i == 2:
SCORE+=10
print(SCORE)
else:
SCORE+=5
print(SCORE)
break
elif level.lower()=='moderate':
if i==1:
SCORE+=20
elif i == 2:
SCORE+=25
else:
SCORE+=10
break
elif level.lower()=='hard':
if i==1:
SCORE+=30
elif i == 2:
SCORE+=25
else:
SCORE+=15
break
else:
if i==1:
SCORE+=45
elif i == 2:
SCORE+=30
else:
SCORE+=15
break
break
else:
if i==3:
print("OOPS!! BETTER LUCk NEXT TIME")
print("THE CORRECT WORD IS:",Word)
print("YOUR SCORE:",SCORE) y=False

15
else:
print("TRY AGAIN")

elif ch==3:
import turtle
import random
print(''' THE RULES OF THE GAME:
*the score will be counted as the snake eat the food
*the game will be reseted when the head of the snake collides with itself
*the game score will be printed when you end the game''')
level=input('enter level(easy,moderate,hard,extreme):')
def play_game():
global score
score=0

w = 1300
h = 600
food_size = 10
if level.lower()=='easy':
delay = 300
elif level.lower()=='moderate':
delay=200
elif level.lower()=='hard':
delay=120
else:
delay=80
offsets = { "up": (0, 20),
"down": (0, -20),
"left": (-20, 0),
"right": (20, 0)}
def reset():
global snake, snake_dir, food_position, pen
snake = [[0, 0], [0, 20], [0, 40], [0, 60], [0, 80]]
snake_dir = "up"
food_position = get_random_food_position()
food.goto(food_position)
xy=move_snake()
def move_snake():
global snake_dir
new_head = snake[-1].copy()
new_head[0] = snake[-1][0] + offsets[snake_dir][0]
new_head[1] = snake[-1][1] + offsets[snake_dir][1]

16
if new_head in snake[:-1]:
global ch print("GAME OVER!!!")
print ("YOUR SCORE=",score)
global SCORE SCORE+=score
turtle.exitonclick()

else:
snake.append(new_head)

if not food_collision():
snake.pop(0)

if snake[-1][0] > w / 2:
snake[-1][0] -= w
elif snake[-1][0] < - w / 2:
snake[-1][0] += w
elif snake[-1][1] > h / 2:
snake[-1][1] -= h
elif snake[-1][1] < -h / 2:
snake[-1][1] += h

pen.clearstamps()

for segment in snake:


pen.goto(segment[0], segment[1])
pen.stamp()

screen.update()
turtle.ontimer(move_snake, delay) return
False
def food_collision():
global score
global food_position
if get_distance(snake[-1], food_position) < 20:
score+=1 food_position = get_random_food_position()
food.goto(food_position) return True
return False
def get_random_food_position():
x = random.randint(- w / 2 + food_size, w / 2 - food_size)
y = random.randint(- h / 2 + food_size, h / 2 - food_size)
return (x, y)

17
def get_distance(pos1, pos2):
x1, y1 = pos1
x2, y2 = pos2
distance = ((y2 - y1) ** 2 + (x2 - x1) ** 2) ** 0.5
return distance
def go_up():
global snake_dir if snake_dir
!= "down":
snake_dir = "up"
def go_right():
global snake_dir
if snake_dir !="left":
snake_dir = "right"
def go_down():
global snake_dir
if snake_dir!= "up":
snake_dir = "down"
def go_left():
global snake_dir
if snake_dir != "right":
snake_dir = "left"

screen = turtle.Screen()
screen.setup(w, h)
screen.title("PYTHON GAME")
screen.bgcolor("green")
screen.setup(500, 500)
screen.tracer(0) pen =
turtle.Turtle("square") pen.penup()
food = turtle.Turtle()
food.shape("square") food.color("red")
food.shapesize(food_size / 20)
food.penup() screen.listen()
screen.onkey(go_up, "Up")
screen.onkey(go_right, "Right")
screen.onkey(go_down, "Down")
screen.onkey(go_left, "Left") reset()
turtle.mainloop()
play_game()
elif ch==4:
print("YOUR TOTAL SCORE :",SCORE)
break
else:
print("PLEASE ENTER CORRECT CHOICE!!")

18
PROGRAM ANALYSIS

The program functions as a game platform where users can


play three different games: Hangman, Jumbled Words, and
Snake, with both player and admin functionalities. Below is a
more detailed breakdown:
1. Hangman Game:
Admin:
Can insert new words, delete words, and display the
list of words from the database.
The game stores words with difficulty levels (easy,
moderate, hard) in a MySQL database
(game_world).
Player:
The player is given a word with missing letters
(represented by underscores) and has to guess the
correct letters.
They are allowed a maximum of 7 incorrect guesses
before the game ends.
Points are awarded based on the difficulty level of
the word (easy: 5 points, moderate: 10, hard: 15).

19
2. Jumbled Words:
Admin:
Can add new jumbled words, delete words, and display
the list of words in the database.
Player:
A jumbled word is presented, and the player must guess the
correct word.
The player is given 3 attempts to guess the word. Points are
awarded based on how many attempts it takes:
1st attempt: Highest points (easy: 15, moderate: 20,
hard: 30).
2nd attempt: Moderate points (easy: 10, moderate: 25,
hard: 25).
3rd attempt: Lowest points (easy: 5, moderate: 10,
hard: 15).
If all attempts are used up without a correct guess, negative
points are awarded.

20
3. Snake Game:
Gameplay:
The player controls a snake that moves around the screen,
eating food and growing longer.
The game ends when the snake collides with itself.
The snake’s speed and difficulty can be adjusted based on the
chosen level (easy, moderate, hard, extreme), with faster
speeds on higher difficulty levels.
The score is updated as the snake eats food, and the game
resets if the snake collides with itself.
Database Interaction:
The program uses a MySQL database (game_world) to store
the words for both Hangman and Jumbled Words games, with
tables for each game. Players can interact with the game via
the admin interface to modify the word lists.
SQL commands are used to insert, delete, and fetch words
from the database, ensuring the games can be dynamically
updated with new content.

21
Game Loop:
The program operates in a continuous loop where the
user can select between games, perform
administrative tasks, or play as a player.
Admins can modify the word lists, while players can
choose their difficulty level and play accordingly.
Scores are accumulated across games, and the total
score is displayed at the end.
This system is built with an emphasis on interaction,
allowing both game management (by admins) and
gameplay (by players) to occur within a single
program structure.

22
SAMPLE OUTPUT
WELCOME TO GAME WORLD!! SELECT THE GAME
1..HANGMAN
2..JUMBLED WORDS
3..SNAKE GAME
4.EXIT
ENTER CHOICE OF GAME:1
ARE YOU THE PLAYER OR ADMIN:player
ENTER PLAYER NAME:sri
RULES: *YOU WILL BE GIVEN A WORD THAT CONTAINES '_' FOR LETTERS"
*GUESS THE LETTER FOR THE WORD
*IF YOUR GUESS IS CORRECT ,THE'_' WILL BE REPLACED BY THE LETTER
*IF YOUR GUESS IS WRONG, THEN IT WILL BE COUNTED AS A FAIL AND THE MAN WILL BE
HUNG
*YOU WILL GET A TOTAL OF 7 CHANCES OF FAIL BEFORE THE MAN IS HUNG
*FIND THE WORD BEFORE THE MAN IS HUNG
*THIS IS A CONTINUOUS GAME, SO THE GAME WILL ONLY STOP WHEN YOU ENTER 'STOP' OR
WHEN THE MAN DIES GOOD LUCK!!!
enter level:moderate
Welcome to Hangman
!________
Guess a letter: a
+---
+ |
| |
|
|
|
=========
Incorrect! You have 6 attempts remaining.
_ _ _ _ _ _ _ _ Guess a letter: e
+---
+ |
| |
O |
|
|
=========

Incorrect! You have 5 attempts remaining. _ _ _ _ _ _


_ _ Guess a letter: i

23
+---
+ |
| |
O |
| |
|
=========
Incorrect! You have 4 attempts remaining.
________
Guess a letter: o
Correct!
_____o__
Guess a letter: u
+---
+ |
| |
O /| |
|
|
=========
Incorrect! You have 3 attempts remaining.
_____o__
Guess a letter: s
Correct!
_____o__
Guess a letter: c
+---
+ |
| |
O |
/|\ |
|
=========
Incorrect! You have 2 attempts remaining.
_____o__
Guess a letter: j
+---
+ |
| |
O /|\ |
/ |
|
=========
Incorrect! You have 1 attempts remaining.
_____o__
Guess a letter: l
+---
+ |
| |
O |
/|\ |
/\ |
=========
24
THE MAN HAS HUNG
GAME OVER
WELCOME TO GAME WORLD!!
SELECT THE GAME
1..HANGMAN
2..JUMBLED WORDS
3..SNAKE GAME
4.EXIT
ENTER CHOICE OF GAME:2
ARE YOU THE PLAYER OR ADMIN:admin
enter password:game#123
1.UPDATE THE WORD LIST
2.DELETE A WORD FROM THE WORD LIST
3.DISPLAY ALL THE WORDS
4.EXIT
ENTER CHOICE:1
enter no of values you want to enter:5
enter dificulty level:easy
enter all the word in a list:['apple','milk','body','house','chair']
NEW WORD INSERTED
1.UPDATE THE WORD LIST
2.DELETE A WORD FROM THE WORD LIST
3.DISPLAY ALL THE WORDS
4.EXIT
ENTER CHOICE:3
('easy', 'apple')
('easy', 'milk')
('easy', 'body')
('easy', 'house')
('easy', 'chair')
1.UPDATE THE WORD LIST
2.DELETE A WORD FROM THE WORD LIST
3.DISPLAY ALL THE WORDS
4.EXIT
ENTER CHOICE:1
enter no of values you want to enter :5
enter dificulty level: moderate
enter all the word in a list:['chocolate','liquid','sapphire','eclipse','horizon']

NEW WORD INSERTED


1.UPDATE THE WORD LIST
2.DELETE A WORD FROM THE WORD LIST
3.DISPLAY ALL THE WORDS
4.EXIT ENTER CHOICE:3
('easy', 'apple')
('easy', 'milk')
('easy', 'body')
('easy', 'house')
('easy', 'chair')
25
('moderate', 'chocolate')
('moderate', 'liquid')
('moderate', 'sapphire')
('moderate', 'eclipse')
('moderate', 'horizon')
1.UPDATE THE WORD LIST
2.DELETE A WORD FROM THE WORD LIST
3.DISPLAY ALL THE WORDS
4.EXIT
ENTER CHOICE:4
THANK YOU!!
WELCOME TO GAME WORLD!!
SELECT THE GAME
1..HANGMAN
2..JUMBLED WORDS
3..SNAKE GAME
4.EXIT
ENTER CHOICE OF GAME:2
ARE YOU THE PLAYER OR ADMIN: player
ENTER YOUR PLAYER NAME: sri
RULES OF THE GAME:
*ENTER THE LEVEL YOU WANT TO PLAY
*THE LEVELS ARE: EASY, MODERATE, HARD, EXTREME
*YOU WILL GET A JUMBLED WORD FOR THE CHOSEN LEVEL
*YOU WILL GET 3 TRIES
*IF YOU GOT THE WORD CORRECT ON THE FIRST TRY THEN YOU WILL GET 15 POINTS
*IF YOU GOT THE WORD ON SECOND TRY THEN YOU WILL GET 10 POINT
*IF YOU GET THE WORD ON THIRD TRY THEN YOU WILL GET 5 POINTS
*IF YOU DIDN'T GET THE WORD CORRECT EVEN AFTER 3 TRIES YOU WILL GET -5 POINTS
*THE GAME WILL END WHEN YOU DON'T GET THE WORD FOR 3 TIMES AND OUR TOTAL SCORE WILL
BE SHOWN
*OR YOU COULD END THE GAME WHEN YOU TYPE STOP FOR YOUR ANSWER
enter level: moderate
YOUR JUMBLED WORD IS: oohalccet
ENTER YOUR ANSWER: chocolate
CONGRATULATIONS!!
YOU GOT YOUR WORD CORRECT!!
WELCOME TO GAME WORLD!!
SELECT THE GAME
1..HANGMAN
2..JUMBLED WORDS
3..SNAKE GAME
4.EXIT
ENTER CHOICE OF GAME:3
THE RULES OF THE GAME:
*THE SCORE WILL BE COUNTED AS THE SNAKE EAT THE FOOD
*THE GAME WILL BE RESETED WHEN THE HEAD OF THE SNAKE COLLIDES WITH ITSELF
*THE GAME SCORE WILL BE PRINTED WHEN YOU END THE GAME

26
enter level(easy,moderate,hard,extreme):moderate GAME
OVER!!!
YOUR SCORE= 2
WELCOME TO GAME WORLD!!
SELECT THE GAME
1..HANGMAN
2..JUMBLED WORDS 3..SNAKE
GAME
4.EXIT
ENTER CHOICE OF GAME:4
YOUR TOTAL SCORE : 22

SNAKE GAME

27
FUTURE SCOPE OF THE
PROJECT

Enhanced Graphics and Visuals:


Integrate more advanced graphical elements, animations, and
effects to make games visually appealing.
Use libraries like Pygame (in Python) or Unity (for more
complex environments) to add polish to the game visuals.
Improved User Interface (UI):
Develop a more intuitive and appealing UI for easy navigation
between games and better overall user experience.
Include customizable settings, themes, or color schemes for a
personalized touch.
Multiplayer Mode:
Add local or online multiplayer functionality for competitive
or cooperative play, enhancing interactivity.
Enable players to invite friends or connect with others through
a network to enjoy the games together.

28
High Score System with Cloud Storage:
Implement a high-score leaderboard, possibly with cloud
storage, to allow players to save and compare scores
across devices.
Gamify the experience by letting players track
achievements and progress over time.
New Game Additions:
Continuously expand the arcade by adding new mini-
games to keep users engaged.
Include popular genres like puzzles, adventure, or arcade-
style games to diversify the game selection.
Advanced Sound Design:
Include ambient sounds, background music, and sound
effects for a more immersive experience.
Allow users to enable or disable sound or add background
music from their own playlists.

29
REFERENCE OF THE
PROJECT
### References for Building a Mini Arcade:

1. **Python Official Documentation**


- [Python Built-in Functions](https://docs.python.org/3/library/functions.html)
- [Random Module](https://docs.python.org/3/library/random.html)
- [Input and Output](https://docs.python.org/3/tutorial/inputoutput.html)

2. **Online Tutorials**
- **Real Python**: [Building Simple Games with Python](https://realpython.com/python-
projects/)
- **GeeksforGeeks**: [Python Projects for Beginners]
(https://www.geeksforgeeks.org/python-projects-beginners-intermediate-advanced/)

3. **YouTube Channels**
- *freeCodeCamp.org*: Offers step-by-step tutorials for Python projects.
- *CS Dojo*: Provides simple explanations and Python mini-projects.

4. **Books**
- **"Automate the Boring Stuff with Python"** by Al Sweigart: Covers Python basics and
simple projects.
- **"Python Crash Course"** by Eric Matthes: Includes game development using Python.

5. **Open Source Repositories**


- GitHub: [Python Game Projects](https://github.com/topics/python-game)
Explore repositories for inspiration and code snippets.

These resources can help you understand and expand your Mini Arcade project.

30

You might also like