Luca Fusi Sound Design | Implementation

13May/140

WUIS Worklog TUE 5/13

Been a few days! Between negotiating the return to work and beginning a very intense journey into Reading Things AgainTM, I haven't had much to talk about on the coding front. Today, I went back in for two lessons' worth of fun. One, I think, was almost entirely irrelevant to sound, but a fun aside to pursue.

Today I Learned:

  • A little bit about vector math--the dot product and cross product. Operations like these, performed on the ol' 3D Euclidean plane, are used to calculate all sorts of stuff like position, speed, physics checks and the like. Hitting this tutorial sent me on a random dive into vector algebra and math I haven't thought about in probably twenty years. It'd be interesting to take a fuller crash course through that stuff sometime down the line, but for now, I had to stop when I found myself observing a Java applet that exhibits one of the most popular proofs of the Pythagorean Theorem. Probably not something I need to be overly concerned with for now, but it's cool to see a) what vector math is b) why it's useful and that c) Unity has a bunch of built-in functions (or are they classes? constructors? Blah) for handling it.
  • About the fact that you can enable or disable components--you know, attachable functions like Lights, Physics, Scripts, etc. in the visual editing side of Unity--on the fly. While investigating that, I learned that you can create GameObjects on the fly, too, and started trying to enhance my learning experience on this tutorial by branching out. Predictably, this got me to a point where I started having issues with code compilation, and got stumped. Then, the net went down, and all progress halted.

Up Tomorrow:

    • I've sent off a volley to some of my C#-knowing buddies about the difficulties I was running into with my experiments into runtime GameObject creation in Unity. It's perplexing that shit's going wrong, especially since the code snippet flagged by the compiler as somehow bad (see below) was copy-pasted directly from the Unity documentation, but I'll get through it.

Assets/EnableComponents.cs(36,29): error CS1525: Unexpected symbol `:', expecting `)', `,', `;', `[', or `='

I would love to find a really, truly full and interactive guide to C# syntax somewhere on the net. Something where I could, say, plug in a line of code I've taken from somewhere and just have the various pieces identified. There are seemingly so many ways to write this stuff that it's tough to know what piece is doing what sometimes.

9May/140

WUIS Worklog FRI 5/9

It's Friday! Slow day full of other stuff happening. I should really temporarily rename this endeavor to something that doesn't mention Wwise...

Today I Learned:

  • About the Awake and Start functions. One's called every time the project launches, whether its containing script is enabled (checkboxed) or not. The other's called afterwards and only if the parent script's enabled. Useful tools for initializing variables, values, game states, etc. I was pleased to be able to write the code provided by this tutorial without having to look at it beforehand--but then, it was pretty easy!
  • Learned the difference between the Update() and FixedUpdate() functions--former executes once per frame, but frames can take varying amounts of time! Latter is more consistent and gets its timing from the physics engine or something.
  • The differences between Input.GetKeyDown() (returns true if a key's down, but only for the first frame in which this function's executed) and Input.GetKey(), which can retrigger.

Tried my hand at some off-the-rails coding to figure out some pay rate conversion stuff. I was all excited to use structs, proper data types etc. and make 'em public--then be able to edit them from Unity's Inspector view and check the results out in realtime!--but it turns out that you can't get structs flagged / exposed to show up in the Inspector view, even if they're public. Drag.

Up Tomorrow:

  • More tutorials--unless it's nice out, then I'm going outside.
8May/140

WUIS Worklog THU 5/8

Today I Learned:

  • About scope and access. This does a lot to explain some of the compiler errors I've been getting when trying to build. I'm used to straight-ahead, "functional" programming stuff like .BAT scripting, which doesn't involve either of these concepts and in which variables set anywhere can pretty much be accessed anywhere else (an exception being within code blocks like IF statements). Turns out that public variables will display in the Unity GUI within the inspector of the object they're attached to, which allows you to tweak them at runtime. Useful for debugging and tuning RTPC curve calculations and stuff like that, I guess!
  • Read more into classes after seeing the Unity tutorial guy whizz through a bunch of stuff on them without stopping. Basic CompSci stuff that I just don't know, and seems worth reviewing. The differences between classes, structs (though I haven't run into these yet), functions, constructors, and instances of the above are still pretty murky right now. I will have to take an actual class on this stuff at some point, if only for the sake of having a teacher to ping with questions...

Debating switching the default editor back to MonoDevelop because of some intelligent stuff it does. Since it knows what scripts are loaded into the project, what's public, what's private, etc. it can autocomplete function references that Sublime can't. So, using MonoDevelop would prevent me from fucking this stuff up. On the other hand, sticking with Sublime force me to improve my knowledge of scope and access, since I'd have to be more careful.

Up Tomorrow:

  • Continuing with the tutorials! I'm thinking I'll probably hit my Text Fighter v1.0 project after a few more. Some days, you just wanna stay on target.
7May/140

WUIS Worklog WED 5/7

