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

Added more checks to 'create_game/' view #198

Merged
merged 5 commits into from
Feb 10, 2024

Conversation

V-Fries
Copy link
Collaborator

@V-Fries V-Fries commented Feb 9, 2024

No description provided.

@V-Fries V-Fries self-assigned this Feb 9, 2024
@V-Fries V-Fries force-pushed the add-more-checks-to-game-creator branch from a43cb71 to 4048d2f Compare February 9, 2024 22:59
@V-Fries V-Fries merged commit 8e39410 into dev Feb 10, 2024
7 checks passed
@V-Fries V-Fries deleted the add-more-checks-to-game-creator branch February 10, 2024 00:10
@V-Fries V-Fries linked an issue Feb 10, 2024 that may be closed by this pull request
tdameros added a commit that referenced this pull request Feb 10, 2024
* base files

* Installed threejs

* ThreeJS is now reactive

* Bouncing balls

* Basic key hook handler

* Made an Engine class

* Lights are working

* Removed light helpter

* Removed node_modules/ from git

* Removed package-lock.json from git

* Added a socket.io python server with bare-bone matchmaking. The server can send scenes for clients to parse

* Made the ball move slightly faster when the game starts

* Can now sync player movements across clients (Terrible latency atm)

* Rewrote clients key handler to allow the pressing of up and down key at the same time. Also did a little refactoring.

* Forgot to add Engine.js in last commit

* Started pong_redirection_server

* Client can now communicate with redirection server

* Fixed some bugs with the redirection server, also started the game server

* Refactoring

* Redirection server now recieves the uri of the game servers on creation

* Refactored redirection server

* Removed useless code

* Improved error handling for game server creation

* Added linter for CI

* Fixed linter errors

* Removed old server files

* Added documentation

* Game server connection event, scene creator, and better logging

Added a way for the game server to send errors during connection.
Added a log function to the servers.
Refactored the way users that need be kicked are handled.

Fixed isort

The game server now gets the players as argument

Removed useless argument to flake8 in pong-server CI linter test

Added a wait time before users are kicked to make sure the clients have enough time to disconnect on their own

Made it so when a user connects twice (to the game server) the first connected client will be disconnected and replaced by the second

The game scene is now sent to the client once all the players have joined

Updated documentation

The game server logs are now displayed by the redirection server when debug is enabled

Replaced double quotes with simple quotes

Now uses logging module

Added some tests for the redirection server

* Scene is now synchronized across clients

* Removed user kicker and now use socketio.exceptions.ConnectionRefusedError

* Players can now move

* Now uses proper private members in the game client

* Updated the way scene are managed (#84)

* Updated scene system on server side

* Updated scene system on client side

* Pong game physics (#135)

* Added bounding boxes for the movement limits of the balls and paddles

* Added 2d segment class with a method to check for segment intersection

* Locked the paddles movement to stay within their bounding box

* Added a way for the server to update a ball position and movement on the clients

* Ball physics

* Adapting the rest of the code to the previous commits features

* CORS = '*'

* Added the tests to dev branch

* Normed pong game js code (#157)

* Normed pong game js code

* Pong servers can now run in docker

Fixed pep8

* Fixed game server crashing if the first port is not available

* Game server now takes game_id: int as first argument. The rest of the argument are still the players ids but are now expected to be ints

* Renamed redirection_server to redirection_server_deprecated as it will be replaced by the game-creator

* Created game-creator django configuration

* Create Game View

* Removed db from game-creator

* Refactoring

* Change pong-server file architecture to properly separate the different programs

* Typing, and very light refactoring

* Fixed game server not cleaning up correctly

* Game points are now stored and the ball now stays immobile for a few seconds before moving

* Game server architectural changes (#196)

* Player update

* PlayerLocation update

* Match update and addition of MatchLocation

* Replaced Scene class with a GameManager

* Added classes to handle events

* Added a ClientManager and removed the now useless Game class

* Added an AntiCheat class

* Updated Ball class

* Added Server class

* main now uses the new classes

* Updated utils and settings

* Updated documentation

* Updated client to work with the new server

* Fixed the test test_valid_tournament_request not sending a valid list of users

* Added more checks to 'create_game/' view (#198)

* Added more checks to 'create_game/' view

* Fixed pep8

* Added the .env that is required to start the pong-server docker

* Game creator now checks that len(players) is 2 when request issuer is 'matchmaking'

* start matchmaking implementation

* Pong win match (#208)

* Made MatchLocation hashable

* Started GameManager._handle_match_winner()

* fix matchmaking

* save

* matchmaking connected with pong server

* remove unused code

* remove pong-game client

* fix pep8 and isort

* add common folder in matchmaking workflow

* fix isort

* fix matchmaking tests

* Fixed linter errors in front

* update github workflow

* Fixed isort in game_creator

* Fixed error 503 not being sent properly and updated the tests to now expect a port instead of an uri

---------

Co-authored-by: V-Fries <[email protected]>
Co-authored-by: Vincent Fries <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more checks to game creator view
3 participants