Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 25

PROJECT REPORT

PRESENTED BY:-
“ ATS GROUP ”
“Modern Snakes & 1. Abdul Basit Akhtar (19k-1376)
Ladders” 2. Taha Yousuf (19k-1352)
3. Shahzaib Khan (19k-0273)
Introduction:-
This project is based on the famous traditional board game
snake & ladders.
The proposed project will overcome the barrier between classic
board games and modern games by enhancing the GUI
environment to provide better & friendly game play through
giving multiplayer option to users to play with a secure account
that intrigues the visual and audio effects. Hence catering every
need for unique gaming experience.
Problem Statement:-
Traditional board games when even played on computer does not provide
a gamer-friendly environment output.

 Standard Snakes & Ladders game doesn’t have multiple game modes.
(i.e. rules are same)

Normally, this type of game can’t be saved, resulting in loss of current


game.

No privacy is available for the users.


Basic Features:-
 Multiplayer game to involve two players playing simultaneously.
 Interactive Main-menu giving various options.
 User-friendly Welcome screen.
 Dice can be used manually (keeping the essence of traditional board game).
 Load game to load previous unfinished game.
 Save game to continue the same game at another time.
 Tutorial for beginners to understand the flow and control of game.
 Authorized Access (password) for load game to provide privacy.
 Basic GUI implementation.
 Sound effects.
 Short-keys to provide fast reaction time for specific commands.
What’s New? (Improvements)
Three new & different Game Modes.
(i.e. Total: classic, modern, time knockdown, turn knockdown)
Separate Dice-Menu with four different settings.
(i.e. auto/manual, single/double dice)
Win-Menu will now show turns & positions of both players , along with total
time taken in each match.
To reduce the code size & improve efficiency for locating ‘Cursor-Pointer’ on
board, a complex equation is used.
Hidden Settings for Filing & some In-game functions.
(i.e. Delete Specific Slot, Erase All Data, Rename Files, ON/OFF Sounds)
Flexible Menu for load game, displaying saved game name along with it’s game
mode. Also, you can select Game names in Load Game Menu (without scrolling
up/down) by simply typing the index number in a dialogue box
(i.e. To enable the dialogue box, press Ctrl+w)
Save Game can now show the Available Slots.
Calculated Time will now be displayed in Standard Format
Fixed In-Game Issues:-
 Restricted dice settings to encourage fair game-play with
warning message & beep
 Restricted users from resuming/saving finished game
 Restricted users from resuming/saving at start-up of
application
 Same user names, game names & previous saved game
names will not be accepted
 Functions are cleared from stack after their complete
execution
 Invalid inputs will no longer be accepted
 Load Game Menu will not open if its file is not present
 Save Game Menu will not open if Available Slots are full
Control/Flow of Game:-
Interactivity Chart:- (HIPO)
Work-Load Distribution:- (Overview)
• Shahzaib Khan (19k-0273):
i. Mechanics/Working behind the Game & it’s related research
ii. Main-Game Func. & all it’s working Functions (i.e. Board,Dice,Cursor-Pointer,etc.)
iii. Password Func., Main Constructor Func., Dice Settings Func.
iv. Hidden Settings Func. & all it’s working Functions (i.e. Delete Specific Slot,Rename Files)

• Taha Yousuf (19k-1352):


i. Load Game Func. (Filing)
ii. Save Game Func. (Filing)
iii. Calculate Slot Capacity Func.

• Abdul Basit Akhtar (19k-1376):


