zman7895's final project final post!

by Zach Lund

22 Jun 2017

Below is my embedded trinket.

I can’t believe we are here. When I signed up for my first summer course at UNC I remember worrying about it moving too quick and being too short. And, the quickness and shortness was even more intense than I thought. Now, I feel like I did relatively well in terms of keeping up with the quickness of the lessons, however, the quickness of the class a whole from day 1 to writing this last reflection is shocking. I feel like we were just meeting on the 2nd floor! I really felt like I was just getting to know my classmates and just getting used to the daily schedule. And now it is over. Wow!

As for this final project, I am very happy with where I have ended up. I mean this in regard to the project as well as the class. Since I transferred to UNC I have constantly been worried about where I stand, specifically in the tech community that my major mostly falls into. I have always thought of myself as right down the middle with technology related stuff. I think I know more than the average person, but I am no savant or prodigy and probably don’t know as much as most students who are majoring in tech related fields. Due to this, I was a bit nervous coming into this class, as I am with any other similar class. However, I quickly exceeded my own expectations in the early homework’s and exercise’s and this grew my confidence faster than I am used to. I started to get more comfortable, and I think my work over the course of the class, as well as this last project represents this.

I decided to do my last project as a mix between the game and the data analysis. I made a text based game that almost acts as a choose your own adventure novel. I utilized data files and a couple of instances of visual representation to satisfy the data side of the project, but then like I said I made it a game to satisfy the game portion of the project. I chose this because I had actually started working on it a few days before the final project was announced. My game is based off a real console video game that I fell in love with back in March. It is an incredible open world shooter game that has one of the largest maps and story modes ever created. It is so incredible, I truly believe non-video gamers would enjoy the story and vastness of the digital world, but because it is a game they wouldn’t ever come across it. I had planned on trying to recreate the story in novel form before I even started this class. So, once I was in this class I had made up my mind to create this as a program rather than a handwritten novel. I had started fulfilling this idea, and then 48 hours later the final was posted, and I asked permission to pursue this project as my final.

I couldn’t really take you back to the first steps of approaching this project. The reason is because of what I stated above, I started just messing around with it before I knew I would be using it for a graded assignment or writing a reflection on it. I hacked away at it during the night when I couldn’t sleep. I wasn’t really trying to articulate in my head what I was doing as I was doing it. I can tell you that prior to having the final assigned I had already created most of the game functions that allowed for the most basic of mechanics to work. This included picking a region to play, picking a character, and the main function that called on those functions. The only thing I can tell you about my process during this part is that I had been wanting to better understand passing variables instead of using global variables, and you will see that I pass many variables to and from functions within the gamefunctions module because of this goal I had. Besides that, anything else I would try to reflect on from that stage of my game would be made up simply to meet word count restrictions, and I don’t want to do that. Instead, I can walk you through everything once I decided this was going to be the final project.

Once I decided this was going to be my final project, the first thing I did was go back over what I had done, and looked at where I could alter things to fit some of the project requirements. For example, where I had hard coded information about the characters or regions, I decided to turn into dictionaries and dictionaries of dictionaries. Then, I realized I could use the vast information about the regions in the game as a data file to import into my game rather than once again just write them into a dictionary on my own. This is when the grw.csv module and the regiondicts.py modules were created.

The next class we developed our milestone lists and that is when the vision of my original idea and the vision of my final project came together and I could see exactly (not exactly, but close) what I wanted to do. I realized that I would not be able to write all the narratives that will be in my final game in one week, so I decided to create a demo or beta that would include some of the characters and some of the missions rather than all four characters and all 21 missions. While creating my milestone lists I also figured out how I wanted to implement a data visualization piece to my game. I decided I wanted to store player stats and display them as a histogram to the player. The last things to go in my milestone lists were things that weren’t necessarily requirements for the final but more goals for my program. The main one was the ability to save the game and pick up where you left off. This was extremely import to me for a couple of reasons. For one, saving and loading games is a core piece of usability in any video game. I can’t think of a video game I had ever played that doesn’t have this ability. Also, if my game eventually is a long story, that includes 21 missions, there is no way I would expect people to play in one sit down, and therefore a save feature would be critical. This was my last milestone, but it was gravely important to me.

The next step was to start knocking out milestones. The first few had kind of already been knocked out by what I had done before the final being given, and then some had been completed before we created the first milestone list. It was nice to see some of these crossed off early, and while technically I could have left them off the list, it was actually a psychological boost to put what I had already done down and cross them off immediately. It made me more confident to hit the later milestones down the road. The first milestone I attacked was the data visualization piece. I created variables to store the players statistics. These variables included kills, deaths, headshots, regions beat, and stealth kills. When the player goes through missions, these statistics change depending on the players choices, and they get stored (I used global variables for this, I really really really tried not to use any global variables, but I just couldn’t get around these since they were used in so many different places. I am a bit disappointed in myself for not figuring it out, but I gave it a hell of an effort so I can’t be too upset.) Then, the player can call up these stats and they will be displayed in a histogram like format. As a cool note, later, when I started working on more fun stuff, I changed the histogram to display Unicode pictures that were representative of the stats rather than just asterisks. For example, the kills are displayed as little skulls and crossbones. I thought it was a neat little touch.

