Saturday, February 18, 2017

Time Completion (and health update)

This'll be a pretty short update. I've gotten the time controls, lunar cycles, and day / night cycles up and running, along with a functional UI. The amount of light at night waxes and wanes with the moon, the days grow longer and shorter before and after the solstaces. I admit, the code making up the time control class is a mess and needs to be split up into pieces and streamlined, but that'll be for another day.

(Temperature and weather currently on hold.)
I do have what will hopefully be awesome news, though! I went for another doctor's appointment the other day, but this time it was a doctor specializing in sports medicine. About two weeks ago I'd wrenched my shoulder (the same shoulder I'd wrenched last year). 

This wasn't completely surprising; I've been stuck in bed for over seven months now, so of course my muscles aren't in the best shape anymore. So in I go to see the doctor, explain the history with that shoulder, mention the migraine and that my mom has had spine problems... and after a brief but impressively targeted examination he finds that my neck is completely out of whack and that the center of my head is a whole inch left of the center of the rest of my body. Which in turn skews arms and all this connecting stuff.

... Which can cause migraines.

So I'm off for another MRI on Monday morning. I get copies of the pictures to stare at my insides as soon as they're done, which thrills my geeky, anatomy-loving heart. Wednesday morning we're back to the sports doctor to start fixing whatever's fucked up up there, and then...

And then you might get to see how I tear through this project when I don't have a giant lamprey latched to the back of my head.

So. Fingers crossed. I'm really hoping this is it. I'll make a post about how it goes then.

Thursday, February 9, 2017

Day / Night Cycle Finished!

The day / night cycle is complete!

It now has:
  1. sunrise / sunset transitions based on real world length and times
  2. longer daylight hours in the summer and shorter in the winter
  3. varying levels of darkness at night, depending on the stage of the moon
I've also fixed the firelight / lamp lights, so they no longer become glaring in the day. As for the shadows... I'm just going to leave them the way they are for the time being. Ultimately they're not that important.

The time display wasn't in the video, but a few seconds after hitting 'play' I fast forwarded the game from playing 1 second = 1 game minute to 1 second =  30 game minutes.

Next I'm going to integrate the Easy Save system I was gifted for Christmas next while this refactor is small and manageable. After that, we'll go back to tackling the hard stuff: the job system, and AI prioritizing / needs / decision making.

Tuesday, February 7, 2017

Sunrise / Sunsets

Getting the colors / values right; I may have to consider what to do about the shadows... maybe dim their alpha in the dark? I know I'll be lowering the light intensity from the campfire during the daytime (it looks like a flare now), but it's a start.

I could do shadow animations, (which sounds like a pain). I could also put in primitive shapes off the base and use some of the Unity asset store tools to have dynamic shadows... buuut most likely I'll just do an alpha fade on the shadow layer when it gets dark out.

Anyway, I'll just get the sunset / sunrise cycles going for now.

Growing plants!

Not that I actually think full-grown corn is going to materialize the first day of spring. :P

Corn is growing, the clock is progressing.

Obviously plants won't grow this fast in game, but there's something satisfying about seeing them pop up like that. I'd meant to go back to the job system, but it's been so long since I had the strength to code, I thought I'd do something easy first. I've also scripted this in such a way that I can apply this script to any plant, and the LPC collection has peppers, carrots, artichokes, (eggplant? zucchini? cucumber?), and tomatoes as well.

Tomorrow's goal: change the lighting throughout the day-- dark blue at night, brightest around noon, with a nice happy glow around fires and lanterns. Keeping it simple, while I'm battling drug withdrawal.