- Home /
make dice game for two players
I am trying to make a double dice game for two player and I made some of it but I don't know how to write a code for the players and how to add the points for them. Can someone show code? Please??????????????????????
$$anonymous$$aking a dice game will probably not be the easiest of tasks, especially if you're new to coding. However there are plenty of great tutorials and sources that you can learn from, good luck.
What merry_christmas said, with an important addition: Never, ever, ever ask for other people to give you code. It instantly tanks the respect other people hold for you. Ins$$anonymous$$d, attempt to solve the problem on your own and if you run into a problem, post that specific problem here -- people will be happy to help.
Good luck!
Answer by milali · Dec 11, 2011 at 11:11 PM
As the others have said, you won't get the code just dropped in your lap for a whole project. You could check the Asset store and see if someone will sell you that.
From a qsuedo point of view. You would have 2 cubes (physics box's attached) and you would need to know their orientation at start and then as you drop them give them a random rotational spin too, then the physics will handle the movement.
When they stop moving at a certain speed, dampen them to stop them moving at all. then read what orientation they are and they are your dice numbers.
as for 2 players over network, check the networking tutorials
and perhaps use less question marks :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613061949im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Trying to resize Unity WebPlayer control when resizing browser 1 Answer
(WebGL) Activate Unity Functions with HTML/Javascript 1 Answer
External call to a method not on the WebPlayer.html 1 Answer
Parse Array data to generate html 0 Answers
How to pass variables to my WEBapp through the html provided after building the app? 1 Answer