HFOSS Quiz

This is a post answering questions for a class I’m taking. Not much more to say besides that.

Read More

Wednesday: Shader Success

Even after a few hours of tinkering, my selection shader has managed to stay stable, which is a relief even though I can’t quite pin down how Unity deals with shader properties since it seems to ignore the default value sometimes, and I haven’t found a pattern. Still, I’m starting to get the hang of shaders in general and even made it slightly animated. Though since I’m not sure how most animated shaders work, I don’t know if they way I’m implementing it is ‘standard’ or ‘efficient’ or anything. But, it works. All I did was use shader globals to access a _Timer counter, and then increment that variable via script. It looks kinda nice.

I also finally made the project into a git repo. I should have done it from the beginning but I didn’t think I’d really work on it for more than a day at the time. However, some of the files are being rejected from GitHub because they are too big. I’ll get that fixed tomorrow and post a link.

Shader Screenshot

Tuesday: Shaders Aren't That Hard, Unity's UI Might Be.

After spending a good chunk of the day playing with and learning Unity’s shaders trying to get a CCTV refresh lines effect and an outline, I spent almost the entire rest of the day wrestling with Unity’s 4.6 UI system and learning the hard way that python can be mean. Unity’s new UI system is actually rather nice, especially compared to its old onGUI system, but there doesn’t yet seem to be any clean way to convert world coordinates to UI coordinates. World coordinates to screen coordinates work well, but unfortunately they don’t seem to be the same.

However, python was a ruthless vixen to deal with, since I am not fully familiar with how it deals with scope regarding globals. I spent far too long trying to figure out when python thinks variables are global and when they are local. Plus I think I had my first run in with incorrect whitespace character errors since that’s the only explanation I can come up with for that trouble. That was 2 hours I’ll never get back, but hopefully will never have to lose again. I wish I had set that project up on git sooner, maybe that never would have happened.

Monday: Shaders are Hard

The AI game I mentioned last week has quickly become more of an exercise in graphics rather than AI. While hung-up on not having any idea what to do to make Unity’s built-in navigation system simulate queuing, I’ve instead turned to messing with shaders, with which I have almost no experience. The concept of the game involves selecting an NPC on-screen with the mouse, so I’m trying to do some silly shader shenanigans with a second overlay camera to highlight whoever is selected. So far, it’s proven difficult. 1:00am Edit: Nevermind, this funk rocks socks.

Shader Screenshot

Initial Commit

So, with a lack of any real idea of what to say, I guess this will just be a log of all the things I do and create. I already do that but in two-word bullet points in a .txt file, so now it’s gonna be at least three words per bullet point.

Read More