My First Software Engineering Project
Last week me and my partner created our very first project for our Software Engineering Boot Camp class. This was a very unique experience for me because 3 weeks ago i had no prior coding experience. Thanks to Flatiron Boot Camp i was able to achieve that.
Building Our Project
So our first project was a Ruby based CLI choose your own adventure style game. At the start you are asked for a name. Then the adventure starts by making your first decision. Going through a dark forest or a burnt up town.The way we divided our work was by each of us taking a branch of the story. We both added our own style and personality to our own branch. Then we just coded our branch using Visual Studio Code. The way we ended up doing this is by making a big if and else loop. All of the stories choices and outcome where stored in different tables in a Sqlite3 file. We used a gem called tty-prompt to give the user a question and choices. And from there we just plugged what ever outcome or choice that we needed from our table. Each choice lead you to different out comes which lead you to different story endings. As you can see on the top picture, when you get a negative ending, you get a big game over. The way we achieved this was by using this website. We chose our font and just copied and pasted the results to our code. Finally we added some music to our project. The music starts playing as soon as you run the file. The way we achieved this was by adding the mp3 file we wanted to play to our project then i made a method calling for the music to start playing at the beginning. I also created a method that would stop the music as soon as it ended. With out the stop music method the music would continue playing until the song finished even after the project was done. The way the the play music method is built is by using ‘afplay’ followed by the file path. The way i built the stop music method was by using ‘killall’ followed by ‘afplay’. I am still not fully sure how these two methods work so thats why my explanations are so vague on these. So this is a very basic explanation on how we built our project.
Mistakes
So this being or first projects mistakes were expected. One of the mistakes is a very big one. We forgot to include the title of our project! Our project name was “The Journey” and was supposed to be included at the start of the project! I remembered about this when my classmates were presenting and was seeing how everyone had pretty tittles at the very top.
Another mistake that was made was with the music. I was able to add music to the project but was always very very loud! I was not able to figure out how to adjust the volume until after we presented our project. It was only missing a very simple and small code, “-v .25”, this makes the mp3 play at 25percent the original volume. This would have been useful when debugging our code as the music would always start playing when the file was ran.
A personal mistake that i think i made was the repetition in my code. I broke one of the most important rules in coding. DON’T REPEAT YOURSELF! I constantly repeated my self when using the if and else loops. The way i could have fixed this was. by using more variables or more functions.
If We Had More Time
Originally we had a lot more ideas to include in this project but since we only had a week to work on it we ran out of time.
One of the ideas was to have an inventory system. Each user would have their own inventory and be able to use item during their adventure.
Another idea was to include a dice function into it. When you would come a cross a path you would have to roll a die to see if you passed or failed the event. If the role was to low you would fail the scenario and get a game over depending on the situation.
The last idea was to have different roles. You could choose from mage, warrior or rouge. Depending on what role you chose, you would get specific item assigned to your role.
Final Thoughts
I would have definitely loved more time to work on it and may continue to work on it on my spare time. I will definitely consider doing something like this for my final project as i had a blast building this.