Development of a React module for the mini-game "Lucky Ticket" for Telegram Mini App (WebSocket, TypeScript)
Development of a React module for the mini-game “Lucky Ticket” for Telegram Mini App (WebSocket, TypeScript)
General project description
Task: Develop the client side (frontend) of the multiplayer mini-game “Lucky Ticket”.
Environment: The module is embedded in the existing Telegram Mini App.
Stack:
Main game logic and rendering: React.
Language: TypeScript.
Interaction with the backend: WebSocket (main) + REST API (additional, if needed).
Architecture and area of responsibility (Important!)
The application uses a hybrid approach.
NOT included in the executor's tasks (already implemented in the application):
Top bar (currency counters, burger menu).
Bottom navigation menu (Shop, Tasks, Birds...).
General initialization of Telegram WebApp, user authorization.
Included in the executor's tasks:
Implementation of the React game module, which is mounted in the provided HTML container in the central part of the screen.
Implementation of all internal game logic: ticket grid, room tabs, draw animation, internal popups (Rules, History).
Responsive layout of the Canvas content, so it correctly fills the designated space on different devices while maintaining design proportions.
Connection to the WebSocket backend of the game to receive states and send player actions.
Gameplay and UI states
The entire UI of the game must strictly adhere to the provided layout in Figma (link will be provided to the executor).
3.1. State 1: Active round (Gathering participants)
Main screen where players buy tickets.
Room tabs (Bet Tiers): Switches “1k”, “5k”, “10k”.
When switching, the active room changes, the ticket price, prize pool, and grid state are updated.
Information block:
Current prize pool — updated in real time.
Ticket price in the current room.
Ticket grid (20 cells):
Free ticket: Ticket icon. Clickable. When clicked, it changes to “Selected” state.
Selected ticket: Slightly dimmer and smaller (as in Figma).
Occupied ticket (Other): Displays a placeholder avatar of another player. Non-clickable.
Occupied ticket (Own): Displays the avatar of the current user (avatar data must be passed to the module during initialization). Non-clickable.
Action button (Buy):
Always gray (as in Figma).
If tickets are selected and there are enough funds: active (orange), displays the total purchase amount. When clicked, it sends a purchase request.
If selected but not enough funds: inactive, a message “You don’t have enough silver” appears on top.
Timer: Countdown to the automatic start of the draw (HH:MM).
3.2. State 2: Draw (Spinning)
Transition to this state is initiated by an event from the backend (timer expired OR all 20 tickets sold).
Blocking: The ticket grid and purchase button are blocked/dimmed.
Spinner animation: A panel with three “slots” appears over the grid. Fast animation of the avatars of participants in the current round runs in the slots (slot machine effect).
Determining winners:
The backend sends a list of three winners.
The slots stop simultaneously: 1st place, 2nd, and 3rd, showing the avatar, name of the winner, and prize amount.
Completion: After showing all results, the game automatically returns to State 1 (new round) after a few seconds.
3.3. Additional elements (inside Pixi)
Panel “5 Last games”: Table at the bottom of the screen. Data comes from the backend during initialization and is updated after each draw.
Popup “Info” (Rules): Opens with the button (?). Modal window inside Canvas, overlaying the game. Static text.
Popup “History” (My games): Modal window with a table of the user's personal game history and pagination. Data is loaded from the backend.
Interaction with the backend (Data Flow)
The module must be a “thin client”. All validation logic, win calculations, and timers are on the server. Connection via WebSocket.Implementation requirements
Graphics and assets:
All visual elements must be taken strictly from Figma.
Use texture atlases (sprite sheets) for optimization.
Animations: Implement smooth animations (spinner, opening popups, highlighting buttons).
Optimization: The game must run smoothly on mid-range mobile devices. Monitor memory consumption, avoid leaks when switching rooms.
Typing: Strict use of TypeScript, typing all input and output data of the API.
Current freelance projects in the category Javascript and Typescript
Support and development of the cleaning company's website
20 USD
I'm looking for a web developer/webmaster for long-term support and development of a cleaning company's website. Website: https://donely.ca About the project DoneLy Home Services is a cleaning service company in Canada that is actively growing and expanding its geographical… Javascript and Typescript, Web Programming ∙ 5 hours 48 minutes back ∙ 44 proposals |
Development of a website according to the specifications on FramerYou need to create a website based on the parameters in the technical specification. https://docs.google.com/document/d/1ODO2C9Krb4AaMiJz9wfbNzWlAyA2FwCCHL8r0biajUY/edit?usp=sharing Please provide your actual rate based on this design. HTML & CSS, Javascript and Typescript ∙ 1 day 6 hours back ∙ 26 proposals |
Development of an interactive Palworld map for the websiteWe need to develop an interactive map for Palworld based on the example: https://palworld.gg/map We need not just a static image, but a full-fledged interactive map where users can view locations, toggle object categories on/off, search for specific points, and interact with… HTML & CSS, Javascript and Typescript ∙ 2 days 21 hours back ∙ 32 proposals |
Development of the AM Mobility platform (car service, parking, insurance, car rental)
5731 USD
We are looking for a team or an experienced Full Stack developer to create the MVP of the AM Mobility platform. AM Mobility is a unified digital ecosystem for motorists, combining in one application and web platform: parking; car service; tire fitting; car wash; car rental;… Javascript and Typescript, Web Programming ∙ 8 days 4 hours back ∙ 119 proposals |
Gsap animations
22 USD
Good day. Corrections need to be made in the current project. A specialist is needed who works well with gsap/lenis. Animation of cards needs to be done. Detailed specifications here:… Javascript and Typescript, Web Programming ∙ 8 days 9 hours back ∙ 21 proposals |