Hey! I've been pretty obsessed with Gacha games like Genshin and Honkai: Star Rail.
A Gacha game is defined as:
- A video game that implements the gachapon machine style mechanics. Similar to loot boxes, gacha games entice players to spend in-game currency to receive a random in-game item.
These games have such a chokehold over me that I decided to code the system on my own. Looking to transition this project into more, but it helps to have a baseline I believe. Looking for help and advice!
Please reach out if you have questions, and thanks!
-Trey
You can just run it using the Main method. Easy Peasy.
There is a text file with the list of rewards. Feel free to edit it!
- Create web user interface (Frontend)
- Adapt to other potential things (popmart)
- Web UI
- Spring Boot to setup Backend
- Define REST APIs: In your Spring Boot project, create REST endpoints that the React front-end will communicate with. These endpoints will handle requests from the front-end and interact with your Java back-end.
- Run API Locally
- Define REST APIs: In your Spring Boot project, create REST endpoints that the React front-end will communicate with. These endpoints will handle requests from the front-end and interact with your Java back-end.
- Develop the Front-End with React
- Connect to Spring Boot: In your React project, use JavaScript’s fetch API or libraries like Axios to send HTTP requests to your Spring Boot endpoints.
- Handle Data and UI Separately: Use React to handle the front-end view and use Spring Boot exclusively as the back-end data provider.
- Connect to Spring Boot: In your React project, use JavaScript’s fetch API or libraries like Axios to send HTTP requests to your Spring Boot endpoints.
- Use CSS frameworks like Bootstrap or Tailwind within React to keep the UI simple and professional.
- Spring Boot to setup Backend
- To have a “currency” that gets used and lets you roll (Want it to mimic Money)
- Check if has token
- When no tokens, prompt method to get tokens
- If has token, take it away
- Have option to take 1 or take 10 tokens
- Create method that will refill tokens
- Track Total amount of money spent to get tokens
- When token is spent, activate system
- Guaranteed to give “prize”
- Develop Prize System
- 3 Forms of Prizes with progressive rarities (Low, Mid, High)
- Set probability with getting each rarity
- Save history of prizes (amount and rarity)
- 3 Forms of Prizes with progressive rarities (Low, Mid, High)
- Roll History System:
- After Roll is done, save the data (as counter or data)
- Data must be saved and used to calculate future rolls
- Add different prizes in rarity at later date
- Data must be saved and used to calculate future rolls
- After Roll is done, save the data (as counter or data)
- Pity System
- Very Low chance to get high rarity
- Low chance to get mid rarity
- If not high or mid, it’s low rarity
- Use Roll History to determine pity
- Hard Pity System: (genshing odds vs hsr odds?)
- Every 80/90th roll is guaranteed high rarity
- Develop 50/50 system
- 50% to get desired item
- 50% to not get item
- If “lose 50/50”, next high rarity is guaranteed to be what you want
- If “lose 50/50”, next high rarity is guaranteed to be what you want
- Every 80/90th roll is guaranteed high rarity
- If received high rarity:
- Run 50/50 system
- Reset Hard Pity
- Run 50/50 system
- Soft Pity System:
- After 75 Rolls, Odds to receive high rarity increase
- Reset after receiving high rarity
- After 75 Rolls, Odds to receive high rarity increase
- Mid Pity System:
- Every 10th roll is guaranteed a mid rarity
- Resets after receiving mid rarity, even if received early
- Every 10th roll is guaranteed a mid rarity
- Hard Pity System: (genshing odds vs hsr odds?)
- Very Low chance to get high rarity
- Develop Prize System
- Allow importing a list of rewards