Code Monkey home page Code Monkey logo

genshin-wish-simulator's Introduction

Genshin Impact Wish Simulator

img img img

My Simulator for Genshin Impact's probability driven Gacha Wish System

Visit the instructions on development setup

Frontend : img

Backend API Calls :

  • GET https://resyfer-genshin-wish-sim.herokuapp.com/api/v1/all : To view all items available through Gacha
  • GET https://resyfer-genshin-wish-sim.herokuapp.com/api/v1/1/p5val/p5guar/p4val/p4guar/ : To make a 1 pull
  • GET https://resyfer-genshin-wish-sim.herokuapp.com/api/v1/10/p5val/p5guar/p4val/p4guar/ : To make a 10 pull

p5val and p4val mean the pity in numbers with a range of 0-89 and 0-9 respectively.

p5guar and p4guar mean the guarantee rateup drop in numbers being either 1 for guarateed pity, 0 otherwise.

eg. https://resyfer-genshin-wish-sim.herokuapp.com/api/v1/10/85/1/5/0 means 5⭐ pity at 85 with a guaranteed rateup drop, and 4⭐ pity at 5 with no guarantee

NOTE: The current rates for the characters or items are for the banner Adrift In The Harbor

banner

Rate-Ups :

  • 5⭐ Characters : Ganyu
  • 4⭐ Characters : Noelle, Xingqiu, Xiangling

Getting a 5⭐ character has a 0.6% chance (Ganyu has a 50% chance given it's a 5⭐), while getting a 4⭐ has a 5.1% chance (Noelle, Chongyun and Xiangling have a 50% chance total given it's a 4⭐, and they have an equal chance of occuring).

Moreover, there's a guaranteed 5⭐ in every 90 pulls from the previous 5⭐, and a guaranteed 4⭐ in every 10 pulls from the previous 4⭐. If, in the event of getting a 5⭐ or a 4⭐ that is not a rate-up character, the next 5⭐ or 4⭐ respectively and separately will be a guaranteed rate-up.

Development

i) Clone the project, and install the dependencies

git clone https://github.com/resyfer/genshin-wish-simulator.git
cd genshin-wish-simulator
cd server && npm i
cd ..
cd client && npm i

ii) Environment Variables

Make a copy of .env.example and rename it as .env and enter your own MongoDB database below the existing content as:

MONGO_URI = YOUR_MONGODB_URL_HERE

iii) Run the project Open two terminal tabs and cd into the project in both

  • Tab 1:
cd server
npm run dev
  • Tab 2:
cd client
npm start

(Ask for .env from author if authorized)

img

TODO

  • API
  • Basic Frontend
  • Decrease API req/res cycles, reducing response time (Issue #1)
  • Game-like Front-end
  • Include feature for selecting banners

genshin-wish-simulator's People

Contributors

resyfer avatar

Stargazers

 avatar

Watchers

 avatar

genshin-wish-simulator's Issues

Slow API

The x 10 makes 10 find requests to the DB before sending the data back, making the response really very slow. That with heroku make the response-time almost 5 sec, which is a problem for the front-end at it needs to load the video corresponding to data from the API

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.