How hasanpayandeh/multiplayereggclicker works
Project Identification
• Project Type & Purpose: This is a competitive, multiplayer mobile game built with React Native (client-side) that communicates with a server developed using PHP and MySQL. The game’s purpose is to let players click on an egg as quickly as possible to score points in real-time rounds until one reaches a winning score.
• Key Technologies: React Native, PHP, MySQL; the project also uses Expo CLI for the mobile build process.
Break Down the File Structure
• Server-side: The Back-end folder contains PHP files (API.php and functions.php) which expose API endpoints and business logic. The mysql_structure.sql file indicates the database schema used by the backend.
• Assets: Contains images (like the ProjectLogo and screenshots) which are useful for visual branding and the user interface.
a. Client-Side:
• Subdivide or annotate that it includes a Login Page and a Match Page.
• Mention that it sends HTTP requests via fetch() calls (as seen in App.js, with endpoints for actions like login, retrieving match page data, and resetting the match).
b. Server-Side:
• API endpoints that the client interacts with (e.g., login, match data retrieval, reset match).
• That server-side logic interacts with the database.
c. Database:
d. Additional Infrastructure:
Relationships and Interactions
• Optionally, note state or session management aspects like user login sessions and match synchronization.
Highlighting Architectural Patterns & Technologies
• That the architecture follows a client-server design pattern.
• That the client-side is built in React Native (with Expo CLI used for builds) and the server-side is in PHP with MySQL as the data store.
• Mention design considerations – for instance, the need for synchronization (to counter slight time differences when eggs appear across devices) is handled on the server side.