Skip to content

tlelv/WishSim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wish Simulator by Treyson Le

About

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

How to Run

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!

Future Goals

  • Create web user interface (Frontend)
  • Adapt to other potential things (popmart)

Current Goal Roadmap:

  • 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
    • 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.
    • Use CSS frameworks like Bootstrap or Tailwind within React to keep the UI simple and professional.

Goals (currently implemented, seeking improvements)

Currency System

  • 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

Roll System

  • 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)
    • 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
    • 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 received high rarity:
          • Run 50/50 system
          • Reset Hard Pity
        • Soft Pity System:
          • After 75 Rolls, Odds to receive high rarity increase
          • Reset after receiving high rarity
        • Mid Pity System:
          • Every 10th roll is guaranteed a mid rarity
          • Resets after receiving mid rarity, even if received early
  • Allow importing a list of rewards

About

Project that recreates the addictive fun of gacha games using algorithms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages