Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
Pop-Up Card Duel
Realization of a card videogame in JAVA
Alessandro Borione
Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
The evolution of videogames
Starting from the second post-war, videogames developed, and started to be part of
people lifes.
Anyone can remember the mascottes of the big firms producing videogames since the
80s.
• Pac-Man (NAMCO)
• Super Mario (Nintendo)
• Sonic (SEGA)
Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
The project
The objective of this project is to realize an online multiplayer videogame.
The development of this project includes the usage of the following IT:
• MySQL DataBase
• JAVA
• PHP
Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
DataBase realization
The project uses a DataBase to store datas of:
• Cards
• Players
DataBase logical scheme
• Decks
• Duel resutls
Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
Trigger
The DataBase is provided with triggers, so that every time a new player il signing up,
they will receive 3 cards, which are added to their collection to create their first basic
deck.
Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
Ranking
The weekly ranking is generated by a query which counts the number of duels each
player won during the last week, to order the list in descending order right after.
SELECT player, COUNT(gamewon) AS totalgamewon
FROM (
SELECT player1 AS player, COUNT(player1) AS gamewon
FROM ’duels’
WHERE result LIKE ’WIN1’ AND
duels.date >= (CURDATE() − INTERVAL 7 DAY)
GROUP BY player1
UNION ALL
SELECT player2 AS player, COUNT(player2) AS gamewon
FROM ’duels’
WHERE result LIKE ’WIN2’ AND
duels.date >= (CURDATE() − INTERVAL 7 DAY)
GROUP BY player2
) AS tmp1
GROUP BY player
ORDER BY totalgamewon DESC;
Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
Implementation procedure
After realizing the DataBase and populating it correctly, the JAVA software has been
implemented, consisting in 3 different projects with Client, Server and common
library functions, hosted on the online platform GitHub.
Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
Client
The game Client has been realized in JAVA, and allows players to login with their
username and password.
From the new window, a new game can be started,
Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
Client
To create the window which allows to choose the deck to use in the next battle, an object
inheriting JDialog was used; the constructor method creates the windows and sets it visible,
while another method is responsible for waiting untill the user has selected the deck, to return it
to the main menu.
Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
Server
The Server has been realized with textual interface. It starts listening to
communications on the port 31415, where it expectes to receive requests from the
Client. The main requests are:
• REGISTER
• LOGIN
• LOGOUT
• START_BATTLE
Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
PHP
PHP has been uses only to create the description of the cards extracting datas from
the DataBase. A new page has been created, taking in input, with the super-global
array $_GET, the ID of the card to return the description.
For example, going ti the page 37.59.123.99/popup/cardDescription.php?card=6, you
can see the description of the card with ID = 6.
Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
Results
The final product isn’t complete yet, in fact it’s not possible to play in a duel. But the
systems which permit login, logout, sign up and the request to start a new battle have
been realized. Moreover, the proceedings to follow in the battles has been thought.
Istituto Tecnico Industriale Don Orione Fano
Esame di Stato 2014-2015
Candidate: Alessandro Borione – Thesis: Pop-Up Card Duel
Conclusion and future updates
The system submitted in this thesis has been largely tested, despite there are some
bugs to be fixed.
Future updates regard changes to the login algorithm, to guarantee a more secure
communication, the add of sounds and a shop to buy new cards.
Scarica

Istituto Tecnico Industriale Don Orione Fano