Closed

Java project for HTTP-based mini game

1 Things to take into count

● The code structure

● Consideration of concurrency issues

● The design

● Choice of data structures

● Quality and use of unit tests

2 Description

Write a HTTP-based mini game back-end in Java which registers game scores for different users and

levels, with the capability to return high score lists per level. There shall also be a simple login system

in place (without any authentication...).

Deliver a zip file containing:

● The code in the src-folder

● A compiled version in a executable .jar file in the root folder

● An optional [login to view URL] or .pdf with thoughts and considerations around the program

3 Nonfunctional requirements

● This server will be handling a lot of simultaneous requests, so make good use of the availablememory and CPU, while not compromising readability or integrity of the data.

● Do not use any external frameworks, except for testing. For HTTP, use

com.sun.net.httpserver.HttpServer.

● There is no need for persistence to disk, the application shall be able to run for any foreseeable

future without crashing anyway.

4 Functional requirements

The functions are described in detail below and the notation <value> means a call parameter value or

a return value. All calls shall result in the HTTP status code 200, unless when something goes wrong,

where anything but 200 must be returned. Numbers parameters and return values are sent in

decimal ASCII representation as expected (ie no binary format).

Users and levels are created “ad-hoc”, the first time they are referenced.

4.1 Login

This function returns a session key in the form of a string (without spaces or “strange” characters)

which shall be valid for use with the other functions for 10 minutes. The session keys should be

“reasonably unique”.

Request: GET /<userid>/login

Response: <sessionkey>

<userid> : 31 bit unsigned integer number

<sessionkey> : A string representing session (valid for 10 minutes).

Example: http://localhost:8081/4711/login --> UICSNDK

4.2 Post a user's score to a level

This method can be called several times per user and level and does not return anything. Only

requests with valid session keys shall be processed.

Request: POST /<levelid>/score?sessionkey=<sessionkey>

Request body: <score>

Response: (nothing)

<levelid> : 31 bit unsigned integer number

<sessionkey> : A session key string retrieved from the login function.

<score> : 31 bit unsigned integer numberExample: POST http://localhost:8081/2/score?sessionkey=UICSNDK (with the

post body: 1500)

4.3 Get a high score list for a level

Retrieves the high scores for a specific level. The result is a comma separated list in descending score

order. Because of memory reasons no more than 15 scores are to be returned for each level. Only

the highest score counts. ie: an user id can only appear at most once in the list. If a user hasn't

submitted a score for the level, no score is present for that user. A request for a high score list of a

level without any scores submitted shall be an empty string.

Request: GET /<levelid>/highscorelist

Response: CSV of <userid>=<score>

<levelid> : 31 bit unsigned integer number

<score> : 31 bit unsigned integer number

<userid> : 31 bit unsigned integer number

Example: http://localhost:8081/2/highscorelist - > 4711=1500,131=1220

Skills: Java, JavaFX, Software Architecture

See more: java games source code netbeans, simple games in java with source code, how to make a game in java for beginners, simple java game code example, java video game, simple java game projects, java mini game projects with source code, java snake game code, card game java project, java mini game web, mini game world java 2008, java based mmorpg game engine, mini game world characters java, gsm based mini project, java command line based game, computer graphics mini game project java, space project browser based game, java project code car racing game, convert java project web based project

About the Employer:
( 7 reviews ) Hyderabad, India

Project ID: #19278917

10 freelancers are bidding on average ₹7855 for this job

utkarshkatiyar19

Hi I'm an expert in java programming. I'm sure that I can easily do this project. We can have a about it. Thanks..

₹14444 INR in 5 days
(307 Reviews)
7.2
quanlitysource

Hi I am senior java developer and i am very interested in your project. I have more than 5 years of working in java enterprise company. I have good understanding about java spring hibernate for backend and also More

₹7777 INR in 3 days
(89 Reviews)
5.7
shiningdevelopor

I have been working as a full stack web developer for over 5 years. I am highly skilled in Web and App so I feel confident that I can do your job without fail. I can start working right now and I will guarantee the q More

₹7777 INR in 3 days
(11 Reviews)
4.9
anish424

HI, I have 8 yrs of exp in java and related technologies. I have worked a lot with HTTP rest webservices. Assuming you need 4.1, 4.2 and 4.3 implemented only development wise. I am sure I can do your job. All my More

₹3555 INR in 3 days
(40 Reviews)
4.8
ownmyserver

Hello Friend, I have read your project requirements. We are familiar with all required technologies and we have expertise resource to start with your project. We have 4+ year experience in design and development More

₹10000 INR in 2 days
(14 Reviews)
4.1
alvinpiter

Hello, I am an expert in Java development and I have strong background in algorithm and data structures as demonstrated here: [login to view URL] I've built several simple games before, like Snake, Tetris, Bo More

₹3500 INR in 5 days
(17 Reviews)
3.3
raulmartinezm

[login to view URL] Java expert, with a good knowledge of its ecosystems Familiarity with concepts of MVC, JDBC, and RESTful/SOAP webservices Experience with popular web application frameworks, such as Spring (alm More

₹11111 INR in 3 days
(3 Reviews)
2.4
Arindamda

Hi !! Nice to E-meet you We are a talented Android , iOS , game, and web service developers with 5 years of experience. we work with a network of other specialists who we use to solve specific issues – so you, the clie More

₹1500 INR in 3 days
(0 Reviews)
0.0
₹7777 INR in 3 days
(0 Reviews)
0.0
viralsoni61093

hello i am software engineer with 4 years of experience. i do have good knowledge on java, api. rest, soap. I can implement your requirement with quality and deliver it accordingly. thanks

₹11111 INR in 3 days
(0 Reviews)
0.0