Add some tasks!

Back again with part 3! Now halfway through the month and the Quest Log is slowly, but surely, coming together! I am deciding right now to change my tone about how last week went. At first I was a bit disappointed in myself for not making as much progress as I had hoped, but now I'm just glad I'm doing something as opposed to nothing.

Day 11 | October 11, 2020 | Wait...What Happened?

It's Sunday, I just had two days off from work, and I woke up early to get this done before starting my work week. Yay-awn. The whole reason I’m making this blog and this project is to build motivatation. I’m over here strong-arming myself! Don’t take that out of context.

I opened up Unity, hit run, and for some reason nothing worked. When attempting to create a new task it would just make blank tasks. It wouldn’t carry the input over. I wasn’t exactly sure why. So, I looked at the code, made sure I didn’t accidentally delete a function or anything. Everything looked right, it all made sense. I looked at the gameobject, it had the respective references, and the button events were calling the correct actions. It was adding a new task, after all, just not taking the input in the process.

So, after some scratching my head, I just tried dropping all the references to the input fields on to the Quest Log again. And, like magic, it somehow worked again. I don't know how or when this happened, but my best guess is things got muffed up when I made the git repo and put everything into a new folder.

Yikes, time for work!

Day 12 | October 12, 2020 | Let Me Explain

Another boring Monday, am I right? If only I had an awesome to-do list reminding me to continue striving for awesomeness. Oh, yeah, it’s coming along. Of course, tons of apps offer a to-do list, but how many also mix in gamification and reward the user? (Don’t answer that, I’m sure there are plenty as well!)

The idea here is that you will have an avatar and a house (at least). You will receive rewards for completing your daily tasks, including streaks and other motivational perks/ You will then be able to trade the currency for props to decorate your house/avatar. Somewhat like a really popular game that welcomed a new entry earlier this year (cough, cough).

So, today I made a new script to handle storing some of the player data. That way all the money and rewards have somewhere safe to go. Soon I need to work on serialization and data save/load. It takes a lot of small steps to do big things.

Day 13 | October 13, 2020 | Storing Stuff

I have to start this off by asking myself a few questions. What information needs to be saved? How much should I allow? Should I allow for it to be easily edited? Maybe it would be beneficial for someone to be able to export their Quest Log to a plain text file and adjust it, share it, etc. It is something I think is worth considering at least.

For now, all I have to store is the “player” objects amount of gold and the custom made Tasks. This shouldn’t be too difficult. I can easily make a script that saves/loads the amount of gold and each task and populate the Quest Log with them at runtime. Enough planning, time to try it out.


Hey look, simple code!

This should in theory work, but I cannot test it until I do a little reworking on how the Quest Log is initially displayed. Also, this method will make the saved task list not human-readable. This may be okay, I'm undecided.

Day 14 | October 14, 2020 | Required Rework

Alright, I know I said I try to rework and change things all the time and it is a bad thing. I should get as much working as possible and worry about things that don’t work as they come up. Being a perfectionist halts productivity.

That being said, sometimes you have to rework something because you need it to work differently in order to work with other things. This is one of those times. Each task is only told to show when I make a new Task. This worked for a proof-of-concept (to get the UI aspect working), but now I need it to read from a file and populate the task list at runtime.

This was quite the rework and a few times I almost pulled my hair out! But in the end I got it to work! I also cleared the Quest Log initially, and there's a nice message letting you know there are no tasks and that you should make some.


Impatient much?

Day 15 | October 15, 2020 | Day Off?

Okay, so... I woke up a little later than I would have liked. I was just about to get to coding, I had almost an hour until I needed get ready for work. Then, I noticed I had a text from my manager asking me to come in an hour early. Someone called off, and I figured I should go - because I'm a sucker.

Work was stressful and busy, as usual. Part of me wanted to just go to sleep, part of me wanted to watch YouTube and play video games. However, I was really starting to feel like I didn't do something for the day. Honestly, I think I'm starting to form a good habit.

This made me launch Unity. Then I just starred at it for awhile until I realized something that was bugging me even if it wouldn't be a permanent feature. I could add tasks and the quest log saved, but shouldn't I also be able to delete them? So, I worked on that! This actually took a lot longer to solve than I expected. I was using a list to keep track of the Tasks and I was having trouble finding the specific Task I wanted to remove. So, I changed it to use a Dictionary where I could ask for the specific item with a key (of the Task's name). Everything worked once I made the change!


Nothing to see here.

Still plenty of little things to work on, but overall pretty satisfied with progress for this batch of days.




I can offically cross Part 3 off my list. I tried a few different things for this week. I wanted to add little personal details into each day to see if in someway it could enhance your (the wonderful reader) experience. I don't ever mention this, but there is a comment box down there that always accepts feedback. I keep calling this a journey - I'm exploring. I don't have everything figured out! I'll keep changing it up as I go.

Part 4 is coming soon!

Aaron
Archives