What would be the best way to write minigame code?

Right now i have a bunch of functions for each minigame, then have a reward winner function, a reward team winner function, a choose round function, a loop that calls the other functions, and some of the minigame functions have another functions that do various things such as make the spinning cube spin, or check for the winner to the round.

This is very inefficient, but I can’t find a better way to write the code. Anyone have any methods, or ideas?

2 Likes

Well there are somethings you can do, reward winner and reward team winner functions can be all the same function.

You would only need a parameter saying its either a team round or not.

Then inside the loop you should have conditionals to check for the ammount of players or if its in a team match the ammount of players in a team.

For the various things, Try checking if you can do them with things like motor, hinge.