These past couple of days have been exceptionally rough. I accidently destroyed my temporary file backup system for the game, and pushed the bad code to GitHub. I then spent 20 hours trying to get everything back. Olex and I where up until 1 in the morning trying to fix everything. Then we shut it down, picked it back up at 6 and continued work. We finally got everything working again, but it was a grind. I then had to redo all of the work and progress that I had made in the past week and a half. In the end though we got it back, and I learned a lot about source control.
I also made a bunch of progress on the card effect manager script, and realized something about scriptable objects.
Firstly, the card effect manager. I created a system that would allow us to in the editor customize the exact impact and effect the card would have on the player, and on the board. Then I created a system that would track how long the cards where active, then remove them once they had completed their effect duration.
Lastly, I also realized a really big plus, and a really big negative about scriptable objects. They can not used the way that I was originally planning on using them. In order for me to use them the way that I wanted to I had to duplicate the scriptable object, then I had to manipulate that duplicate. This would allow me to have the system that I wanted. Since if I adjusted or manipulated the data of the scriptable object, it would remain forever changed and set to that value. This means I create the data in the editor on the scriptable object, then I duplicate and adjust the data if need be.
Although, just duplicating it was not the only change. In order for the system to work, I needed to rewrite 3 of the other back end systems to accommodate these changes. Furthermore, I rewrote the tech tree to duplicate and adjust the techs, so as not to alter any of the original data. This then changed the way that I was checking required techs and if they where researched. I needed up adding the names of the techs that where researched to a list, then checking to see if the required techs button's tech scriptable object element's name was inside of the list. Sorry for that really ugly statement, I tried :).
I also fixed some bugs relating to the tech tree spin system, and fixed the closing and opening of the tech tree. I rewrote how terrain objects where deleted and separated them by frames to make the checks function properly. This reduced the terrain anomalies, but did not solve it so I am going to have to go back and check to see where exactly I went wrong.
In the end, a lot of progress and setbacks, but that is what programming is all about. Bye and see you later!
Comments
Post a Comment