Connected aquarium - server and clients

Project 30

Caracteristics

Description

This school project happened in the frame of network courses for the second year of studies at l'ENSEIRB-MATMECA. Four comrades worked with me, Nicolas Przybylski , who worked with me on two previous school projects, Maël Paul, Louis-Victor Ladagnous et Mathieu Lam. The simulation of an aquarium in a server and a terminal and fishes display for the clients were the goals of the project. With clients and server, the project was composed of a c part for the server and a java part for the clients. I didn't work much for the server side, I only search for bugs and I added documentation.

For the java part, I proposed to use my (beloved) library which uses OpenGl and the graphic stuff. I knew that the project will not use complex UI element, I knew that this project will bring experimentations and many good new features for my library. In a first place, I developed the main graphic element that the user would use every time, the terminal. No bugs were allowed for this part. To make it work, I fixed problems related to the "Text" object, I also added new features to it. I implemented all the special actions that the user would do like copy paste, cursor shifter by letter or by word, selection of already written commands, etc...

The most difficult part of this GUI development was the interface between the keyboard and the application. You might expect that I will get all the text the user is written, but sadly, I only get the physicals keys. I had to link the physical keys to the corresponding character depending on the language or the modifier keys. An example of modifier keys is the shift that passes character to upper case or lower case.

In a second place, I worked on the main scene. I created several clear sequences of codes that correspond to the state of connexion between the client and the server. I had to do it to avoid the well named "spaghetti code" and to know exactly when a bunch of code was used. I added interfacing elements to help the user to know about its client number and the state of connexion. I added also to the terminal the display of previous processed commands. The last missing part of the client interface was the background. I used a good looking image of the sea, and I used a shader to make the effect of moving water, disturbing the image. A nice application is better for users (and for examiners).

From then on, the work was common. With my team, when we set up the network procedure, we saw that the application was freezing and the user couldn't do anything. To fix this, we used a threaded network client. Its role was to send and received messages. We added another mission to the network client, identifying messages that are responses. It was mandatory to know if a message was a response from the server to the commands entered by the user.

In order to test our application, we launched several clients, 4 in our case. Then, we typed the commands to populate the aquarium in one of our clients. The result was so cool, with fishes moving fluidly from screen to screen. It was the result of two months of work.

Visuals - (Click on one pick to enlarge it)

Disconnected client Automatic connexion for client 1. Fiew connected fishes are displayed. For clients are created and form an aquarium. Fishes move from screen to screen.

Hey test test