So at this point, this venture's got me straight-up learning about Object-Oriented Programming, assorted computer science fundamentals, C# and its syntax. This this stuff translates readily into understanding more about Unity, vis-a-vis C# being a development language for it (and these tutorials feeding me easy examples of attaching scripts to objects, etc.)--but it doesn't really have much to do with Wwise, sound, or what I set out to do. The whole of "learning to program" is a rabbit hole into which I could tumble endlessly, so I think I should take a moment to update my daily and overall goals.

The end goal, for now, is still to figure out how to cook a Wwise project up and then create a Unity project which can invoke sound calls, RTPC updates and the like from those bundled banks, turning them into really simple game functions like, "When I push space, this sound plays" or "When I move the mouse on this axis, this RTPC increases."

To hit that point, I'll finish these tutorials, and daily:

  • List the stuff I've "learned" how to do. ("Learned," as in, "have experienced in one or another tutorial"--but won't necessarily have under my skin until I've really ventured off the rails and experimented with).
  • Any particularly cool points or definitions I feel like I've covered, I'll go into more detail on. And maybe list a few examples of how I can see that working in a simple project I'll define as I go along.

By finishing these tutorials and daily drilling in these reminders of what I've learned about C#, I expect that I'll be able to crack open the Wwise-Unity Integration Demo classes and at least understand what's going on at a structural level. It'll still be Greek, but I'll be able to recognize it as such, instead of a big text file full of scary.

Today I Learned:

  • About inheritance, main classes and base classes. Specifying a base class lets a class inherit certain properties, like instance variables and functions. When you create a new Unity script, that first public class and open brackets it creates specifies "MonoBehaviour" as the base class. This is like some default framework that Unity has which contains a bunch of useful functions. Makes sense. Diving deeper, it seems like there are other ways to do this kind of inheritance stuff with "delegation" and "subtyping"--but I don't know what the deal with those paradigms are or why I'd elect to use them. Yet.
  • About different value types--int and float, for starters. I don't know why exactly one of my example scripts has to explicitly define a floating value as such twice. That is, in the statement, "float coffeeTemperature = 85.0f;", why do we have to say both 'float' and put the 'f' suffix after the initialization value? Anyways, I'm not expecting this type of stuff to start becoming a problem until I'm converting between data types. As an example of why an audio-related function might do that could be turning a super fine-tuned, precise value like mouse coordinates into an integer that falls somewhere specific on an RTPC graph.
  • About constructors, which are like functions that are used to create brand-new objects (like GUI boxes) at runtime. Decided to make some semi-interactive controls to accompany the coffee temperature test tutorial on IF statements, and ran into some compilation errors until I looked this up.
  • About loops--While, DoWhile, For and ForEach--and when you'd use each one. Messed around a bit with trying to combine some examples.

Up Tomorrow:

Thinking to go off the rails a little bit. As a simple but creative test of what I've been learning, I have this crazy idea that I want to make a button-navigable, text-based RPG fighter that does some really easy damage calculation. From what I've seen, tweaking the GUI may be the hardest part.

Much respect for UI programmers.

6May/140

WUIS Worklog TUE 5/6

  • Started late, lost a big chunk of the day to exercise and housework.
  • But, hit up a few more scripting tutorials to get the brain back in gear.

Up Tomorrow:

5May/140

One Week Later, Thoughts

Last week, I set the flag down and declared I'd be learning C# while I wait out this strange inter-contract abeyance.

I haven't made as much progress as I've hoped to. And typically, what I'd do is beat myself up over that. Why hasn't this thing taken root?, Why have you wasted other time doing XYZ when you know deeply that this is the best thing for you--that your mind craves those challenges, actually, on the days you've elected to do something else? and other such self-eroding lines of thought.

But that's a useless way of looking at things. There are lessons to be learned in our failures (probably even more than in our successes!) if we can find the clarity to wall off the sting of it, step back and analyze why things have gone wrong. Maybe you'll see some of yourself in this post and in the days' upcoming work logs. I don't mean for this site to turn into a self-help resource, but I don't mind exposing my flaws if it might help someone else.

The truth is that aligning my mind and body to want to work at this thing every day in a world full of easy, alluring--ultimately unsatisfying--escapist options, is really difficult. And as darkly reassuring as it would be to think that I'm alone in that, I suspect I'm not. Success on this front means building up good habits, like keeping the whole Luca unit running well on meditation, exercise, and a healthy diet, three things I've found to provide a lot of stability and satisfaction. Reflecting on how those things help has built some momentum towards keeping them going, and their upkeep becomes easier. As an aside, I've found that those three together are critically intertwined, and I can't really skip on any of them without the others falling apart. So that's something to troubleshoot.

I think it also means giving in to the bad habits, though, and seeing where they lead you. By not forbidding them, you naturally start to see that they don't provide you with the same satisfaction that all of your good habits do, or that their effects are totally impermanent. You naturally start to trend away from them, even as you've given yourself total permission to explore them in the face of your less sexy productive options.