i. Welcome Screen Func. (Loops)
ii. Sound Effects & Shortcut keys (Including their related research)
iii. Guide Func. (Filing)
iv. Display Standard Time Func.
Work-Load Distribution:- (Functions’ Working)
• Shahzaib Khan (19k-0273):
Main Constructor:
Its main purpose is to make sure that the included functionalities aren't re-used
whenever main function is called. Also, it initializes the file names which are used to
save In-game variables & strings. Hence, keeping your file names updated even if
you have to rename the files in application.
Gotoxy:
It take coordinates (x,y) as parameters and point the cursor pointer on designated co-
ordinates on screen.
Cursor Pointer:
It points the user-made rotating cursor on designated position on screen w.r.t
coordinates (x,y) which are taken as parameters.
Display Boxes:
It prints boxes using loops for main-menu.
Random Dice:
It generates random value on dice as per single/double dice settings.
Locate Pointer on Board:
It points the cursor pointer on designated position on game board, mainly using gotoxy
function. To achieve size reduction in code, a complex mathematical equation is used to
track the position of pointer.
Estimated Function Time:
It calculates the time taken by a function that is passed as parameter using function pointer
and saves calculated time by assigning value on the address of the variable, which is taken
as a parameter.
Dice Settings:
It basically allows user to modify dice settings (i.e. auto/manual, single/double dice
options are available).
Main Game:
It is the Main function in which all In-game procedures are carried out. Like, when the
game starts, the flow of program is transferred to this function. It basically controls all In-
game elements (i.e. snakes, ladders, player turns & positions, cursor pointer on game
board, game modes, dice settings, limits, win menu, etc). Also, it is responsible for In-
game time taken calculations.
Locate Menu Pointer:
It basically holds the working of Cursor pointer in New Game & Hidden File Settings
Menu.
Manual Dice:
It generates user’s desired value on dice as per single/double dice settings.
Display Board on Main Menu:
It displays the game board for snakes & ladders, using iterative conditions.
New Game:
It prompts users for user names, game modes (in the form of Menu) &
specific game mode limit. Also it re-initializes/resets all In-game variables.
Rename Data Files:
It renames In-game variables & In-game strings files.
Delete Specific Slot:
Its main function is to delete the specific row (i.e. slot) in both files (using
temporary file method).
Hidden Settings:
It shows hidden settings in main-menu when ‘tab’ is pressed. Moreover, it
contains a unique menu for the settings (i.e. erase data files, rename files,
delete specific slot, sounds (ON/OFF)).
Password:
It takes password character by character from user while hiding from others
and then saves in array. After that, it copies to another array that is received as
parameter through a pointer.
• Taha Yousuf (19k-1352):
Save Game:
It saves the current game (only) while asking for password (twice for
verification) and authentication game name from user. It also makes sure
that the game name is not as same as the previous saved games.
Load Game:
It loads the previous game saved by the users even when the application is
refreshed, using filing-process. Moreover, it has a menu for the previous
load games. Also, it makes sure that password and game-name do match,
otherwise an error will be generated.
Calculate Slot Capacity:
It basically calculates the number of rows (i.e. slots) present in In-game
variables & In-game strings files.
• Abdul Basit Akhtar (19k-1376):
Welcome Screen:
It shows a welcome screen, using loops & strings.
Display Standard Time:
It takes time in seconds as parameter and then converts it to standard time
format (i.e. 1 hour 20 mins 4 secs). Also, it makes sure to display in correct
format sequence, means if any variable (i.e. hour/mins/sec) is 0, then it
display the time without that variable.
Guide:
It reads the Guide Tex from a saved file in colorful display.
Learned/Covered Topics:-
• Conditions (i.e. if, else if, else)
• Switch-Cases (i.e. with default)
• Loops (i.e. for, while)
• Structures (i.e. type def)
• Pre-Processing Commands (i.e. Macros, #define, #include)
• Functions (i.e. all 4 types)
• Arrays (i.e. 1D,2D)
• Strings & it’s Pre-defined Functions(i.e. strcmp(), strcat() )
• Pointers (i.e. in Filing, call by reference)
• Filing (i.e. reading, writing, re-writing the data)
• Passing Arrays, Structures to Function
• Function Pointers (i.e. Passing function as arguments)
Limitations & Future Work:-
Limitations:-
 After renaming the files, we cannot access the renamed files when the
application is executed again.

 In modern/turn-knockdown mode, a player cannot use his bonus turn after


reloading the previous game, if he saves the game without using his bonus
turn.

 User name containing spaces are not accepted. However, using alternate
method can cause disruption in files.
Improvements:-
 A function should be formed which can store file names of renamed file in
the temporary file. So, that we can update our file names when executing
the application again.

 A global variable should be created which can hold the state of bonus turn.
So that this variable can be used to retrieve the state of turn from the file.

 Any alternate program or function should be used to store user name with
spaces in the files.
Software Inputs/Outputs:-
Welcome Screen
Main Menu
Game Board & Player Stats
Load Game Menu
Win Menu
Reference/Screen-Shot for Existing System:-
• Below is the link for existing system of our project:
https://www.codewithc.com/snakes-and-ladders-game-project-c/

• Note: Unfortunately, the above site only gives us the verbal


sketch of the project. The attached code is not running due to
plenty of errors. So no Screenshots of “.exe file” can be taken.
Tools & Technologies to be Used:-
• DevC++ compiler
• C programming language
• Operating System Microsoft Windows 10.
• Direct compiler requests & linker code used
• Advanced C library functions like:
SetConsoleCursorPosition(), time(), srand(), flush(), kbhit(), exit(),
GetStandardHandle(), SetConsoleTextAttribute(), system(),
Sleep(), strcmp(), isprint(), rename(), remove(), rewind(), etc.
THANK YOU!

You might also like