Description of the project
Programming and robability was a project where we were tasked to make a video game where one of the main functions of the games had to have random probability to it. This means that an event in the game has to either happen randomly or have a random effect on the game itself. For example my game has dice rolling, there is a probability to what dice you will get. The game was to be made in starlogo nova but if we knew how to we were allowed to use different forms of game making. For example I made my game in python with PyCharm and would run my game in a terminal. The point of this project was to learn about probability and how it affects us in many situations and to get a visualization of the path of probability. It was to also get a easy look into the process of coding a computer program and how code works.
Prosess of making the game
The project was worked along with seven benchmarks. The first one was the initial game concept. Here we explored around many different games that involve some sort of probability in its main events. These include: card, dice, and board games. We would build up our idea from this and see what we were going to make into a video game. We got our game idea and wrote up about it. Explaining why we chose it, an overview of the game, and telling how this game will be made in starlogo nova. The second benchmark is where we described how the player will play the game and how probability will be a main event. How the player played the game is important because some games can never be played the same on the computer. The third benchmark we skipped but we were gonna explain how we were going to program our game in starlogo nova but because many people wanted to use a different form of game making we never did this. The fourth benchmark is where we drew out a mathematical graph of the probability in our game. This was important because we needed to show how important the random event was to the game. Benchmark five was actually to program the game itself. For me it was a complex process. When we first finished with the learning examples I stopped using starlogo nova and started to use scratch. Scratch is a very similar form of coding with the drag and drop blocks. But in my opinion scratch is a much better option than starlogo. As I was making my game i realized that coding the part where the random dice number having to change depending on how many players there are was impossible to do on both scratch and star logo. So I started over again and just started to write it in python. This was actually a lot easier than scratch or star logo because one line of python could equal many blocks in scratch. When i was done i played the game in a terminal window. The 6th benchmark was skipped also. And benchmark #7 is what you are seeing right now.
how to play
To play my game you must have a few things. The game can only be played on linux based computers that have a terminal. This includes operating systems like ubuntu and Mac OS X. But windows does not work. ( there are some ways to run stuff like my game in windows natively but it's very hard). If you have windows then i recommend downloading a virtual machine and running linux there. Next you need to have python installed on your system. To do this on mac open terminal and enter this
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then this
brew install python
Once you got that then grab the code from here
https://drive.google.com/open?id=0Bx0aFhCpoWMoeFZTZDJhbWllOVk
Put this somewhere on your computer (put it on the highest directory so you won't have to CD in terminal) and run this
./dice.py
You should be greated with a screen on how many players there and you are playing the game. The game is liar's dice if you do not know how to play it look it up because the game rules are confusing. If you do know liar dice then when you get your dice, type in if you want to raise the number or call bluf. If you raise the number then you must type a new set of dice higher than the previous player. If you call bluf then the computer automatically tells who lost and takes away a dice. When you are done and the screen tells you its next player's turn pass the computer to the next player.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then this
brew install python
Once you got that then grab the code from here
https://drive.google.com/open?id=0Bx0aFhCpoWMoeFZTZDJhbWllOVk
Put this somewhere on your computer (put it on the highest directory so you won't have to CD in terminal) and run this
./dice.py
You should be greated with a screen on how many players there and you are playing the game. The game is liar's dice if you do not know how to play it look it up because the game rules are confusing. If you do know liar dice then when you get your dice, type in if you want to raise the number or call bluf. If you raise the number then you must type a new set of dice higher than the previous player. If you call bluf then the computer automatically tells who lost and takes away a dice. When you are done and the screen tells you its next player's turn pass the computer to the next player.
Reflection
As i reflect back on this project I remember the challenges of making this game. From having to move from starlogo nova, to scratch twice, and finally to python was very hard to do. Having to restart every time. And then having to test the game was also very hard because dice games last fro a very long time. If i were to redo this project i would have just started out with python and get it done and save the rest of this time testing with friends. Also i would have done a simpler game because at exhibition the people did not play the game because they do not know liar dice. But overall it was a fun project because expanding my knowledge of coding was very fun.