This project was a final project in one of my classes. We were given the source code of a program that would simulate a battle between heroes and monsters. We had to modify the code to utilize a number of different design patterns. We had to use the Factory, Strategy, Memento, Mediator, and MVC patterns within this project.
The end result was that the user would be able to have a Hero group of a specified amount, choose all their classes and names, and fight an equally large group of Monsters. The first group to run out of group members, loses. The user would also be able to save a battle to a file, and reload to that point from the main menu. Overall, it was a huge assignment, but I learned a lot from it.
This project took a fair amount of time to complete. It ended up being built across 19 different files, each with a different purpose. I thoroughly enjoyed this project, for it taught me a lot of different techniques for approaching different problems. The hardest part of this project I would say would of have to be the debugging progress of it. While the different tasks were rather easy to code and wire into the project, finding all the small bugs that would arise was a challenge. They ranged from unaccounted for edge cases, a logic error in a rather rare case, or just a missing feature, it was near impossible for myself alone to find them all. At the time, I was living in the dorms on campus. What I ended up doing was talking to some guys down the hall to me and asked if they'd beta test a game for me. Just mess around with the game, try different things in attempt to break the game.
They all agreed to test it out, and within and hour they found a handful of bugs that I never ran into. They provided pictures of what they did to cause the problem, and I would go into my code, identity what was causing the strange behavior, and send them an updated version of the code once fixed. We went back and forth for about 6 hours, finding and fixing bugs, it was a rather fun experience. Once everything was all said and done, they all said that they enjoyed playing through the game, one of them said something along the lines of: "I would turn on some epic battle music, and imagine my group of heroes fighting off the horde of monsters. It was a lot of fun!". Hearing that brought a smile to my face, to have some feedback from a user about how they enjoyed their time using my project. It's a nice feeling to have when you put in so much time into creating this large project, and to have the end result be something people actually enjoyed.
The biggest takeaway for me was the different design patterns that we were required to use for this project. Each one of them addressed a different aspect of the project, and after implementing them into the project, it helped make the code much more readable and modular. Want to add a new character? Just add it's settings to the Hero Factory and you'll have a new hero just like that. Want to add in a new special attack to use? Just make a new special attack object and it can be wired in easily. That's what makes this project fascinating to me, just it's ease of adding in new features due to it's modular design. It's definitely something to take note of when I continue to make more projects.
Overall, this was a fun project to work on, and while it is in a finished state, I have some future plans for it to expand it's capabilities further. One of the suggestions given by one of the beta testers was to add a separate "Gauntlet Mode", where the user would make a team of 10 heroes, and would have to take on X amount of monster battles, increasing in difficulty. I think the idea would be a fantastic addition to the game, having different possible "gamemodes" the user can choose from. It'd be a fun challenge to implement a scaled difficulty that was fair to the user. Some other ideas I have are allowing the user to create their own custom hero class, rather than from the limited 5 that are currently available. I also want to eventually try advancing it beyond the console-based display to a graphical interface. It's some ideas to expand onto this project, for I believe this project can really grow into something really cool, and would provide a good challenge to myself.