AnsonH / plinko-game

A Plinko game built with Svelte
https://plinko-web-game.netlify.app/
25 stars 12 forks source link

How to pre determine the multiplier logic before we proceed to drop ball. #16

Open insphererahul opened 2 months ago

insphererahul commented 2 months ago

How we can pre determine the logic to get multiplier before we proceed to drop ball. So we fall ball on the specific multiplier. Currently the ball first falling down on multiplier then we calculate the payout and all.

AnsonH commented 2 months ago

Hi @insphererahul, thanks for stopping by

Unfortunately, my implementation doesn't support pre-determining the final result of the ball 🙇 You can check out the following comment for more details 👇

https://github.com/AnsonH/plinko-game/issues/15#issuecomment-2297905148

insphererahul commented 2 months ago

@AnsonH, thanks for sharing the resourses.

Could you please let me know as you have better understanding of this scenario. If, I succeed in this problem, I can share the complete solution with you repo. So it have a complete solution in future.

Let me know.

AnsonH commented 2 months ago

@insphererahul Sorry, at this moment I'm not sure how to re-implement my game such that it can pre-determine the multiplier logic (or the bin it's going to drop) 🙇

I'm aware that Stake.com's implementation involves pre-calculating the result of the game and store it on the blockchain, then play the animation of the ball falling. While I didn't spend too much reverse engineering their implementation, I think they did NOT use MatterJS, which is used by me. I guess they write their own Plinko engine that can ensure a ball falls on a certain pre-determined bin 🤔

Currently I don't have plans to rewrite my engine to support the pre-determination of result. That's because it's just one of my personal project and I didn't plan to invest too much time into it. Looking forward to seeing your solution if you can solve the problem 😄

blancos13 commented 2 months ago

did anyone found way to determine the multiplier logic before we proceed to ball