This is a Snake Game Server implemented in Java using Maven. The server handles multiple clients and manages the game state for each connected player.
- Multiplayer support
- Real-time game state updates
- Simple and intuitive game mechanics
- Java 22 or higher
- Maven 3.6.0 or higher
-
Clone the repository:
git clone https://github.com/thativam/online-snake.git cd online-snake
-
Build the project using Maven:
mvn clean install
mvn jib:dockerBuild
You can configure the server settings in the application.properties
file located in the src/main/resources
directory for each module.
Positive Points:
-
Scalability
-
RTS Performance
-
Centralized
Negative Points:
- Fault tolerance
- Complexity
Each module will have its pom, for commom dependencys and global build.
- master-server/
- pom.xml
- server/
- pom.xml
- client/
- pom.xml
- pom.xml
- Master-Server:
- Server must listen to client request and then initialize a server for it
- Control server lifecycle
- Differ between client and server requests
- For now, logs stats into a in memory db
- Use some log library
- Server:
- Initialize the module with a pom.xml (use master server as a model) ✅
- Must be only initialize/exclude by the master server
- For now, logs stats into a in memory db
- Use some log library
- Just send/receive client menssages
- Client
- Initialize the module with a pom.xml(use master server as a model) ✅
- Must send a request to master server to initialize a server
- Must connect to the generate server and be able to communicate
- For now, logs stats into a in memory db
- Use some log library
Contributions are welcome! Please fork the repository and submit a pull request. Please for each todo open a branch from Main and then open a PR when its done.
This project is licensed under the MIT License. See the LICENSE file for details.