Tuesday, April 4, 2017

Yet More Digestion Game Work

hey all,

I've been working even more on the digestion game. Specifically, I have been implementing a scenario menu which allows the player to choose what kinds of food they will be eating. For example, they could follow the food pyramid, eat totally random foods, only eat meats, sweets, fruits, vegetables, or fruits and vegetables. At the moment, this choice is much like many of the choices in Fallout 4: it really has no meaning. However, I have started to set up some simple body outlines that (in the near future) will change based on the amount of food and the types of nutrition the player is digesting. Eat only sweets, which contain high amounts of carbohydrates and lipids, and the body will store all that excess energy as fat. Eat a balanced selection of goodies, and you'll be fine.



I've also been thinking about other consequences that I could implement. We all know that you need to get enough of each of a few dozen nutrients, including vitamin A, the 8 B vitamins, vitamin C, etc. But did you know that you can actually go blind due to vitamin A deficiency? Apparently, it is a major cause of blindness for children in several less-well-off nations around the world. Or maybe I could make the player's teeth get cavities if they eat too many sweets, causing them to fall out, and making eating more difficult. There are really a large number of things to try out.

I've also stumbled across some not surprisingly amateurish coding mistakes in how I'm checking the player's score in the stomach level. For some reason, by the time I got around to coding the other levels, I must have had a better idea of what I was doing. In any case, there are something like five separate entities which either duplicate or make unnecessary references to the player's score, which seems to be stored in all of those five places, as well. So I've also been working on refactoring this, basically by creating one object with one script that controls the score, and using delegates (yay!) to allow other scripts to receive notification about changes in the score.

The other upside is that this should reduce the per-frame overhead of many of those scripts, since I was literally checking what the score was every frame (more than 60 times a second) in five places.

I've stopped doing my nightly Let's Plays of Total War: Warhammer, but I have been playing the above mentioned Fallout 4. I hope to post a game analysis of it in the coming weeks. Overall, Bethesda has produced another deeply flawed yet somehow enjoyable open world game.

No comments:

Post a Comment