Welcome to MazeTon, an immersive 3D AI-generated maze game designed as a Telegram Mini App! Navigate through challenging mazes, collect hidden treasures and challenge your friends - all in the familiar Telegram interface.
Embark on a journey through a world of vibrant mazes that evolve as you progress. Each maze is a unique blend of colors and challenges, offering a fresh experience every time you play.
- Explore Dynamic Environments: Wander through mazes that change in size and complexity, adorned with randomized color schemes for walls, floors, and portals.
- Collect Treasures: Discover hidden items scattered throughout the maze to boost your score and unlock special rewards.
- Challenge Yourself: With each maze completion, face larger and more complex mazes that test your strategic thinking and navigation skills.
- Start the Game: Open the MazeTon Telegram Mini App.
- Navigate the Maze:
- On mobile devices, swipe in the direction you wish to move.
- On desktop, use the arrow keys or WASD keys.
- Alternatively, use your mouse's scroll wheel to move.
- Find the Exit: Reach the glowing portal to complete the maze.
- Collect Items: Pick up items along the way for extra points.
- Advance: Each completed maze increases in size and difficulty.
Screenshot 1 | Screenshot 2 | Screenshot 3 |
---|---|---|
Every maze in MazeTon is dynamically generated by AI based on each userโs gameplay progress and skill level. No two mazes are alike, ensuring a unique experience every time you play.
As you advance through the game, the AI increases the maze's size and complexity, introducing new challenges and exciting gameplay dynamics.
MazeTon is designed specifically for Telegram, allowing you to play seamlessly without leaving the app. Invite friends, share achievements, and compete directly from your Telegram chat.
- Leaderboards: See how you rank against friends and the broader MazeTon community.
- Friend Challenges: Challenge your friends to complete mazes faster or achieve higher scores.
- Achievements: Collect badges and share them with your network as you reach new milestones in the game.
- Score System: Earn points for completing mazes, which add up to increase your rank.
- Item Collection: Discover items hidden in mazes that can enhance gameplay or unlock special features.
- Referral Rewards: Earn in-game bonuses by inviting friends to join MazeTon.
To protect against bots, MazeTon implements various delays in the game. For example, when picking up an item, a 5-second animation will play. Additionally, each move takes 0.2 seconds.
Knowing the minimum number of moves required to complete a maze, we calculate the fastest legitimate completion time. If a player completes the maze faster than this, they are flagged and penalized as follows:
- 1st Violation: 1-hour block.
- 2nd Violation: 2-hour block.
- 3rd Violation: 4-hour block.
- Penalty durations double with each subsequent violation, up to a maximum of 24 hours.
Additionally, impassable mazes will be introduced, requiring special superpowers (e.g., Wall Jump, Teleport) to complete. These will also factor into the minimum completion time to prevent abuse.
A store will be added, allowing players to buy and sell items and superpowers. Example superpowers include:
- Wall Jump: Skip over a wall.
- Teleport: Move a few spaces forward instantly.
- Speed Boost: Reduce movement time for a limited duration.
- etc.
Players will be able to withdraw earned score points to their TON wallets. This will be facilitated through a distribution mechanism on the TON blockchain.
The MazeTon project will issue its own tokens, with allocation as follows:
- Game Fund: 50%
- Marketing: 30%
- Community: 10%
- Team: 5%
- Presale: 5%
The total number of tokens issued will be determined by the number of players. Since the maximum points a player can generate in 24 uninterrupted games is known, the token limit will be calculated based on player counts to ensure a sustainable economy.
pie title Total Tokens
"Game Fund" : 50
"Marketing" : 30
"Community" : 10
"Team" : 5
"Presale" : 5
- React with TypeScript: For robust and maintainable UI development.
- Three.js and @react-three/fiber: Rendering the 3D maze environment.
- @react-three/drei: Enhancing Three.js with useful helpers and abstractions.
- Tailwind CSS: For responsive and modern styling.
- Vite: Lightning-fast development server and build tool.
- AWS Lambda: Serverless functions for handling game logic and user data.
- AWS DynamoDB: NoSQL database for storing user profiles and maze configurations.
- AWS SDK v3: Interacting with AWS services in a scalable manner.
- AI-Driven Maze Generation: Custom algorithm dynamically adjusts each maze's difficulty and layout for a tailored player experience.
- Telegram WebApp API: Embedding the game within Telegram for easy access.
- Telegram Cloud Storage: Saving user progress and settings across devices.
- Procedural Generation: Each maze is generated using a depth-first search algorithm with backtracking, ensuring a unique and solvable maze every time.
- Adaptive Difficulty: The maze size increases incrementally, adding one unit to either the width or height after each completion, up to a maximum size.
- Randomized Elements: Walls, floors, player avatars, and portals are assigned random colors for a vibrant experience.
- Starting Point: All players begin at the bottom-left corner of the maze.
- Objective: Reach the portal located at the farthest point from the starting position.
- Scoring System:
- Maze Completion: Earn points equal to the area of the maze (width ร height).
- Item Collection: Additional points are awarded for each item collected.
- Item Placement:
- Items appear in mazes larger than 10ร10.
- Positioned away from the start and finish to encourage exploration.
- Node.js and npm: To run and build the project locally.
- AWS Account: For deploying backend services.
- Telegram Bot Token: To integrate with the Telegram Mini App API.
-
Clone the Repository:
git clone https://github.com/MazeTon/MazeTon.github.io
-
Navigate to the Project Directory:
cd MazeTon.github.io
-
Install Dependencies:
pnpm install
-
Set Up AWS Services:
- DynamoDB Tables:
- Create two tables:
User
andMaze
. - Define the necessary primary keys and indexes as per the backend code requirements.
- Create two tables:
- Deploy Lambda Function:
- Package the backend code (provided in
lambda.js
). - Deploy it to AWS Lambda and configure the API Gateway endpoint.
- Package the backend code (provided in
- DynamoDB Tables:
-
Run the Frontend:
pnpm dev
-
Configure Telegram Bot:
-
Set your bot's WebApp URL to the frontend's address (e.g.,
https://yourdomain.com
). -
Use BotFather in Telegram to set the domain:
/setdomain
-
- Open Telegram and start a conversation with your bot.
- Click the Start button to launch the MazeTon WebApp.
- Begin your maze adventure!
We welcome contributions from the community! To contribute:
-
Fork the Repository: Click the "Fork" button at the top of this page.
-
Create a Feature Branch:
git checkout -b feature/YourFeature
-
Commit Your Changes:
git commit -am 'Add your feature'
-
Push to the Branch:
git push origin feature/YourFeature
-
Open a Pull Request: Submit your changes for review.
This project is licensed under the MIT License.
- Three.js: For the powerful 3D graphics library.
- React Three Fiber: Making Three.js usable in React applications.
- Telegram: For providing the platform and APIs to create engaging WebApps.
- AWS: For scalable backend infrastructure.