I had crossed off almost all my milestones once this histogram was created, and I thought I was down to the final one of creating game saves. However, when I presented my project to Prof. Hauser, he said he wanted just a bit more visualization. This, at the time was a bit of a blow. I really thought I had put data visualization in the past, and uncrossing off a milestone was a bit devastating. I can’t explain it, but it hurt more than I would care to admit. I also found myself in a place I had not been during this entire project. I was out of ideas. I truly couldn’t figure out where I would add another piece of data visualization. Prof. Hauser then provided me the idea of creating maps, or some indication of where the player is, or where he was going, or any form of that. To be honest, I heard this idea, but I immediately thought I couldn’t do it, and kind of didn’t take it into much consideration. That is until I hit another point in this project that put me in a situation I hadn’t been in for the entire semester. I couldn’t figure it out. No other exercise or project had I taken one element of the exercise, and extended working or thinking on it for multiple sessions. I was always quick to figure something out. This was the first time I sat down, brainstormed, and even hacked away, and came up with nothing. This happened over the course of 3-4 days! In fact, I eventually worked on my final milestone, and finished that one, before I came back to this.

So, jumping back a bit, while brainstorming for several hours about the data visualization piece, I ended up working on the save feature. Surprisingly, it all came together rather quickly. I had a save feature that was working properly within a couple of hours. It did everything it needed to. It asked the user for a file name at the end of a session. It took all the variables in the game and saved their current state to a text file. It then took that text file and opened it up during a new game, iterated through it, and loaded all the states of the variables back into the variables. It was awesome. At that point, I just kept playing with it and playing with it to simply make it better for the user. I started choosing different spots for the user to save, and how I wanted it to be opened during the game. I created an opening menu to start a new game or open an old one instead of forcing each choice on the user. I spent more time making it work exactly how I wanted it to than I did in getting it to work in the first place. This ultimately may have been the climax in terms of excitement levels for this project and for the semester. I was thrilled I got this to work so well for me, and it made me finally feel like I had a real game on my hands!

The save feature was finished, and I was back to the data visualization drawing board. I finally threw my hands up, and gave in. I was going to give it my best go at drawing a map. I worked in Microsoft Word for hours using keyboard symbols to get something to just look sort of like a country. I finally got something I was happy with. It was more of a relief than excitement. Then, that excitement turned into pure anger. I pasted that art into trinket in a print statement. It turns out you had to include quotation marks on every single line. I was furious. So, I went line by line adding quotation marks. But then, when you add the quotes, it shifts all the markers, and now I don’t even have something that looks like a country anymore. I wanted to cry. Instead, I just manned up and started making it look nice again. When I finally got it to print, I had never been so ready to put down the computer and eat, and see the sun, and kiss my girlfriend, and call my mom and tell her I love her! Wow, this was a heck of a journey, but at least I finally got it!

I thought I was done! But nope, we now needed to add a class. I had to brainstorm again, but then one of my peer members, Amanda, gave me a great idea. She said I could create a class that creates a profile for the user. This was awesome. I play Xbox Live, and I have a gamertag that stores my information. I decided to create a gamer class. I created the standard initialization function, and gave the profile a name and experience level. I then created functions to get those pieces of information. Then, I created a function that changed the experience level. I then utilized calling those functions out in the part of my program where a user loads a saved file. Now, the class can keep track of whether the user has played before or not, and adjust the rank of experience. So, the first time you play you are a rookie. Then, you move up, and so on and so forth until you reach the highest of experiences. The last function was a function that prints statements based on your experience. This is utilized so when you exit the game it gives you a personalized message based on your game profile name and your experience. I thought it added a very Xbox live like touch to my game, which made me almost as thrilled as the save feature!

Now, I was finally done. It was a hell of a ride. I feel like we just started the class, and yet I feel like I may have learned more in 4 weeks than I have in full semesters. I almost think I like having class every day because it drills concepts home for me, and forces me to do work every night. Sometimes during the semester, you go to a Tuesday class, then don’t think about it again until Thursday. And, while it sounds small, just having that break can make you lose sight on some of the finer details of things you may learn. Also, last thing I will say, I was always made to feel very comfortable in the class. Prof. Hauser and my classmates made this possible. After the very first time I got up and spoke in front of the class, I knew I was in a good place, and knew it was going to be a good semester. I would like to thank everyone for that. It was truly a great experience, and I am sad to see it ending.

### Final Milestones (Updated as of 2017/06/21)

  • the user can select from 4 different characters, or select to see a list or details of the characters (2 for the beta)
  • the program to include 21 different regions loaded with bosses, ecosystems, and backstories (1 for the beta)
  • the user can decide between different methods of approaching the mission, and select different narratives within the mission
  • the program can keep track of their stats, like kills, deaths, etc, and display them graphically
  • the user can keep track of where they are in the game by listing the regions they haven’t played vs. those they have
  • the program can determine when the player has completed enough of the game to access the final boss
  • the program displays a final narrative once the final boss is beat and the program quits
  • the program can display some form of visual data to show the players location or where he has been
  • the user can save their game to be able to return and pick up from where they left off
  • the user can create a unique profile that saves their name and experience level
I am a rising senior at UNC and in the information science major. I lived most of my life just outside of Washington D.C. I love sports, music, and gambling. Find Zach Lund on Twitter, Github, and on the web.