Today I got the bulk of the coding in a finished state. My goals were to finish the special blocks, address the different variables that pertain to the difficulty, and render an alert when the weather will change. I accomplished each of these, and besides the balance issues from the last post, the game is fully playable.
To change the difficulty in the game, I combined 3 factors in a 1-5 scale, 1 being the easiest and 5 being the most difficult. The 3 factors were how often good weather came up, how long each storm lasts, and how many items in the forecast will be marked “unknown”. 5 is extremely difficult and 1 is very easy, so I think my method works well. Because I wanted the game to be random and different every time, I set up a series of lists that contain a set if items that determine the probability something will happen. For example:
weatherProbability = [
[],
[0,1,2,3,4,4,4,4], #difficulty 1 (1 in 2 will be normal)
[0,1,2,3,0,1,2,3,4,4,4,4], #difficulty 2 (1 in 3 will be normal)
[0,1,2,3,4], #difficulty 3 (1 in 5 will be normal)
[0,1,2,3,0,1,2,3,4], #difficulty 4 (1 in 9 will be normal)
[0,1,2,3,0,1,2,3,0,1,2,3,4] #difficulty 5 (1 in 13 will be normal)
]
4 represents good weather, 0-3 represent the four different storms. For weatherProbability[1], we see that 4 will be randomly chosen about half of the time, so it should more or less alternate storms and good weather.
Tomorrow I will be wrapping up some loose ends and really trying to nail down some of the balance issues. Right now, the components are too cheap and make too much money, so there is little incentive to repairing them. Also, I want to take some time to improve the graphics. If I get the graphics and balancing done, I’ll try to post a gameplay video.
0 comments