Today I worked on setting the initial location of the dice, and verified the setup by starting with the dice above the board, so they would simply fall when the game starts.
There were a number of interesting things done today, I added the dice to the board in their starting position, I added barriers to the board for the physics and to make the scene look more finished, I added a skybox.
Dice Starting Positions
The starting dice positions were all manually placed. I then created a prefab for them so that I will not have to generate their locations later. I think this step will help save me some time. I also created two kinds of dice. The first have no physics applied to them, and those are where the players dice will go, and the other dice are called RollingDice in the game, and they have Collider and Ridgidbody components on them. I also created a quick physics material for the board and the dice to make them extra bouncy.
Normally in games of this kind, it is a good idea to build walls that are invisible, but have the physics on them (in Unity’s case, that is a Box Collider without a Mesh Renderer) in order to solve for some problems the model may have. For instance, the walls of the model are pretty thin, and fast-moving objects such as rolling dice may actually penetrate the walls. I added a floor, and four sides and made sure they were touching in every side.
Because they have no renderer, you can not see them, so I added a renderer and took this picture, so you can see what I did to make it work.
Skyboxes are very simple to add in Unity, all I had to do was follow the manual to create one. In order to make the one I did, I needed to find some textures that were built to be used as a skybox. OpengameArt.org was able to quickly supply me with a very cool indoor scene, thanks to Emil Persson. There are a ton more to choose from, but I found this one, and thought it looked very cool I may need to add a table, or something else to balance out the scene, but for now it adds a lot of production value to the game.