Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback Manual #2

Open
wants to merge 52 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
afcea98
Setting up GitHub Classroom Feedback
github-classroom[bot] Apr 12, 2022
278d009
Initial readme form
Apr 15, 2022
dae6e1f
Some refactorings but fix .gitignore as it adds unnecessary files
Apr 25, 2022
113935b
Delete .idea directory
kfernandez31 Apr 25, 2022
3c48ae0
Added Message struct
Apr 25, 2022
fb89a95
server http communication works, pre repo files cleanup
JWZ1996 Apr 25, 2022
843060e
New repo files structures, updated client reponse check, added start …
Apr 26, 2022
37ebac3
Added common obj to http and ws server, secured with mtx, with counte…
Apr 28, 2022
bad9720
ws and http running, pre ws client registration
Apr 28, 2022
8997311
added ws file
Apr 28, 2022
de6a607
websocket server connections registration works!
Apr 28, 2022
648dc1e
Websocket response works, added git ignore
Apr 28, 2022
461febf
added nickname + minor improvement
Apr 28, 2022
7b8c68d
Added common dependency to client and server, removed duplicate files
May 9, 2022
0706a2e
Removed unnecessary imports, satisfied Clippy
May 11, 2022
60e4eb2
Added WebSocket client-displayer, which requires a change to the link…
May 11, 2022
10f049e
fixed addressing, fixed .gitignore(no more executables transmitted) r…
May 12, 2022
9f6f608
Minor refactor, moved not found handler to handlers file
May 12, 2022
42a7922
Made client require one terminal for both sending and displaying.
May 28, 2022
24b7dd1
initial work moved from pracuwa
Jun 8, 2022
e3afc2a
Readme 2 stage update
JWZ1996 Jun 8, 2022
a6e1d72
Delete common/target directory
JWZ1996 Jun 8, 2022
7b64297
more changes
JWZ1996 Jun 8, 2022
c6afd15
heartbeat almost done, now i will work on username indexing
Jun 9, 2022
c8e4831
Connections indexed with user name. TODO: Add sending the json to cli…
Jun 10, 2022
77bd639
initial working heartbeat, code needs to be cleaned up...
JWZ1996 Jun 13, 2022
683d4dd
A bit cleaner
JWZ1996 Jun 14, 2022
9ea4b83
removed all warnings, added todos
JWZ1996 Jun 14, 2022
29f74f0
Minor tweaks
JWZ1996 Jun 14, 2022
dedb186
Formatting, added todo, initial changes for less cloning of Strings
Jun 17, 2022
2dab8b5
Some changes
Jun 17, 2022
aa5ff39
(Client): on app start sends his username, room_name, gets their uuid…
Jun 17, 2022
9b40311
Satisfied clippy
Jun 17, 2022
a034259
Pre-debug logging in
Jun 19, 2022
c335c6c
Lots of clean-up
Jun 19, 2022
63e3f06
Working rooms before heartbeat debug
Jun 20, 2022
86388b9
Added TODOs, new request datatypes
Jun 20, 2022
062b471
minor changes
Jun 20, 2022
bc0f980
heartbeat left the chat FIX
JWZ1996 Jun 20, 2022
963f973
last room user lefts crash FIX
JWZ1996 Jun 21, 2022
d7dee58
Formatting
Jun 22, 2022
478f909
new heartbeat
JWZ1996 Jun 22, 2022
faddaf2
new heartbeat merged
JWZ1996 Jun 22, 2022
2a87df1
Used the prepared data tuples for the client's requests
Jun 23, 2022
225a539
Some initial work on creating the app's directory tree
Jun 23, 2022
720a943
Added commands for leaving current room and exiting the app
Jun 24, 2022
6695410
Removed extra dot before extension
Jun 24, 2022
1532327
added a TODO
Jun 24, 2022
54619c5
added ws closure
Jun 24, 2022
b7a47a4
Formatting, added a todo
Jun 27, 2022
47b99a2
Made the project work under one cargo.toml, added a readme and descri…
Oct 5, 2022
c8b645c
Merge pull request #4 from kfernandez31/Message_logs
Oct 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/target/
/.idea/
/server/target/*
/client/target/*
70 changes: 50 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,57 @@
# Frobnicator
# Chatter

## Autorzy
- Andrzej Głuszak (gr 9, @agluszak na githubie)
- Linus Torvalds (Uniwersytet Helsiński, @torvalds na githubie)
## Autorzy:
Kacper Kramarz-Fernandez,
mgr inż. (XD) Jan Zembowicz

## Opis
Od zawsze chcieliśmy napisać grę komputerową.
Frobnicator będzie to gra platformowa, w której chodzi o to, żeby...
## Opis:

Z grubsza będziemy wzorować się na [tym tutorialu](https://dev.to/sbelzile/rust-platformer-part-1-bevy-and-ecs-2pci).
Projekt stanowi system prostego czatu o pojedynczym pokoju i dowolnej liczby klientów.
Dzieli się on na:
- Klient - umożliwia nadawanie wiadomości oraz odbieranie ich i wyświetlanie
- Serwer - stanowi pokój, odbiera wiadomość wysłaną przez klienta i rozsyła ją do wszystkich pozostałych

## Funkcjonalność
- Generowanie map
- Strzelanie
- AI dla wrogów (bardziej rozbudowane niż w tutorialu)
- Możliwość zapisywania i wczytywania stanu gry
- Punktacja
## Funkcje: (<i>"ponieważ funkcjonalność to stan, w którym coś funkcjonuje"</i> - Jan "prof. Miodek" Zembowicz)

- Klient: dwuprocesowy program:
1. Wysyłanie wiadomości za pomocą requesta typu GET, wiadomość wysyłana w parametrze URL wraz z nią timestamp
2. Odbieranie wiadomości asynchronicznie za pomocą klienta WebSocket i wyświetlenie ich w terminalu
- Serwer: prawdopodobnie dwuwątkowy
1. Odbiera requesty HTTP od pojedynczego klienta
2. Wysyła odebraną wiadomość po WebSocket do wszystkich obecnie połączonych klientów

## Propozycja podziału na części
W pierwszej części stworzymy grę opartą na tutorialu (z lepszym AI) i jedną zahardcodowaną planszą.
## Podział pracy
Uwaga: zaproponowany podział jest płynny!

Początkowo
- Jan: podstawowa komunikacja sieciowa
- Kacper: przeniesienie zaimplementowanych mechanizmów przez Jan na kod o wyższej jakości, zgodny z dobrymi praktykami tworzenia oprogramowania w języku Rust

Etap 2:
- Jan: system heartbeat + indeksowanie klientów WS po username
- Kacper: Wiele pokoi + msg storage

W drugiej części dodamy do tego losowy generator map, zapisywanie/wczytywanie stanu gry oraz system punktacji.

## Biblioteki
- Bevy
- może coś do serializacji danych? (czy mógłby Pan coś polecić?)
## Podział projektu na części
Sprint 1
- wysyłanie i odbieranie podstawowych komunikatów z timestampem,
Sprint 2
- wiele pokoi, historia wiadomosci, heartbeat, polaczenie "displayera" za pomocaą username

## Biblioteki i zależności:

- Wysyłanie requestów HTTP: reqwest
- Serwer HTTP: ??? (prawdopodonie punktem wyjścia będzie jeden z przykładów biblioteki `hyper`)
- Serwer i klient WebSocket: ???


## Struktura repo
- server - folder z projektem servera
- client - folder z projektem clienta
- common - wspolny kod dla obu projektow

## Uruchomienie

$ cargo run

W katalogu odpowiednio dla serwera oraz klienta
22 changes: 22 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Notatki, ale jeszcze je troche przemyślałem, zagadnienia w kolejności dodawania:


1. Mapa userow indeksowana userName (janek)
- [ ] Wkladamy userow do mapy userow dopiero po otrzymaniu z WS ich nicka (nick zawarty w JSON)
2. Heartbeat (janek)
- [ ] struktura reprezentująca usera (WSClient) otrzymuje pole bool: isAlive
- [ ] dodajemy endpoint /heartbeat, w parametrze username, po zawolaniu ustawia zadanemu userowi isAlive na true
- [ ] dodatkowy wątek sprawdzający isAlive == true, jeśli nie to zamykamy połączenie WS, wysyłamy "user has left the char czy cos"
- [ ] jeśli zawołanie /heartbit sie nie powiedzie (timeout) - client informuje o zawieszeniu połączenia
3. Pokoje (kacper)
- [ ] robimy mapę key: nazwa pokoju, value: struct reprezentujący pokój
- [ ] zawartość structa reprezentującego pokój: tablica z nickami
- [ ] do endpointa /send (lub /post, nie pamietam, ten od wysyłania) dodajemy nazwe docelowego pokoju w postaci nowego pola common::Msg
- [ ] wywołanie handlera send sprawdza do którego pokoju ma wysłać wiadomosci i wysyla do wszystkich userów
- [ ] Rejestracja pokoju odbywa sie poprzez endpoint /createroom (w parametrze nazwa nowego pokoju), metoda http wołana gdy w prompt wybieramy nowy pokoj LUB (ale to zostawiam twojej dyspozycji realizacje tej rejestracji, jest wiele sposobow)
- podczas podłączania WS do jsona z pkt 1. (ten z nickiem) dodajemy również pożądany pokój
4. Msgs archiwum
- [ ] do kazdego pokoju dodajemy tablice z archiwalnymi msgami
- [ ] w momencie podłączenia, wysyłamy po ws wszystkie dotychczasowe wiadomości

ELO
Loading