This is what I'm finding in the face of some clarity today. Long as I'm learning--be it C# or how to short-circuit my natural tendencies towards more consistent progress--it's all good.


I wanted to share this song with someone after rediscovering it this morning.

Hooray For Earth - True Loves from Young Replicant on Vimeo.

 

I find this track irrepressibly beautiful and hopeful in a way I can't easily describe. And I've felt this way ever since stumbling across it three years ago.

Every little element comes together in just the right way to serve the meaning I've ascribed it. The thin, unpracticed vocals and kitchen sink percussion; that impossibly low bass line and how it wavers on the edge of breaking some oscillator or amp. The one, single variation on that chip sound when it bends up and down on the final chorus. And the terrible amount of reverb that glues it all together.

A friend of mine put it well: "There are a lot of songs that sound like this, actually...but this one is special."

What I think it is is that this track feels like being young as you experienced it--not as someone looking back.

Thanks for reading!

30Apr/140

WUIS Worklog WED 4/30

No response to my Audiokinetic support post just yet re: being unable to preview audio within the Unity player due to an apparently missing .dll. So, forging ahead with exploring Unity as a standalone component, divorced of all audio. I'll loop back into trying to create a script that plays a sound on something as I gain a little experience. Frightened that I will probably have to start taking C# courses at some point.

  • Read through some basic Unity help stuff to familiarize myself with the various work areas / parts of the workspace.
  • Decided to check out one of Unity's recommended beginner projects--the 'Stealth' game--as a way to get me on rails. Realized from comments that a) the tutorial doesn't teach very well (apparently) and b) requires Unity Pro, which I'm not paying for yet. Started looking for another option.
  • Started in on an example Scripting tutorial from the Unity website: http://unity3d.com/learn/tutorials/modules/beginner/scripting/scripts-as-behaviour-components
  • Realized I hated MonoDevelop (the included and default .cs editor for Unity) already and endeavored to make Sublime Text 3 the new default. Turns out, there's a guide for that. Went ahead and followed all the instructions there, including configuring a .sublime-project file that filters out Sublime from seeing stuff it can't really edit (like images, materials, etc.) from the left-hand panel tree.
  • Worked through the scripting tutorials until a venture into uncharted territory led me into a wall.
  • After doing the Variables and Functions tutorial, I decided to try to branch out and figure shit out. I then hit a stumbling block while trying to make a function that could accept two parameters:

    Assets/Scripts/VariablesAndFuntions_Luca.cs(28,25): error CS0236: A field initializer cannot reference the nonstatic field, method, or property `VariablesAndFuntions_Luca.MultiplyVars(params int[])'

  • Looking that up took me to this Stack Exchange discussion, which actually didn't help me out of the jam. I'm thinking this is basic C# syntax stuff and I probably shouldn't be venturing into this territory just yet.

It felt good to actually make stuff. I've got a little cube that drops onto the floor!

I've realized it'd be neat to be able to embed the results of each day's work within a Unity Web Player applet on here, so I've got little bits of 'playable' progress I can look back on now and again.

Work will probably resume Friday, as I've got to help a friend move tomorrow.

30Apr/140

WUIS Worklog TUE 4/29

Nada.

Chumped out while waiting to see if anyone'd come knocking on my Audiokinetic support post.

Unrelated, but finished Gemini Rue. (Which was excellent, and I don't usually play adventure games.)

28Apr/140

WUIS Worklog MON 4/28

  • Installed Wwise, Unity.
  • Read through the Wwise Unity Integration Demo documentation and downloaded any listed prerequisites.
  • Created two blank Unity projects--one for sandboxing around and testing out the integration (WwiseUnityIntegration_v2013.2.5_Windows), one for specifically working with the provided demo (WwiseUnityIntegrationDemo_v2013.2.5_Windows).
  • Watched Craig Deskins’ helpful video on Wwise-Unity integration to get a better sense of how all this stuff links together--what folder structures Unity expects, what terminology’s being thrown around (“Scenes,” “Assets,” etc.), things like that. Video is possibly a little outdated, as Audiokinetic seems to have stepped its game up with the provided integration package in the last few years. But, it was still really useful!
  • Stepped through the Demo documentation until I hit my first stumbling block--a .dll missing when I attempt to play audio in the Unity player. Posted a question to the Audiokinetic support forums to try to unblock myself here. Compiling the game into an executable and then running that seems to work fine, but it’d be great to have audio working within the Unity IDE proper.

I’m realizing that I need a better sense of how Unity works on its own, apart from Wwise. And, that I’ll likely have to make a very, very simple game to stretch my legs.

So, I've decided to dive into Unity's own projects and tutorials for a better look under the hood, while I wait to see if anyone's got a solution to my Wwise audio not working. I'm thinking I missed some key redistributable / bundle of libraries somewhere in the setup process (running Windows 8.1), but who knows.