New Branch [develop]: TypeScript, React, Phaser and Vite #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes significant changes to the
Dockerfile
,README.md
, and several client-side files to improve the structure, deployment, and functionality of the project. The most important changes include restructuring the Dockerfile for multi-stage builds, updating the README with new instructions, and adding new client-side features and configurations.Dockerfile and Deployment:
Dockerfile
: Restructured for multi-stage builds to separate client and server build processes, improving the efficiency and size of the final image. Added Docker support for containerized deployment.Documentation:
README.md
: Updated the prerequisites to require Node.js v20 or higher and added Docker as an optional prerequisite. Provided detailed instructions for both local development and Docker deployment, including building and running the Docker container. [1] [2]Client-side Enhancements:
client/index.html
: Added a new HTML template for the client, including references to the Vite build tool and the main TypeScript entry point.client/package.json
: Introduced a new package configuration for the client, including dependencies for TypeScript, React, Phaser, and Vite, as well as scripts for development, building, and linting.client/src/App.tsx
: Added a new React component to handle the main application logic, including socket connection management and game initialization with Phaser.client/src/components/LoginOverlay.tsx
: Created a new React component for user login, allowing players to enter their username before joining the game.client/src/game/GameScene.ts
: Implemented the main game scene for Phaser, including socket event handling, game state updates, and rendering logic for players and food items.client/src/game/UI.ts
: Refactored the UI class to TypeScript, adding methods for setting up and updating the scoreboard, status texts, and minimap.These changes collectively enhance the project's development workflow, deployment options, and client-side functionality, providing a more robust and scalable solution.
Screenshots