1
\$\begingroup\$

I'm new to game development and I was thinking of starting off with something easy like a top down simulated race game. It will be similar to a horse race, such that there will be betting, and character should win based on their attributes and simulated conditions.

One problem I'm currently facing is how to simulate who wins. Characters will probably have the attributes top speed, acceleration, endurance etc. I don't want the top ranked character winning all the races.

I was looking into probability distributions but I couldn't quite understand how that would help calculate who will win.

I know the winner will be who crosses the finish line first. However how do I calculate characters slowing down, speeding up?

\$\endgroup\$
2
\$\begingroup\$

the easiest way is to randomly change attributes at the beginning of each game. say for every player in the game. you have actual attributes, but you'll simulate using some values generated for that exact game (which may be actual_attribute±10%).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.