Jump to content
  • Advertisement
  • entries
  • comments
  • views

About this blog

Indie Dev

Entries in this blog


Moved my office today

Today I went to my co-working space in downtown Seattle and closed my old desk space. I had been renting a desk there for about 5 years, spending $400 a month. It made no sense to continue paying money for something I wasn't using anymore, so it was time to close down that operation. I am delighted to actually close it down though. Not only does it save me money every month, but it also means I can have my computer office at home now and I don't need to commute to a far away place to get work done. After I finish work at my day job, I can come home and do a little bit of work on my own projects  And now that I've got steady income, I don't need to worry about scraping together enough money every month to just barely get by, only to worry about it again the following month. So the barrier for entry for doing work is extremely low and there are no distractions. I'm excited. This is going to be fantastic. The hardest decision is going to be deciding on what to work on next (I have a lot of passions and interesting things to work on and I need to pick just one to focus on). I have also recently taken up painting. I have never painted before but it turns out I'm not too shabby at it. I went to a local paint studio where you can drink and paint for two hours in a group and it was actually quite fun! Check these out.

First painting ever:

Second painting ever:
There's some obvious novice mistakes with each of these and I don't have any practiced techniques down well, but I can't be too hard on myself given my lack of experience. Despite that, I'm happy with the results and only further practice will refine my skills and abilities. The lesson here is that just because you might be a technical person like me, it doesn't mean that you have forsaken other talents you may have. Programmers can be artists, and artists can be programmers! There is no rule saying you have to be one or the other but not both! In fact, I personally believe that being both creatively gifted and technically gifted is mutually beneficial to each respective gift. I can use my graphics programming experience to look at a scene and say where the lighting and shadows are wrong and apply that to painting to be a better painter, but at the same time, I can use the free wheeling, unconstrained creative side to come up with creative solutions to hard programming problems.   In terms of work at my day job, I've been doing fantastic. I learned a few weeks ago that I had an excellent review and facebook wanted to extend my contract by another six months. That's a good sign! Yay, less things to worry about for at least a few more months! I feel I have been very productive at work as well and facebook has been very supportive of what I want to do. In July, I requested $70k in computer equipment to build myself a render farm, and about a month later, it's up and fully operational! I have my own little lab! My wings are spreading and I'm flying I wish I could talk more openly in public, but I must err on the side of caution -- those details will have to wait for another day. I suppose I am now officially an indie with a day job. No shame in that  it's actually an excellent way to balance things, because the experience you get working professionally carries over to your own projects.




I'm quite happy

Things have been going really great!

* My moms chemo therapy is working. It's not a cure by any means, but it will buy her more lifetime. There's a very small chance that she might eventually get healthy enough to fly back to America. 

* One of the VR projects I worked on in Nov 2018 was recently nominated for an Emmy award. I'm sure the competition will be stiff, so I'm not really expecting it to win. I worked on the "putting it together" part, where I did the programming and tech platforms. A small, but important part of the production. To even have an app I worked on get nominated is quite a confidence booster though.

* My day job at facebook reality labs has been going fantastic. I really enjoy the work I do and the work culture and atmosphere is fantastic. My team is great, there are no insane schedules and no mandatory overtime. We have a cafeteria which makes 3 meals a day, loads of delicious food and snacks, and the vending machines give you any computer hardware you need (mice, keyboards, cables, etc). IT helpdesk is super helpful too. This place is probably going to be the standard I use to measure working for other companies. I can't talk about what I work on though. Maybe that'll come out years down the road when & if its all public. That's one thing I miss about doing indie work: I could talk about anything I wanted to any degree of detail.

* Weather has been nice, can't complain. My car works again. My commute is a glorious 4 miles away (10 minute drive).

Unfortunately, I've been slacking a bit on my other side projects due to lack of time and energy. That's what day jobs do to ya




The only constant in life is change.

Games are art.
Art is created by artists.
Artists are people.
People have lives outside of their work.
Our personal lives can be messy.
Parts of our lives are reflected in our art.

I've been thinking a lot about life lately. My personal life has been going through some pretty radical changes in the last few months. When it comes to tech, I often say, "The only constant is change" followed by "if you aren't changing, you're not growing, and if you're not growing, you're dying. Complacency kills!". I think this also applies to life in general. When life changes, it has second order impacts on other things. 1) I started a contract position doing research and development in VR for a very large and well known social media company. It is now my 'day job' and my indie game projects are a side job I do when I have time. I am realizing that the day job takes up a LOT of my time when I factor in any overtime work and the time to commute between my work and home. The steady paycheck is nice though and it helps me worry less about money in the short term.
2) I ended my long term relationship with my girlfriend recently. It's sad and it sort of turns my world upside down, but it was time: We're quite different people and our lives were moving in very different directions. I won't get into it out of respect for her privacy.
3) I moved closer to work in order to reduce my commute to 15 minutes. It took me 3 hours to pack everything I owned and 30 minutes to unpack it all. It's a bit disappointing that my net worth doesn't amount to much, but the materialism of possessions has never held a lot of importance to me.
4) I found out last week that my mom has been diagnosed with terminal cancer and doesn't have much time left to live, so I took emergency leave from work and flew out to Europe to say goodbye. I'll never see her again. How do you carry on when the person who has looked over you, cared about you, worried about you, protected you, given you life, dies and is gone forever? It's heart breaking, but death in the family is inevitable and unavoidable. I suppose its better for children to bury their parents than for parents to bury their children, and I can be thankful to have had the opportunity to say goodbye.
5) I've started writing a fiction book about a princess and a dragon. With many of these life changes, distractions and tragedies, I am wondering if I still work in game development? It's certainly not a daily activity as it has been for the last few years. Do I care? The scary answer is that I'm not sure. I can totally understand why other game developers would say that they're "taking a break for personal reasons". My day job is tangentially related to the game industry and I'm pretty happy with it. I've also been hearing a lot about how abusive and exploitative game studios are to their employees and I'm not really sure I'd want to work directly for most studios. My sister and 14 other people were recently laid off from a mid sized game company in the VR industry -- a company I also interviewed at in September. I dodged a bullet there. The game industry as a whole makes me a bit wary. The hours are long, projects frequently are mismanaged and go into crunch time, the pay is low, some players are toxic, send death threats and abuse to devs, released game success seems to be based on luck which creates a lot of uncertainty... why would you want to be on the receiving end for any of this? Is the 'entertainment' element really so compelling that it would override all the other industry problems?

Anyways, I'm going to be writing a novel and working on my games on the side. They're my creative outlet. I don't know what that makes me but the definition probably doesn't really matter.




Ace Pilot Game

So, to get started, the beginning of this project is a funny story: During Christmas, my brother bought me a hand full of games that he saw on my steam wishlist. Just for a joke, he bought me a game called "Hentai Girl Linda" for $0.99. As you can probably guess, it's anime porn. I played it for about 15 minutes, trying to understand the appeal of it. It's a stupid "game", if you could even call it that. It is essentially a digital puzzle which you assemble by moving image slices together to form a complete image, and low and behold, it's a half naked anime girl. And then you can click a button to make her fully naked. I think looked at the reviews, because usually that's a good indicator of sales numbers. My rule of thumb is to take the reviews, assume only 10% of customers will write a review, and then multiply the review count by 10x to get a rough estimate on sales numbers. This dumb game had 1,125 reviews, and if it was selling for $1, that means the developer made around 11,250 sales, or $11,250 (before steams 30% cut). Wow, that's nothing to scoff at... So, I forgot about the game and a few weeks later, my friend Stuart (a game artist) is browsing steam and he gets a game recommendation... for the hentai porn game because his friend (me) played it. We both laughed about it and talked about how easy it would be to make a dumb game like this in less than two weeks and cash out $10k. The idea of making $10k in two weeks sounded kind of appealing, but I didn't really want to make an anime porn game. I decided that I could afford a distraction for two weeks though, if it meant that I could make some extra money on the side. Who can't afford to give up two weeks to try something out, right? So I decided to come up with a challenge: Can I make a polished indie game in two weeks and launch it on steam? (Spoiler: The answer is "NO"). But this launched my indie game dev challenge. I have realized that one of the biggest challenges for all indies these days is marketing and visibility. You can launch a great game, but if nobody knows about it, it might as well not exist. And if you're an unknown indie trying to make a game people might enjoy, then huddling in a dark corner in obscurity is 100% the wrong approach. So, on day one, I began my game by thinking about marketing. How do I market my game? What will sell? What are people interested in? What can I build which people will buy? What promotional material will I use to get eyeballs? Obviously, the hentai porn game has a very clear hook: Sex sells. This really shouldn't be a surprise for me, but it really is. But, if sex appeal is just the gimmick to get eyeballs, what is the substance that keeps people as fans? The $.99 hentai game kept me entertained for 15 minutes and I never played it again, so in my book, that is a failure. No matter what new updates or features the developer implements, I'm unlikely to ever launch the game again to see them. The key conclusion to make is that a game will need a little more substance to get people to be repeat players. And if people are repeat players, they must enjoy the game, and if they enjoy the game, they'll be happy customers who get value out of your product, so if you release additional products with the same or better value, you'll get more customers and a community of loyal followers. The more loyal customers you have, the less of a steep climb you'll need to make for future marketing campaigns for future game releases. That's my reasoning, anyways. Cultivate a reputation for satisfied customers. Anyways, I told Stuart that I was going to be serious about this. No half-assed efforts from me. Go all the way or don't do it at all. I came up with a few game ideas that I felt I could pull off in two weeks and could market effectively. I worked backwards from the sales pitch to design my product. I think usually, indies do it the other way around: They build whatever they want to make, and only after or near launch, do they start to think about marketing and how to sell the game (if at all!). The risk is that the indie dev will build something that appeals to them personally, but their tastes are so eccentric that whatever they made appeals only to eccentric indie game developers and not to a broad market -- and the sales probably reflect that? Build what sells. Your own personal tastes are not a barometer for market desire (though your intuition can be a source of good hypotheses).

I settled on an idea based off of a half-hearted attempt I made in XNA about a decade ago using sprites drawn in MS Paint. You flew an airplane and shot bullets and dropped bombs. I remember getting stuck on the physics of flight, digging deep into research on wing shapes, aerodynamics, thrust, lift, drag, gravity, angles of attack, etc. I got lost in the complexity and that caused the project to stall. But I didn't stick with it, I didn't have the drive to see it through to the end. I didn't have the maturity or stamina. Now, I'm different. I'm a professional (haha, is that a delusion?). The game concept was fun, so if I take another stab at it, maybe I can make it work this time. It was also inspired in part by a really old game called "Sopwith", so at least someone proved that the concept works. I can dress it up a bit and add a lot of polish. That should be pretty easy to do and still be marketable, right? That should be an easy two week project... right?? Well, I already knew that us programmers are terrible at assessing scope of work and from past experience, I know I'm terrible at it too. Even in professional work, my ball park estimates can be quite off the mark. But, it's still good to try to work with something rather than nothing, because it lets you look at a feature list and think about how long each item would take and then cut features until you hit your desired schedule (or vice versa: increase your schedule to hit your features, but never work harder and longer to add more features under the same schedule). I figured that this project would be a good litmus test for whether I was actually any good as a developer and entrepreneur. Why don't I make all the mistakes and #*@! ups on a super small project with lower risk, learn a bunch of hard lessons, and then carry those lessons to a bigger project where I have less tolerance for failure? What am I doing wrong? What are the flaws in my approaches to development? flaws to approaches in business? flaws to my approaches in marketing and sales? what can I learn more about in terms of leadership and people management? What are my "fail fast" lessons to learn? Anyways, as a part of my developer challenge, recognizing that marketing and visibility is going to be my biggest challenge, I decided to document my daily game development progress with youtube videos. It'll keep me honest and accountable to making meaningful daily progress, while also serving as a speck of visibility on the project and providing illumination into the game development production cycle (from an indie perspective, AAA is a very different beast). During the project life cycle, I have added two team members: John, a junior UX designer is working part time on level design and user experience, and Stuart is going to help with art (though I will have to produce programmer art as well). I'm already learning more about managing people and coordinating efforts, which is always new territory for traditionally solo developers. I'm also slowly getting better at talking in video, though my voice is still too soft spoken.

Here are 16 days of video so far (not counting weekends and snow days):
DAY 1: Day 2:   Day 3: (skipped)
Day 4:   Day 5:   Day 6-10: Day 11: Day 12: Day 13: Day 14 & 15:   Day 16: (Today)  




A wild thought appeared

This morning I went for a long drive. I started thinking about image recognition. The question is, "How can you train a computer to recognize a common image pattern, even if many parts of the image change?" In other words, can we teach a computer to recognize and identify memes? The thing with meme images is that they usually reuse the same image and people post different text overlays on it. Here's an example:

Here's another example:

So, if you took both of these images and just hashed them with MD5 and stored the result in a database somewhere, and then only looked at the hash value, you would have no way of knowing that these are practically the same image but with minor variations. How could you devise a better way to know what you're looking at and whether its similar to other things? And why would you want to?

This is probably a solved problem and I'm probably reinventing the wheel -- and much more inefficiently, as first attempts tend to go. I imagine that many much smarter engineers working at facebook and google have already solved this problem and written extensive white papers on the subject, of which I am ignorant. But, I think the journey towards the discovery of a solution is half the fun and also a good exercise. It's like trying to solve a math problem in a textbook before checking the answer in the back of the book, right? The point isn't to get the answer, but to develop the method... So, onwards to what I came up with!

My initial thought was that you'd just feed an image into a machine learning neural network. If the network is big enough and the magic black box is complicated enough, and we give it enough repetitions in supervised learning, maybe it can learn to recognize images and similarities between images? But that sounds really complicated and I don't like things that "just work" and by unexplainable "magic". It's great when it works, but what do you do when it doesn't work and you don't know why? What hope would you ever have of diagnosing the problem and fixing it? Maybe neural networks are enough and I'm unnecessarily overthinking things, but that's the fun of it. What if... instead of taking a hash value of the complete image, we created several hash values of subdivisions of the image? We could create a quad tree out of an image, and then generate a hash value for each quadrant, and then keep repeating the process until we get to some minimum sized subdivision. Then, we can store all of these hash values in a database as an index to the image data. To test if an image is similar to another, we just look at the list of subdivided hash values and see if we find any matches. The more matches you find, the more statistically likely you are to have a similar image match.
Of course, this all assumes that the images are going to be exactly the same (at the binary level) with the exception of text. If even one bit is off, then the generated hash value will be completely different. This could be particularly problematic with lossy image formats such as JPEG, so doing hashes of image quadrants may not necessarily be the best approach. But, what if we looped back to our machine learning idea and had a neural network be specialized at recognizing subsections of an image and recognizing it, despite any lossy or incomplete data? The tolerance for lossiness would make it easier to correctly identify an image subquadrant and match it to a set of high and low resolution image quadrants.

But now, this is where it gets interesting.

What if... when someone uploads an image online, rather than storing the whole image, we subdivide the image into quadrants and compare each image quadrant against a set of existing image quadrants? The only data we would upload would be any image quadrants which had no matches in the database. The rest of the image data would just be stored as references to the existing image quadrants. Theoretically, you could have some pretty intense data compression. That 1024x1024 32 bit image (~4.1Mb), could be 90% represented by pre-existing hash values representing image blocks in the database, and you'd be looking at a massive reduction in disk space usage. Rather than storing the full image itself, you'd be storing the deltas on a quadrant by quadrant basis, and as people ask for any image, it gets reconstructed on the fly based on the set of hash values which describe the image. And, if you have this way of laying out your data, you can create a heat map of which data quadrants are more popular than others, and then make those data quadrants far more "hot" and accessible. In other words, if a meme or video goes viral and needs to serve out a billion views, you would want a distributed file system which makes thousands of copies of that data available on hundreds of mirrors, and then let a network load balancer find the fastest data block to send to a user. The more frequently a block of data is requested, the more distributed and readily accessible it gets (with an obvious time decay of course, to handle dead memes). And in the best case scenario, if someone uploads an exact copy of an image which already has a hash value match to something else someone uploaded, we just create a duplicate reference to that data instead of a duplication of the data itself.

Then, the question becomes: How and when do we delete data? If there's a dead meme, that's one thing. But what if someone uploads naked pictures of me to the internet and I want them deleted (just to personalize the stakes)? Both are use cases that need to be handled elegantly by the underlying design. In the case of dead memes, we would enforce a gradual decay timer based on frequency of access to each data block. If a block of data hasn't had a read request for months and we have 4 copies, maybe we can automatically delete three of those copies to free up space without completely deleting the data? If a user uploads an image, they don't "own" the image, but rather they're given a hash value which represents the composition of that image, which may have data blocks which are shared by other users who uploaded similar images. A "delete" action by this user would only delete their hash link rather than the underlying image itself. Maybe we also maintain a reference counter, such that when it reaches zero, it gets marked for garbage collection in a month or so?

In the case of someone uploading naked pictures of me, where removing the image is more important than just deleting references to it, there would need to be some sort of purge command which not only deletes all references to all data blocks, but also deletes the data blocks themselves, so any future read accesses will fail. This would be a dangerous section of code and would need to be done very carefully, with security and abuse in mind. But, that raises another question: who gets to decide who gets 'delete' access and who gets 'purge' access? Do you own every quadrant of an image you upload, even if its shared among other related images? Let's say a vicious person took a naked picture of me and uploaded it to this cloud, and then I go through the process and get this image purged. What's going to stop this vicious person from uploading the image again, and causing me new headache and harm? Ideally, we'd like to block the vicious person from being able to upload the image ever again. But, in order to do that, we'd have to know that the data someone is trying to upload has been deemed "forbidden" by the system before we can block it. And how are we to know a block of data is forbidden without comparing it against an existing dataset? To be much more specific towards a real world problem, let's pretend that someone uploads child porn to our image cloud. They use the network to distribute the CP to other pedophiles as quickly as they can before it gets found and shut down. The server owners find and immediately purge the content as quickly as they can and want to block any further attempts to upload the same content/material, but they run a bit of a challenge: In order to know what content to block, you must store copies of the content to recognize it, and that ultimately would mean that you're still storing child porn on your servers, which would then get you into legal trouble. I think my quadrant based hash value idea would still be an elegant way to resolve this. Instead of storing the data itself, you store a list of banned hash values. If, during the image decomposition, one or more of the hashed image quadrants match a list of the banned image values, then you reject the complete image. If your hashing function has a one in a trillion collision rate, you don't really need to worry about false positives (provided your quadrants don't get down to the granular level of individual pixels).
The other danger is that someone is a bit too liberal with the "purge & ban" button. Imagine that an artificial neural network isn't used just for pattern analysis to identify images and image quadrants, but also to identify paragraphs, sentences, and words in blogs, forums, and message boards. If someone posts copy/pasta which matches a forbidden topic, such as "Falun Gong" or the "Tianamen Square Massacre" in China, this sort of system could potentially be used by authoritarians to squash free speech and ideas which they don't like. That could ultimately be more dangerous & damaging in the long run for the flourishing of mankind, than a permissive policy? Imagine it gets really crazy, where the home owners association for your neighborhood has legal authority to silence anyone, and someone petty with a spiteful bone to pick decides to get happy with the "purge & ban" button with a neighbor they don't like? Obviously, the room for abuse on both the admin and user sides will need to be very carefully planned and designed. For that, I don't have easy technical solutions to people centered problems... Maybe in this case, a diversity of platforms and owners would be better than one large shared cloud? But maybe that's just trading one problem for another.

Anyways, this is the kind of stuff my mind tends to wander towards when I'm stuck in traffic.




Shipped a pilot

(Warning: Rambling ahead!)

I met a new client in the beginning of November through a friend. The client asked my friend if he knew how to use Leap Motion. He said, "No, I don't, but I know the just guy who does! Eric is probably one of the best Leap Motion developers in the country.", and a referral was sent my way! I need to remember to buy my friend a nice dinner as a show of thanks. Anyways, this project was interesting for a variety of reasons. First off, the bulk of development was being outsourced to Ukraine. The outsourcing of work meant that the project owner needed to work late into the night to coordinate efforts with his Ukraine team. They were having some problems with the wrist joint causing the mesh to twist (candy wrapper effect) and nobody was making much headway. So, I was brought into the project. I downloaded the full project, tried it out to see where they were at, saw the problems, and then I started looking at the implementation. Pardon my unprofessional trash talk here, but the implementation looked like it was being held together with bubblegum and duct tape. I told them that I was going to redo the project. It was such a simple project that it took me about two days to rebuild. I was able to simplify, condense and cut about 75% of whatever those Ukrainian guys did, and it was a "correct" implementation which was maintainable. It was valuable as a throw away prototype, but for production work, it needed to be redone. I told them, "If you can't tell the difference between what I did and the original, it means I did my job right." This is always a tough sell for non-technical people, but you see the real value as the project progresses. When everything is done right from the very beginning, you skip over lots of problems you would have otherwise had (which costs time, energy and money). As far as project implementation goes, this was a super easy project (for me) because I had already done several similar projects and had built out a template library to use. The hardest problem was actually dealing with the wrist and elbow joints with leap motion. So, I'll describe some of that pain here:

The initial problem was that when you rotate your wrist (roll along arm axis), the wrist bone rotates but you start to get some pretty bad deformation of the arm mesh, to the point where the wrist gets pinched to look like a candy wrapper. The problem was a combination of technical implementation, incorrect rigging, incorrect mesh weighting, and a bit of fighting the leap motion plugin. Fixing the problem can be sort of described as trying to straighten wet spaghetti noodles, because so many different factors contributed to the problem. There was no single silver bullet fix that magically fixed it all. My greatest secret weapon was my strong debugging skills and approach to debugging. Although my client liked to call other experts with industry experience, they could only do vague hand waving and guess work at the causes of the problem. The true, best way to figure out what's going on is to dig into the problem, get deep into the weeds, add a ton of debug scaffolding code and visualization helpers, and really spend the time and effort to look at what's going on. A slow, methodological, scientific approach is tried and true for me and far more illuminating than the guesswork of experts unfamiliar with the project.

As far as skeletal rigging goes, I ended up downloading a freely available Paragon character with exposed arms with rotating animations. I looked at the bone setup. To fix the candy wrapper effect, you need two twist joints in the arm, parented off of the elbow joint. The wrist twist joint needs to be about 1cm away from the wrist. You also need a forearm twist joint in the middle of the arm. When you apply roll rotation to the wrist, you only apply roll to the wrist twist joint but yaw and pitch are handled at the wrist joint itself. You also need to take about 50% of the wrist roll and apply that to the forearm twist joint as well. Otherwise, you start to get bad mesh deformation and loss of volume. You also need to be very robust with your mesh weighting on each of the bones. It's good to use a working reference model to get an approximation on the best vertex weights.

There were also some challenges with the out of the box leap motion plugin as well. The problem is that you get the wrist transform, but the rotation values are for the wrist joint itself, not for arm twist joint roll values. I discovered that I needed to derive my own arm aligned wrist rotation, relative to the elbow position. The rotational value needs to be independent of wrist pitch and yaw. Anyways, I won't get into the vector math required to do that, but I ended up having to derive these rotational values myself. It's important to note that the wrist joint is being driven by the user (via IK) and the elbow is an intermediate joint, with transforms being set by the IK solver. The user can put their arm into any position and contortion, and the virtual arm you present needs to match as closely as possible with the physical arm location. This is really hard to get right because the animations need to support *anything* the user does -- any popping or glitches are obvious and break immersion. Doing good elbow placement with limited data has been one of the harder challenges facing most VR developers, so it hasn't been a well solved problem. Most VR developers will skip it all together and just show people a pair of disembodied hands at the motion controller locations, but if you are trying to use a full body avatar for the player character, it's a problem you eventually need to solve. I think I did a pretty good job on the elbows.

I also made a discovery about the hardware capabilities of leap motion: Though this shouldn't be a surprise, the leap motion has great trouble finding elbow placement when people are wearing coats or sleeves. If you want reliable elbow tracking, you need to take off your coat and roll up your sleeves. You also need to be very aware of bright light sources in your environment because those light sources will interfere with leap motion. Keep in mind, the leap motion uses an IR camera to to track hand gestures, and the HTC Vive uses two laser base stations which emit IR lasers, so there is a slim chance that you can get laser base station interference, depending on placement and what direction you're looking. And... if it's not obvious, sunlight causes bad tracking environments for leap motion.

Anyways, I nailed it on this project. You can pretty much do anything with your arms and the digital avatar will do the same thing. I'd show a video of the result, but I think the NDA restricts me from showing that. I don't think I'm the "best" leap motion developer in the country, but I'm firmly in the top 10%. My bigger worry about Leap Motion right now is the health of the company and what that might mean for their product. Are they going to be in business two years from now? Who knows. But, the library of content built for their hardware platform is slowly growing.

On a VR production side note, I made an amazing discovery in this project. If you setup an Oculus to work from your chair, you can develop in VR using the built-in desktop virtualization app. As long as you can type without looking at the keyboard, you can develop in VR. Instead of having a 17 inch monitor, you can have a 5 foot screen in VR. And if you want, you can drag out windows and surround yourself with as many screens as you want. This taxes the GPU a little bit, but who cares? The beauty about this is that if you're developing VR content, you don't have to keep on putting the headset on and off between development iterations. Since you're already in VR, switching between your IDE and your VR app is reduced to a single button press. I worked like this for several days to see how I liked it and if it was feasible. I thought I'd get sweaty face, eye strain, or have some other related draw back issue. Aside from not being able to see my keyboard, it was pretty solid! There are small preference issues I'd like to change. I prefer to listen to music on youtube while I work, and when I work in VR, I am stuck with the ambient music in the oculus home environment, and switching between IDE and project switches the audio (this should be a preference). What's extra magical about working in VR is that it has a pair of headphones and a microphone embedded into the hardware, so if you wanted to do a VoIP call over Google Chat and do screen sharing, you can do it all in VR without taking off the headset! I truly believe this is going to eventually become the future of how people work and interact with computers and each other. I feel like I'm on the bleeding edge here and I saw a glimpse of the future, and damn, it looks awesome!

In closing, this project was relatively small and simple. I was instrumental in shipping it. I feel that I have a fantastic relationship with my client, they are extremely happy and impressed with the work I did, and I will be their go to guy for future VR work. This is how you get repeat business and build a financially self sustained company. Now, if only I knew how to market myself... There's another potential upcoming VR project with a much bigger budget that I am extremely excited about. I can't go into details, but I will say... if we get this and pull it off, it's going to create a new industry and there will be lots of magazine articles written about what we did. My experimental research work in AI will not be wasted.

As far as Spellbound work is concerned, I still work on it on the side, between projects. Since this is going to be mostly a story driven VR game, I've been focusing a lot on the story writing. It feels weird to open up a google doc for my game story and say I'm going "game development". It's creative story writing, not code writing. And... it's just as hard. I've gone through probably 10 different iterations of the story so far and scrapped most of them. I'm finding that the story writing for VR is extra hard and takes a LOT of time. You need to write it like a movie manuscript, but you also need to think about presentation and the fact that the story is not consumed linearly. If you're an indie on a budget (like me), then you need to consider that every word costs money and player patience, so if you're excessively verbose, it's going to be expensive and nobody wants to sit through long, boring performances. You also have to consider the localization angle: If your scripts have lots of sophisticated word play and language based puns, you are going to hate yourself when you need to localize for different audiences. Short, simple, sweet, to the point, well worded. A story isn't about how flowery and eloquently you can write your sentences, it's about retelling a sequence of emotional events which leaves an impact on your audience...

I recently realized that the story writing doesn't need to be done from an omniscient point of view where you tell every important detail, it can be done from the point of view of the story writer (an in-game historians perspective, if you will) who has a limited point of view. This let's me skip details up front, hide them a bit, and do a big reveal later on in the plot as a twist in the story. With this style, you can experience the story twice and see the plot structure and make new sense of various setup clues (similiar to how you can watch the movie "The Sixth Sense" twice and get two completely different viewing experiences).

Here is the dressed down storybook intro for Episode 1 in Spellbound:

[This is the story book intro. It is presented as a series of illustrated pages in a book and is read by a narrator. We have accompanying voice over lines and sound effects to go along with the story, so that it feels almost like a cinematic.] Page 1:
Thousands of years ago, evil wizards and witches opened the gates to hell. Swarms of demon spawn entered into the mortal realms, lead by the arch demon Asmodeus. Page 2:
No army could stand against the demon spawn. Cities were reduced to rubble and ash, tens of thousands of people fell to their blades like wheat to a scythe... Page 3:
When all seemed hopelessly lost to darkness, the eastern horizon erupted in a blinding glow of shimmering light. Asmodeus was no more, and his leaderless demon spawn retreated to hell. Page 4:
Nobody quite knew what happened or how they won, but one thing the remaining kings agreed upon was the outlaw of magic and the execution of all its practitioners. Page 5:
People were finally safe again... all but for wizards and witches. For thousands of years, those who even *looked* like they could be magical, were hunted down and killed in every kingdom. (Short pause / transition break for establishing shot) Page 6:
On the edge of the Blackwood Forest, in a small hamlet named Halfordshire, a humble pair of farmers welcomed a new boy into the world. After seeing his fire red hair, Father named him "Rupert". Page 7:
Rupert grew up, as all young boys do, and trouble followed naturally, as it does with all young boys. Page 8:
But the natural troubles of boyhood soon turned into supernatural troubles which seemed to haunt Rupert everywhere he went. In a freak magical accident, his home was utterly incinerated. Only Rupert survived.  Page 9:
As he stumbled out of the smouldering cinders of his former home, the villagers could see that not even one red hair on Rupert was burned. Was it a miracle? Page 10:
As the initial shock wore off, villagers began to shout that he was a witch. Fearing for his life, Rupert ran, and he ran, and he ran, deep into the Black Forest. As day turned to dusk, the village hunters abandoned the hunt. Page 11:
Rupert survived through the night, wandering through the forest for days, getting hungrier and hungrier. He stumbled upon an old tower of crumbling stone, and made it his new home and lived off of whatever edible bark, berries and mushrooms he could find in the forest. Page 12:
Rupert lived in the crumbling stone tower for years, completely alone. Whatever was haunting him, seemed to follow him everywhere he went. What he didn't realize is that the next morning, his life would be changed forever...




Kissing rock bottom

This may be one of the harder, more difficult entries to write. I am almost tempted to not even write it, but I've convinced myself that every step of the journey is important. Almost exactly a month ago, I hit rock bottom. I was completely broke. I had nineteen cents in my bank account. My credit cards were maxed. I had next to no food in the cupboards. No gas in the car. My bus pass for community transit was empty. I was so poor that I couldn't afford the $2.75 to take a one way bus trip to my office. And if I did, I also couldn't afford to spend $8.65 for a lunch burrito. If I wanted to take the bus to the office, I would have to sneak onto the bus and keep a wary eye out for fare enforcement officers and hop off the moment they get on (happened a couple times). The only food I had for days was dried quaker oatmeal. Put a bit of it into a bowl with water, microwave it for 2.5 minutes, and then take it out, sprinkle some dried oats on it and try to mix in a pinch of brown sugar. I ate just that for days. Have you ever felt like your stomach is full but you're still starving? That's what eating the same food every day feels like. Trust me when I say this, there is no #*@!ing glory in being a starving artist. I was down hard. I was literally starving, eating oatmeal twice a day to conserve food. I needed to hatch a plan to make money. Whatever I've been doing, it wasn't working out. I need a new plan. Normally, I'd lean on my girlfriend for help, but she's down hard too. The best she could do was loan me $50. I went straight to safeway and I very carefully wandered the aisles looking at how much food costed and what I got for my money. What gives me the most nutritious energy for the least amount of money? Canned soups cost $2.30 each, there was a 2 for 1 deal on loaves of bread, a dozen eggs are ridiculously cheap, a quart of milk is a little over $3, etc. If I cook my own foods, it's a lot cheaper than anything else. Cheap eggs, milk and bread? It's time to feast on french toast! I made that $50 stretch really far and bought over a weeks worth of food supplies. But what happens when the food is all gone? Then I'm back to square one, back to starving. So, the $50 of food is a loan, not a grant or gift. I need a better plan. I decided I would go to the Sunday farmers market and setup a table and sell my girlfriends wine openers to people. I got some stock. I got a folding table and an old tent, a metal folding chair, and a demo stand. All of the previous booth props were stolen by my girlfriends former business partner. No signs, no props, no table cloths -- nothing! I had to do everything from scratch and start over. The booth fee costed $60, and by the grace of god, one of my credit cards was just barely not maxed that morning. I could pay the booth fee. Then, I didn't have a bottle of wine to demonstrate with either. And the table I had was covered in various paint splatters and looked like it had obviously been pulled out of a storage closet (it was). I almost couldn't even run the booth! I bought the cheapest bottle of wine I could find. 10am rolls around and the street fair begins. Throngs of pedestrians show up. I don't have a table cloth to cover the hideous table I brought. I spend 45 minutes walking all over town looking for a place that could sell me *anything* to cover my table with. Meanwhile, I'm beating myself up for being so stupid and short sighted as to not bring one from home. It was costing me 45 minutes and whatever the cost of a table cloth would be! I finally found a lady at the street fair who could sell me some sort of cloth for $25. One credit card swipe later, I'm in business. Without a doubt, I have the shittiest booth in the whole event. It was so miserable, people would want to look away and at something else more interesting. I'm just one random scruffy looking dude standing behind a forgettable table with a forgettable product. I borrowed a total of $100 from my credit card for the privilege to stand there. I had not eaten that morning because I had no food. My credit card was surely maxed, I couldn't even buy a black coffee if I wanted one. I had $0.19 in my bank account. I was starving. The reality was, if I wanted to eat, I would have to #*@!ing *sell* product. There is no standing around waiting for people to maybe stop by my shitty booth. It's shitty, nobody is going to be curious to stop by and window shop when there's an ugly window and nothing appealing. If I wanted to eat today, I had to actively pull people in and sell. Nothing else but me was going to bring in sales.  I took that on as a challenge. I told myself, "Eric, it's time to see what you're made of. Can you really sell, or do you rely on crutches like a pretty booth?" Fortunately, I've had a smidgen of direct sales experience. I've given the same demo thousands of times. I knew the pitch by heart. I knew all the jokes. I could put on a performance. I knew how to work a crowd and draw people in... sort of. People are not going to buy from me because they like my product or like my booth, they're going to buy from me because they like my demo and I entertained and wowed them. Or... so I believed. An hour went by. Dozens of demos, but not a single sale. My stomach is grumbling. Another hour went by. Still, more demos but no sales. Two hours, and not a single dollar?! Did I just waste $100 of food money to make nothing?! I was starting to wonder if there was something wrong. Were people truly not buying from me because my booth presentation sucked? No way, I can't believe that. I was giving dozens of demos and people were amazed by the product and laughing at my jokes. It's just a matter of time and patience, and someone will open up their wallet. Finally, my first sale happened. It was a credit card purchase for $30. Damn, no cash -- that means I can't eat. But hey, I got a sale! It was validating! People would #*@!ing buy because of me! my shitty booth didn't matter! My waning confidence was restored! I could do this! And gradually, the sales started coming in, one by one. Finally, someone paid cash. I had no change, so they had to pay exact price. The moment they gave me money, I let them leave and then made a beeline to the nearest food truck and bought some sort of Hawaiian food. It was greasy and disgusting, but hey, it was food. I ended the day with a total of $260 in sales, $60 of which was cash and enough to buy another weeks worth of groceries at Safeway. I could survive for another week at least. And if nothing happened, I could do the fair event again the next weekend. And maybe upgrade my booth with a nicer table cloth? It was going to be desperate times and pure survival mode. My office rent got processed a few days later. My bank account was now $400 in the hole plus a $25 NSF fee. Rent was late. Things were starting to look grim again. Then, something amazing happened. A friend had met someone who was looking for someone that knew how to work with Leap Motion for their project, so he referred them to me. He told them that I was one of the best people in the country (I sort of am). I told my friend that if this goes through, I'll buy him dinner. So, I talk to the client and figure out what's going on. They're an established VR / film company based out of LA and they're having trouble with twisting at the wrist with leap motion and their character model (candy wrapper problem). I told them I'm a freelancer and could help them with their project. So, contracts are quickly signed and I take an initial down payment of $500 (yay, food and bus fare!). The client asks me how my VR work is going, and I reply, "Well, it's a bit of feast and famine cycle..." and he said he knew exactly what I meant. He had no idea how hungry I was. But, what an opportunity! The key thing to realize about freelancing is that it is ALL about building a solid reputation for making happy customers. Be an excellent professional. Work hard, work fast, work smart, get along with everyone, and bring value to your client. If you can do that, you will get a good reputation and have an established, healthy working relationship. That means repeat customers, more business, and good referrals -- which mean even more customers. The same principle of actively selling product behind a shitty booth applies to selling yourself and your services -- delight your customers and present them with something of value greater than their money. This is so key and fundamental to business, you must learn it. If an MBA degree doesn't teach you this, you need to ask for your money back.

It turns out that this arm twisting problem was much more difficult than anyone had expected. You have to have two twist bones parented to the elbow, the mesh needs to be weighted correctly, and then you need to read the leap motion bone transform values and apply them to your skeletal rig in real time. The problem is, the only constraints people have on their arms are their physical limitations. An arm and wrist can be oriented in all sorts of funky directions, and if your approach can't handle them all, you get deformed arms, it looks bad, and it breaks the immersion of virtual reality. It's much harder to get perfect than I anticipated. The project itself was relatively simple. This guy had hired a Ukrainian development team to build his app. I looked at it and it looked like it was something barely held together with duct tape and glue. I rebuilt the whole thing in two days using the old work as a prototype, but this time I "did it right". I told my client that if he can't see a difference, I did my job right. He couldn't. Now, some dumber business people might say, "It looks exactly the same! What am I paying you for?!". This guy was smart and technical enough to see how much everything changed under the hood and how much more elegantly simple it was. It's maintainable! And it can change to meet new requirements without falling apart and costing lots of extra time and money to fix! Anyways, to take one step forward, sometimes you have to take two steps back. I ended up taking over development for the project. Sorry ukrainian devs! I ended up finishing the project much faster than they had scheduled. As of today, it's done! The client is ecstatic. Everything works perfectly and it looks amazing! The project is a pilot project for a VR film series, so if my clients client gets funded to produce the series, I think I'll have a lot more work in my future. The total pay for this project was $4,500 and took me about 10-14 days. That will be enough to pay my late rent and buy enough groceries. Whew! No more eating oatmeal for the near future. The extra good news is that this was a "small" project and there are much bigger ones on the horizon. There's a sliver of a small chance that I might actually be able to build a financially sustainable business out of this VR stuff. I must be extremely careful though: If you only rely on one client for your bread and butter (literally), if they go away, you starve. So, I must be sure to diversify and broaden my client list so that losing one doesn't cause me to starve. And, if I'm going to be thinking ten steps ahead here, I should eventually take on an apprentice and train them to become highly proficient VR developers. This would allow me to take on bigger future projects and offload some work to my team. Also, I learned a very, very important lesson about money management: Never, ever repay a debt to anyone if it means you're going to go hungry. They can wait, hungry bellies can't. This is the crucial mistake I made which made me go hungry for a week. I thought it was important to not owe anyone anything. As an ideal, it feels great to be debt free, but a hungry stomach doesn't give a flying #*@! about lofty ideals (A hungry belly also doesn't care about any pathetic excuses for why you won't sell). The other super important, crucial thing to remember is that a business is ultimately about making money. Whether you're an indie game developer, working for a AAA game company, or working in any other industry, your job/company must make more money than it spends or else it will starve and go out of business (and you'll be jobless and starve too). Think very carefully about whether you're adding value to your company, whether other people are adding value or not, and what needs to be changed in order to stay profitable. The size of your company doesn't really matter. In fact, bigger companies can be dangerous too because people get comfortable, and comfort breeds complacency, and complacency kills, especially when it becomes a cultural norm at the company. Sometimes, having a lot of money is a curse too because it shields you from facing harsh realities and changing course when things aren't working. If you look back to my very first blog post, you'll remember I started my adventure as an indie game developer with $500,000 in my personal bank account. Today, although I'm still very poor, I feel I am better armed, wiser and better poised to become successful and profitable than the day I started. The adventurous journey towards financial sustainability (and eventually profits) in a tough industry continues onwards! The future looks brighter now than it did a month ago, though I can't rest and get complacent.

(Warning: don't read further if you want to have a pleasant day)

Also, on a side note, it's been a bit of a tough last week. I parked my car in an alley behind my office (in a homeless mecca) and worked until 4am, and came back and discovered someone had smashed my window and grabbed $400 in VR equipment. My girlfriends ancient cat also went into really bad health. He wouldn't eat, could barely drink, was almost blind, couldn't even stand, and was constantly meowing in pain. It was dying. I took it to the "value" vet for confirmation. I had to pay $22 to confirm the poor thing was dying and no amount of money could save him. They wanted to charge me $178 to put the cat to sleep, tried to upsell me on cremation services, a few inked paw prints, etc. I declined. The vet then went down on price and offered to inject the cat with a narcotic for $48 to help him die faster and ease his pain. I declined that too. I took the dying cat home, brought him to the backyard and let him see his last morning sunshine and hear the birds and squirrels one last time. I grabbed a shovel and dug a small little grave for the little guy. He was meowing weakly in pain, laying helplessly next to his final resting place. He was suffering. It was time to go. I put him into his little grave and killed him quickly with the shovel blade pressed to his neck followed by a hard stomp. For a brief moment, he had an unforgettable look of shock and betrayal on his face and his legs splayed out in reflex, and then he died and never moved again... I thought I would be a bit more emotionally hard about it (being a war veteran and seeing lots of dead animals at our ranch), but killing a dying cat was not easy. I got choked up afterwards. It was an act of mercy and the ethical thing to do, but still... not easy. I realized that sometimes, to maintain the divine sanctity of life, you must provide death, because to continue living in hopeless suffering inevitably ending in death anyways, only serves to prolong suffering and corrupts the essence of living.




Artificial Intelligence Work in Progress

I've got a broad production level puzzle I've been trying to figure out and I've never been sure if I've been working with all of the pieces. I'll try to explain the problem and my considerations.

1) I need to create AI for all of my characters and it needs to be good enough that it's convincing.
2) My approach has been to quickly write Finite State Machine scripts in C++. It has worked well enough.
3) During development, I change stuff in my game and I will be adding in new mechanics.
4) Every time I change something important, I need to refactor my FSM AI to account for it. This becomes a "tax" I need to pay, and when I just have a few relatively simple characters, it's not intolerable. Now, I put on my magical hat of farseeing +3, and I see a future where my game has dozens of characters, each with FSM scripts. The overhead tax I need to pay increases proportionately, and it gets to the point where I need to spend equal amounts of time maintaining AI scripts as I do with building out game systems, which ultimately slows down the pace of development. Here's where I get a bit conflicted. One side of me says, "Premature optimization! YAGNI! Solving problems you don't have!"
The other side of me says, "But these are real problems you're going to have if you don't head them off early and it's just going to be more expensive to fix them later. This has a compounding cost in terms of refactoring effort. Nip it in the bud now. Work smarter, not harder."
And the business side of me says, "Will this help me sell more copies today? What's urgent? If this costs me X months and I don't sell Y copies to sustain development work, then my effort is misdirected. I should be focused exclusively on building what sells!"

I think all are sage, prudent voices of reason to listen to and have merit behind them.

My creative engineering side has been quietly asking, "How can I avoid paying that increasing maintenance tax as development goes forward?" and the answer I've been recircling back to over and over again is "Design an AI system that doesn't need maintenance. It'll have a bit of a steeper upfront cost, but the investment will pay off in saved time over the course of development." Easier said than done, and to build such a system is a tall order which teams of other, much smarter people have tried to do with limited success. My engineering approach has been to dig into current research and development in machine learning, particularly the work being done by Google owned DeepMind. They've been able to create model free AI systems which can learn how to play any game with no instructions on how to play it. Their AI systems have beaten world champions at the game "Go". A year ago I said, "That sounds like something I need for my game!" (cue: ridiculous groans).

The reality is that I don't have a long history and deep background in machine learning AI systems. I didn't know anything about artificial neural networks, reinforcement learning, CNN's, or any other acronym super smart AI people mention off the cuff. I fumbled in the dark trying to understand these various AI systems to see if they could help me build an AI system for my game. I explored quite a few dead ends over the months. It's hard to recognize a dead end when you're in the middle of development, and it's also important not to get mentally entrenched on one track. I have to take a step back and look at the bigger picture to recognize these tracks and traps.
One track/trap is to think, "I need to have an artificial neural network! That's the only way to make this work"
Another one is, "I need to have machine learning, and my implementation for machine learning needs to match the AI industries definition! It's not machine learning if its not an implementation of back propagation!"
Another trap: "My machine learning type of AI should convince AI professionals it's real!"

All of that is obviously nonsense and nobody is saying this -- its an invented internal narrative, which creates unnecessary constraints, which creates traps.

Russel (Magforce7) has helped me see these traps and stay focused on what matters, but I'm still fumbling my way in the dark within a maze. I'm just taking inspiration from the ideas proposed by these other AI systems, but creating my own and trying to keep it as simple as possible while trying to minimize the amount of future work I need to do to maintain the system. So, here are my design goals for the AI system:
1) It shouldn't require a lot of maintenance and upkeep after it has been deployed
2) It should ideally be flexible: Updates to the game mechanics shouldn't cause AI system code updates
3) The AI controlled characters should appear reasonably intelligent and perform plausibly intelligent behaviors.
4) There should be support for variation in behavior between characters of the same class, and between characters of different classes.
5) I don't want to write any special case code. If I start writing FSM code, I'm doing it wrong.
6) Complex behavior should be emergent rather than designed.
7) It should be relatively simple. Integrating things into the AI system should be fast, easy and non-technical. Designing a system to meet these broad goals has been very challenging, but I think I've done it. I have spent several months thinking about how people and animals think and trying to create a model for intelligence which is consistent with biological intelligence. It's taken a lot of internal reflection on my own mind and thought processes, and doing a bit of external research. One important distinction with proposing broad intelligence models is that at the end of the day, it must be computable. If you can't reduce an intelligence model into computable systems, then it is no good for AI, and probably isn't a well defined model and gets lumped in with all of the other guesswork other people have proposed. I've come up with a few of these myself and haven't been able to reduce them into data structures or algorithms, so I had to throw them out. Anyways, on to my model! I've decided that I would structure my model to work as sets of loosely coupled systems. If one particular module is flawed and needs to be refactored, it shouldn't mean the whole system is flawed and needs to be refactored. Here are each of the modules:
  A picture or class diagram would be helpful in understanding this better. But let me describe the general workflow here for AI characters. Each character has a mind. The mind has memory, knowledge, motivators, and a list of possible behaviors to choose from. The mind is very similar to the finite state machine. Each character has sensory inputs (eye sight, hearing, smell, etc). The only way an AI character can know about the environment around it is through its sensory inputs. The sensory inputs are just a bunch of data feeds which go directly into memory. Memory is where we contain transient state about the environment around us. Memory can be persistent even after a sensory feed is cut -- closing your eyes doesn't cause objects to disappear, so we have object permanence. Objects stored in memory have "importance value" filters applied to them and they also have expiration times. Ultimately, the memory in a mind contains all relevant state information! Our mind has a list of all possible behaviors it can perform, so there needs to be a way to choose the most optimal behavior from the behavior list, given the current memory state. This means there needs to be some sort of internal decision making process which quickly evaluates optimal behavior. How do we build this without creating a bunch of FSM scripts? Because if that's what we end up doing, then we failed and are just creating overly complicated FSM's and are creating scripted behavior models which need to be maintained and updated. Here's the trick where it gets interesting... When we get objects through our sensory inputs, we don't store references to those instanced objects in memory. Instead, we store a set of descriptive tags for those objects. We don't choose our behavior based on objects in memory, but the memories abstract representation of those objects. Our brain also has a knowledge repository of behaviors, tag sets, and its effects on motivators. Our goal is to choose behaviors which create the most reward for our character, and reward is determined by the sum of motivators satisfied (more on this below). Our agent doesn't intrinsically know how much reward certain behavior and tag sets generate, so it needs to query its internal knowledge repo. The knowledge repo is where abstract reasoning happens. Since we're not working with instanced objects directly, but rather abstract representations of those objects, we can look at the tag sets which define our objects in memory and do pattern matching against tag sets in knowledge, find which sets of knowledge are relevant to the object, and then look at historical motivation satisfaction (not historical rewards). Essentially, we're looking at objects and querying our knowledge banks for similarly related objects and asking about our past experiences, and then projecting the best matched experience onto the current object. We're trying to match the best motivationally satisfying behavior to the object, and that becomes our most optimal behavior towards that particular object. We repeat this process for all objects in transient memory, keep a high score of the most rewarding behavior, and then choose that as our most optimal behavior. What's interesting is that this applies abstraction to objects and doesn't require thousands of training cycles. Imagine an AI character reaches out and touches a burning candle flame. That creates a negative reward for that action. The AI looks at the set of properties which define that candle flame and stores it in knowledge and associates the negative motivational experience. Let's define this by the property set {A,B,C,X,Y}. Now, some time passes, and the AI is looking at a campfire, which has the property set {C,G,H,J,X,Y}. It queries its knowledge base and sees that there is a set intersection between {A,B,C,X,Y} and {C,G,H,J,X,Y} which is {C,X,Y}. It can then say that there is a relationship between the campfire and the candle flame and based on its experience with the candle flame, it can project a predicted outcome to what would happen to its motivations if it touches the campfire, without ever actually having touched the campfire. In other words, we can make generalizations and apply those generalizations to related objects. I was initially making the mistake of defining how much reward each tag was worth. This is wrong, don't do this. Let's talk about reward calculation and how it's related to motive satisfaction, and how this can vary by character class, and character instance. Here is a general set of motives every character will have: Existence / Self Preservation Pain avoidance Hunger Sex Love / Affection Comfort Greed Morality Justice Fear Power Curiosity This is not a complete set of motives, you can add more as you think of them, but the central idea here is that our underlying motives/goals are what truly drive our actions and behaviors. It's the undercurrent to everything we do as humans and animals.
The general equation for evaluating reward is going to be defined as:
We're essentially calculating the sum of all F(a,b,w) for all changes in motivation factors. Let's look specifically at hunger to illustrate how this works:

In our knowledge repo, we have the following: which describes the effects on your motivations when you eat a loaf of bread: It satisfies hunger and creates a little bit of pleasure (the bread is tasty!).
We have a few different character actors which have an eating behavior:
1) Humans
2) Zombies
3) Cows
4) Termites
For reference, humans like to eat breads and meats, as long as the meat is not human flesh. Zombies are exclusively carnivores who eat any kind of meat and have no qualms about eating human flesh. Cows are herbivores who only eat grass and nothing else. Termites are a type of insect which only eats wood and nothing else. We 100% definitely do not want to write a state machine describing these behaviors and conditions! Let the characters learn for themselves through trial and error and abstraction! So, our token human is hungry and we represent this by setting his initial hunger motivation value to 0.5. In front of him is a loaf of bread and he has prior experience/knowledge with that bread, as described above in the quote. Using our equation, how much reward would he get for performing the "eat" behavior on the bread multiple times?
  As our human continues to eat bread, it satisfies his hunger and it becomes decreasingly rewarding to continue eating bread, to the point that it becomes a disincentivized behavior when he can't eat anymore (represented by the F(X)=X^3 graph).

Let's place zombies and humans and put a chunk of human flesh in front of them both. The knowledge looks like this: It satisfies hunger, but generates a moral crisis! Here's where weights come into play.
  Internally within the zombie character, we have a constant, fixed weight on the influence of morality on their reward modifier. Zombies have no morality, so they are completely unaffected. Our particular human has a strong moral conscience, so eating human flesh would be deeply objectionable. We *could* adjust the humans morality weighting to 0.8 or something, and if they eventually get hungry enough, the morality consequence could get overridden by the motivation to eat, and we'd have a cannibal. Notice that no extra code would need to be written to create these special behavior cases? These numbers can be adjusted in a spreadsheet to change behavior patterns.

We also don't want to go through the process of describing what behaviors can be performed with particular objects. That would add extra work. Let's say we have a wooden door. It's entirely possible and allowable for the human and the zombie to eat the door (or anything for that matter). But how do we prevent them from doing so? If they attempt to eat something they aren't supposed to eat, we simply don't change a single motivating value. They will both learn that eating wood doors does not help them satisfy their driving motives, so when it comes to choosing rewarding behaviors, this would score a big fat zero. If we have an idle behavior which scores a minimum reward of 1, then the characters would prefer to idle around doing nothing before they'd go around eating wooden doors. It's a bit hilarious that the threshold between idling and eating wooden doors is so small though. Taking a few steps back, I think I've got all of the working pieces together now and it's mostly going to be a matter of implementing this. One section that's still missing from this future planning and look ahead. If you are hungry and standing outside of a house, look in through the window and see a ham sandwich, and want to eat it, then there is an intermediate step of moving to a door and opening it. This series of chained actions has a cost which needs to be factored into the reward calculation, and it would also need to be capable of working towards goals which don't exist (such as deciding to plant crops to get food to eat -- the food doesn't exist in present time). For the last week or so, I've been building this AI system out and I've got a rough working prototype. I'm still implementing the underlying framework and discovering design oversights and errors, but I think once this is working, I'll have a pretty unique type of AI capable of abstract reasoning, learning, planning, and optimized behaviors.

I suspect that lots of different characters with slight variations in weights, could generate an interesting system of interactions and an economic system of competing interests could be an emergent property of these underlying systems of motivation satisfaction driven behavior. I think this is also reflective of real life? It's been making me look at people very differently for the last few days and it's been blowing my mind a bit.



June 2018

I suppose I should recap my trip to Las Vegas. I got to attend the Dell World Expo at The Venetian and one of the stations for Dell was dedicated to showing off the application I built for them. Here are a few pictures I took:

This is the booth setup before the show begins. There's two podium stations, a set of wireless headphones, and a Leap Motion device attached to a laptop via USB cable.

The convention is in full swing and people are coming up and interacting with my application. It's driven entirely with hand gestures. No mouse, keyboard, game pad, etc.

This is the first application of its kind in the world. Nobody else has used hand gestures to control and interact with 360 video before. Usually there were healthy crowds of people watching other people try it out.

I had three different interactive scenarios people could play through. The game portion was a fun way to learn about Dells philanthropic programs. I had some people literally go through every single video because engagement was so high. Who wants to watch 15 minutes of corporate feel good video? These guys do! Just in case, I brought my laptop with me and had it setup to create new builds if I needed to. There were some small bugs and changes I wanted to fix, so I started to create another build. I copied all of the files over... and then disaster happened. I don't know how it happened, but somehow, the source code folder was completely empty. I still don't know how that could happen because I just copy/pasted the root project folder and the source code folder was a sub folder. All of the other subfolders had all of their files copied successfully, so it shall remain a mystery. So, if there was a critical bug, we would either need to just deal with it or I would have to catch an emergency flight back to Seattle. There were bugs, but fortunately they were minor enough that we could brush over them.

I had to train the Dell employees how to run the application. Fortunately, I had already anticipated this need and tried to simplify the application management to be as easy as possible. Basically, you could jump between scenes with the number buttons, and the first button just resets the whole app. Unfortunately, there were a few small lighting artifacts which popped up on a reset level, so I had to train them how to quit and restart the app. It only took a few seconds, but it did mean that a booth attendant had to always be on hand and paying attention.

For most of the event, I stood nearby and just watched people using my app and took notes. Where were the pain points? What assumptions were people making about the interface? How long was user interest being held? What was holding their interest? What mistakes did I make? How can I fix them in the next update? What am I missing?
One thing that I realized is that our introduction screen is terrible at attracting attention. I initially wanted to use an interface which trained the user on how to use the application, so to do that, I kept it bare minimalist so that people could focus on only one thing: Learning how to grab things. The interface started with a black background, a floating acorn, and a bit of white instructional text. In terms of focusing and training, it doesn't get any simpler and more clear. As far as capturing the attention of passer bys, it was TERRIBLE. So, if you're walking by and all you see is the intro screen waiting for users to engage, you have no idea what the application does or is about, so you'll just keep walking. This means that if you're the booth attendant, you have to be actively engaging with people walking by and trying to hook them. My opening line is always, "Hey, you want to see something amazing?! Come check this out!". This engagement stuff is always a really good skill to have if you're ever giving demos of your game at events like E3, PAX, meetups, game jams, etc.

After the expo was over, I felt drained and lost a majority of my interest in the application. I don't really know why, but I just got really bored with it. A month later, I'm still bored. My attitude feels like, "Yeah, that was pretty cool and it was hard to pull off, but it's been done now." I was hoping that I would get lots of contacts and leads for more work, but that didn't really happen. Maybe it's my fault. Maybe I needed to be more outgoing and aggressive about getting to know people. Or maybe it wouldn't have mattered one way or another?

During the event, we were put in touch with a team at VMWare, a subsidiary owned by Dell. They were looking for a vendor who would build them a virtual reality application and we were the only ones they could find. So, we had a phone call meeting to get an understanding on what they're trying to build. Basically, it was a group of marketing people who had just seen Ready Player One and they wanted to build a VR experience for their customer experience team. Great! This sounds like a big project and a good opportunity! I started digging into their requirements. They... really didn't know what they wanted or could do. They said that they want every person in the company to be able to use their VR app, and they have 25,000 people. I asked them if they were going to buy 25,000 VR headsets. They didn't realize they needed to buy a headset. ...Okay... They decided that maybe they didn't want to do a VR app. What about a 3D game app instead?
"Sure! I can definitely build one! What do your client workstations look like in terms of hardware specs?"
"We run thin clients throughout the whole enterprise."
*long silence on my end*
"uh... that's not good."
So, I asked them to try running a 3D game on their server and playing it on their thin clients. The big, obvious problem is that all of the 3D GPU processing will happen server side, and the amount of GPU processing is going to be a function of the number of connected clients. So, can their server GPU handle a high rendering load? I'm still waiting to find out...a month later.
I found that they're trying to create a multiplayer app... in vr... with voice over IP...with a content management system backend... supporting up to 25,000 users... on thin clients... in three months! WTF?! Okay, I know I have the capability to build an enterprise level multiplayer CMS app. It's not going to be easy, but I could pull it off. But probably not alone in three months. I'd have to hire people to help. The problem is, it's going to get very expensive, very quickly. And if I put on my hat of pragmatism +5, I have to ask, "Why not just build an enterprise web app?". "Because we want to do something cool and different." That's a valid reason, especially for marketing folks who need to differentiate themselves from other marketing folks. Anyways, I submitted a ridiculous budget proposal last week. I think this project is going to fail before it starts because it's just not technically feasible, but I will probably just have to end up turning down the project if I don't get fully funded by the end of June. I just can't pull this off in less than three months... a corporate MMORPG in VR. In my mind, I'm already expecting it to fall through so I'm not getting any hopes up or counting on it to happen. They have to be moving a lot faster than they're moving right now if they want this to get built.

In other news, I've been in a bit of a professional rut lately. I need to make money. Money is a resource which enables me to do things, and the lack of money is seriously holding me back. For example, I want to create a 3D VR travel application. I've created a working MVP, so now all I have to do is go out and shoot some footage with a camera. I borrowed a 360 camera, but it sucked so bad that all the footage I shot was unusable. I've been looking hungrily at the Insta360 Pro camera. It's got everything I want and need to make my app. 8K 360 video in stereo. Automatic stitching. Image stabilization. Good battery life. etc. But, it costs $3,500 which I don't have. I asked my local community if anyone had one I could borrow one, but no replies. So, this project is on hold until I can get enough funds to purchase equipment. *Sigh*

My girlfriend has been getting on my case about not making enough money as well. It's really hard on her because I don't contribute enough financially. All of my money making schemes tend to be long term (6+ months out). And when I get clients, I tend to vastly undercharge for my services. For example, the leap motion app I just made for Dell, I charged at an hourly rate of $75/hour and grossed about $6,500. I should have at least added another zero to that. My girlfriend tells me I am a stubborn fool who won't listen, and I'll always be poor and broke unless I raise my rates. She's entirely right. She said I should 100% stop doing engineering work for a month and instead focus on sales and marketing. Full time sales and marketing. That's scary, I absolutely hate phone calls, and doing cold calls has zero appeal to me. But, my girlfriend is right. Nobody knows who I am or what I do, so how are they supposed to find me and hire me? Nothing is going to fall into my lap just by existing. I need to build a pretty website which highlights my work and abilities. Then I need to promote that website. So, for the next month, I need to focus on self promotion, sales and marketing.

It's SO tempting to do engineering stuff though. Yesterday I spent a few hours researching machine learning using reinforcement learning. It's really enticing, but it would take a LOT of engineering talent and time to pull off. And I want to try, and I could probably do cool stuff, but it won't help pay for tomorrows bills. So I kind of need to shelve that desire as well. Harsh.




Dell World 2018 in Las Vegas

Alright. I finished my project for Dell this evening. It took me about two and a half months to complete it, though the first month or so was very light work. The work ramped up quite significantly towards the last two weeks and I was working weekends for the last two weeks. The good news is, I finished perfectly on time, on budget, and to specifications. As far as project management goes, this went perfectly! Tomorrow afternoon, I am flying out to Las Vegas to attend the Dell World Expo and will be hovering in the background making sure the booth attendants get properly trained and I can fix any problems that arise (including hot fixes). I will be most interested in seeing the reactions of people as they try out my app and looking for new business opportunities. Anyways, here is a youtube video which shows the app as of tonight (pardon my awkward voice): So, I think it would be valuable to go into a bit of post-mortem detail on what went well and what can be done better next time, and what I learned from the experience. First and foremost, I learned that I should NOT be charging an hourly rate for my work. I am a contracted *company*, not an employee. Hourly wages are an employee mentality which I need to break my mind away from. I need to think more like a business, where I bid for a project to make profits, get payments, and then pay employees an hourly rate out of the total project budget. If I charge hourly rates, the incentive structure is inverted in disfavor of good engineering and efficient work. If you work too fast, too efficiently, you get paid less money and thus, working slow and inefficiently is rewarded. If you charge by project instead, the faster and more efficiently you work, the more you are rewarded. I also need to start thinking in terms of hiring and managing other people and calculating their time and costs into the project proposal budget. It's useful to know how long everything takes so that I can properly estimate an accurate project cost. The better I can be at estimating true project costs, the more competitive I can be. I've been seriously undercharging for what I've done, so that will change from here on out. I will not charge an hourly wage, I will charge by project and its costs will be based on the scope and requirements of the project. I think the minimum I will charge is $50k per project?

So, let's get technical on this interactive video project. Here's some really important details to consider: When you are playing a 360 video inside of a sphere, the data rate of the video needs to be around 15mpbs. Any more than that, and you start running into video stutter. You should not use transparency or chroma keying in your video. If you chroma key, the lossiness of an MP4 will cause color bleed on the edges. If you decide to use transparency on and alpha channel, you're going to be outputing an MOV using a lossless PNG, which will cause the filesize to skyrocket (ie, 90 seconds of video = 900Mb). Leap Motion can be a teensy bit finicky, even after the Orion update. It's trying to do its best with noisy image data, so you're sometimes going to get false positives. Sometimes, it won't know whether the hand it sees is a right hand or a left hand. For some frames, it may incorrectly see a "grip" gesture, so you should try to account for that with a frame buffer. Leap Motion doesn't really have events for when a hand left its view frustum, but you really, really need to know when this happens. Especially if the hand has an object attached to it. You'll have to create your own events and event handlers for gaining and losing a hand and decide what you want to do with a held object. When it comes to gripping to move the camera vs grabbing to activate and object, you want to be very careful about how far you put objects away from the player camera. If they are trying to turn their view with their hands but their hands overlap an interactive object, they may accidentally trigger that object interaction and get frustrated. I found that 85cm away from the player camera is a good value. This can be adjusted without recompile by physically moving the leap motion closer or further from the player. Cheat as much as you can. Buy as many premade art assets as you can. Sub contract people out to fill in the gaps. Beware that some art assets you purchase may be unusable garbage. The DNA strands I bought for $25 were useless. I ended up creating my own programmatically and they turned out better than a what I would have gotten with a static mesh. Play test with people who have never seen the project before. Don't tell them anything, except, "Hey, try this app out" and start it on the intro screen. Watch where they get lost, then design UI cues to fix that. It's worth your time to get familiar with the media player code on the engine side. The better you understand how it works and what it's limitations are, the easier it is to work smarter. I initially didn't do my due diligence and I just spent maybe 15 minutes looking over the API. I didn't see how to figure out the length of a video file, so I made that into a function parameter value. If you have 19 videos, that means you have to right click each one, go to properties, go to the details tab, and then find the length and convert it to total seconds, just so you can enter it in as a function input parameter. And then, if your video guy sends you an edit, you need to find and update this value. It got tedious, so I eventually looked it up programmatically. Videos don't loop out of the box. The "loop" functionality applies to a playlist of videos, not an individual video. If you want to loop a video, you have to add that functionality in yourself based off of the video duration. Oh, and by the way, when you get to the end of a video, you have to seek to the beginning and that means you're going to have a few black frames. I think most video playback systems will buffer the next few frames automatically, but if you want your video to loop, it's not going to start buffering the first few frames when it reaches the end of the file. That would require an engine mod and I didn't have the time to invest in that (though I certainly have the technical capability). It was just easier to produce a video which had several loops in the video and just accept the black frames during the loop cycle. We had a 10 second loop which we turned into a 90 second clip with 9 loops in the video. A few black frames once every minute and a half was a lot more tolerable than black frames once every 10 seconds. You only want to play one video at a time. We took the last frame from each 360 video and turned it into a texture. Once a 360 video completes, I replace the video material with a texture material and let the video player play different videos. You want to make sure that the end still texture is a scene which doesn't have any moving parts to it so that the transition from video to end still is seamless and unnoticeable. This is something to keep in mind when you're doing video production on set and doing clip sequencing during video editing. If you have 2D videos in a 360 sphere environment, you don't want to make the 2D surface a curved surface. If you need to change the distance of the video from the viewer, the curvature perspective changes and you'd have to create a new mesh to account for it. It costs too much time and effort and there isn't enough payoff to make it worthwhile. Video transitions are a great polish feature. Fade to black, fade in from black, scaling from an axis, shrinking to an axis, all are great ways to prepare the viewer for the video content. Combine it with audio SFX and VFX to really sell it (I could have done a lot better here, but I was pressed for time). If you have voice over audio and you're trying to time things with it, you want to do things at 1/10th of a second precision and note in a separate document your timings (Any greater precision has diminishing returns on noticeable value). I used Audacity to examine a WAV file and note the timings. I used the same video sphere for every 360 video. Every interactive menu was spawned dynamically I bound number buttons to key storyboard points. I also created buttons to skip forward 5 seconds in a video. This really helps to develop, test and iterate faster when you have video. You don't want to sit through 90 seconds of video to see if the event at the end fired correctly. Waiting is a waste of time. These controls are also going to be super useful for booth attendants. They can skip to particular scenes, reset a scene, or restart the whole app at the push of a button to be ready for the next person in line. It's never going to be perfect. You can always find new things to add before it is finally "perfect". If the app is consider done only when it's perfect, it will never be done. Even now, there are things I'd want to spend lots of time fixing and changing and I'd feel better about it. But it's good enough. I feel a bit nervous about showing something I feel is imperfect, but... I've also seen my own app hundreds of times. People seeing it for the first time won't see its imperfections like I do. A big part of effective development is deciding what to let go and what to focus on. I went and gave a quick demo at a local meetup and made a new connection which might turn into a future business opportunity. It's worth showing what you're working on, but do be prepared with a decent pitch. Who are you? What do you do? What are you working on? What does it do? Why is it useful/cool? What's the value proposition? etc.

Yesterday I went to a sponsored happy hour filled with tech people. I brought a 10 minute youtube video of my app. It was too long. I need a shorter sizzle reel to show people. I also need an elevator pitch. I got stalked by an investor and I was totally unprepared for that meeting.
"Are you working for a company?"
"Is it yours?"
"What's it called?"
"uh.... Wobbly Duck Studios..." (cringe)
"What do you do?"
"I make VR games? And... now I made this new thing that's not VR and I don't really know what to call it?"
"Cool. Do you have a patent for it?"
"No, I just invented it a few weeks ago and I can't afford a patent." (Not that I want to patent it anyways or even care about patents, but in USA, company valuations are based on patent portfolios and that determines VC interest)
"What stage is your company in? Seed round? Series A?"
"Uh... I'm entirely self funded and broke?" (I don't know how to answer this)
"Do you have any employees?"
"I had one a few years ago, but then I ran out of money and he quit. I'm still surviving though, so I guess that's okay?"
"Oh, okay. Well, I have to go use the bathroom. Bye!" (flimsy pretext for them to escape further conversation with someone they're not interested in)

The reality is that I honestly don't care about investors anymore. I consider talking to them a waste of time. I used to care and chased them, and before I met with one, I'd spend *days* going over notes in preparation for it. No amount of prep can fix my general amateur CEO levels though, and they see that and I don't get any interest, much less funding. Why waste my time prepping for days to get nothing, when instead I could be spending my time doing something actually valuable, like developing products? Why would I want to give away equity and control of my company to outsiders who are only looking to 10x their principle at any cost? Especially at my current stage and low valuation? I can take on increasingly larger and more profitable projects to fund myself and keep 100% of my company to myself. And why would I want to measure my company value based on the number of employees I have? Full Time Employees in a pre-revenue start up are a drain on capital and generally a huge mistake (Something I learned the hard way), so head count is not a good measure of valuation. What matters is positioning, product market fit, your IP portfolio, your human talents, and how its all managed with respect to the market ecosystem. Anyways, I must be sure to remember all that I've learned so far and apply that towards business and future projects. I honestly think I could make a few million dollars in the next few years if I apply myself correctly, but that's going to depend on building a track record of successful projects and a history of pleased customers. I think if I can do this, I can fund my game development indefinitely and build a core team around it, while also building a core team around building and delivering other software apps. I'm feeling cautiously optimistic about my future prospects right now. I think I'll have some bigger announcements in the next month or two




The Blackwood Witch

Herby sat on a log around the campfire and half listened to the tales and gossip being told by the villagers. He took a long draw from the frothy mug of ale and set it back to rest comfortably on his large belly. After each story ended, he’d quietly huff in mild contempt and absent mindedly stroke his beard. None of their tales were any good compared to his. All of the other villagers knew it, but they waited eagerly. Every night, Herby always told his story last and it got better and better each time. As the night wore one and the campfire turned to glowing red coals, the stories and gossips gradually tapered off. One by one, the villagers grew quiet and waited for Herby to speak.
“Herby, tell us o’ the Blackwood witch again!” one of them shouted. “We been waitin’ all night!”
Herby glared at the villager for a moment in mock irritation, but secretly he knew he loved telling the story as much as they loved hearing it. All the eyes around the campfire turned and looked at him expectantly. Herby met each one and held the gaze for a moment, wringing his hands in eager anticipation, commanding their attention. He took one final long draw from his mug, and then wiped the froth from his mustache with the back of his sleeve. After a long pregnant pause, he leaned forward, as he always did, and began with a low whisper. “Ye e’er heard o’ the Blackwood witch?” he started quietly, eyes twinkling. “It all started a coupl’a years ago.”
All of the listening eyes grew large and people quieted their breaths as they leaned in closer to hear. “Jonathan the miller had a daughter. She was fine as sin, she was. Had hair black as a ravens wing, skin fair as porcelain. She was a strange one, that she was. She had the most peculiar eyes any lad had seen, y’see? They were green as emeralds. I suppose that’s why old man Jonathan had named her Esmerelda. But, there was something off about her. I can’t quite explain it, but just one look at her and you could tell that she was the odd sort. Trouble, it just seemed to follow her everywhere she went. We didn’t know why at the time, but the most unusual, otherworldly things seemed to follow her everywhere she went. If she was in the kitchen, the teapot would suddenly boil fer no reason. The funny thing is, nobody turned on the stove. Or, she’d be in the mill, and a sack of flour would drop and narrowly miss yer head as if somethin’s trying ta kill ye. But the oddest thing about young Esmerelda, was that she seemed to talk to herself or something else that only she could see. Spirits, some said. Phantoms of the imagination, others claimed. Nobody really gave it too much serious thought though, y’see, she seemed a bit of a disturbed woman. Sometimes, she’d be yelling curses at the air for minutes. But, nobody had the heart to say a thing about it and just left ‘er alone.” “Well, one day a lad came down to the mill to get some corn ground into meal for his piggies. He’d ‘ad a pint or two … or three ... that afternoon, but who hasn’t, y’know? Anyways, he wasn’t quite in his right mind either, so he walks into the Mill, and who should he find there all alone? Lil miss Esmerelda. She was chattin’ up a furious storm that afternoon with some spirit or some such thing, and almost didn’t even pay the lad much heed. He got right agitated for havin’ t’ wait though, so he started shouting at her. He said he was just cursin’ her like any ol’ drunk ornery fool does, but she whirled around and looked ‘im right in the eyes with her emerald eyes. Oh, but they weren’t normal lookin’ eyes that afternoon. They had a piercing glow behind ‘em that looked right through ye, right into yer soul. She said to that lad, and I’ll ne’er forget these words, “You know nothing of curses, you miserable wretch. Let me show you a curse.” An’ she did. He said her eyes blazed green like wildfires an’ ‘afore he knew it, little itchy boils came up all o’er his skin, and whenever he scratched at the itchy suckers, little black spiders crawled out. His whole body was covered in these spider filled boils! I shudder to think about it, just imagining spiders crawling on me skin gives me the heebie jeebiees, but spiders crawling out from under the skin? That’s a whole ‘nother level of creepy. O’ course, you could hear ‘is scream clear down to ol’ Jebs tannery, and that’s pretty far considerin’ the walk. Anyways, he ran right outta that mill and left his corn fer the miller t’ take as he pleased.” “The lad ran all over town that afternoon, screamin’ and shoutin’ at the top o’ his lungs t’ any who’d listen. “The millers daughter is a witch! Esmerelda is a witch! She cursed me with boils and spiders!” an’ he’d show ‘em to any who’d look. It didn’ take the town long to rabble rouse outta their homes. The good townsfolk grabbed their pitchforks an’ torches, and marched right down to the millers house, shoutin’ for missus Esmerelda to show ‘erself. She knew they wasn’t up to no good that afternoon. She’d seen what they’d done to others suspected o’ witchcraft an’ sorcery, so she wasn’t gonna stick around long enough to have any o’ that. Before the townsfolk even got close to her house, she was gone into the Blackwood.“ “Back then, it wasn’t a cursed forest like it is today and the good townsfolk weren’t afraid to go in it for an afternoon picnic. But that all changed that evenin’. None o’ the townsfolk could find the young missus, but they were out for ‘er blood. Rabble rousing will do that to ye. A few o’ them were decent hunters, so they went off back home and fetched the houn’ dogs. Houn’ dogs are pretty good at fetching foxes, and young missus Esmerelda was quite a foxy lady, so they didn’ have much problem pickin’ up her scent that evenin’. The hunters said they’d go right into the forest and bring her back and then she could stand trial for her sorcery before the whole town, and then she could face the stake like the rest o’ them did.“ “We all heard it. The screams were loud as sin. At first, we thought the hunters had captured Esmerelda and she be puttin’ up a fuss. We all waited around for them to bring ‘er back, but hours went by an’ nobody e’er came outta the Blackwood that night. It later occurred to us that the screams we ‘eard were the hunters themselves. That was the last evening anyone ever saw them hunters, bless their poor souls. We all looked at each other with scared looks in our eyes. Nobody slept well that night. How could ye, when ye know there’s a witch prowlin’ the nearby forests? The next mornin’, a ranger set off to follow the tracks of the hunting party. No one ever saw or heard from ‘im again either. He got snatched by ‘er. From that day on, nobody dared to go into the forest again until the witch was dealt with. Some nights, if yer really quiet and still and listen t’ the wind, you can still hear her talkin’ to those ghosts or spirits, or whatever they are. T’ this day, the Blackwood is cursed. Any poor fool dumb enough to be out in that wood after sundown is a gonner. Probably cookin’ in ‘er witches brew. Stay outta the Blackwood or the witch’ll getcha.” Herby leaned back finished and out of breath. The villagers shivered a little in the darkness, a little from the cold of night, and a little from fright. The Blackwood forest behind them loomed menacingly in the darkness. One by one, the villagers gave their farewells and sauntered off to their homes for the night.




More Contract Work

It almost feels like it hasn't been worth writing an update for the last month because so little "progress" has been made on Spellbound. But I suppose such is life, and it too must be captured and noted as a part of the journey of an indie developer. I have still been doing various contract projects for both corporate clients and small game studios. On the contracting side, I've decided that it would be a good idea to subcontract work I can't do to other people and then add my management fee to their rates. I currently have my former artist working on a small contract project, so it is a viable business idea. He charges me $35/hour and I charge the client $50/hour for his work and I keep the difference. It's not much, but its a good start. In the future, I will raise his rates and pay him more when there is more work and larger projects, but I don't want to make public promises I can't keep. The hard part will be finding enough work to keep everyone busy. I've also been playing a light support role to my girlfriend. Her business is taking off and she's easily become the primary bread winner of the household and that relieves financial pressure from me, allowing me to continue working with minimal income. I can't stress enough how grateful I am and what an impact it has on my creative pursuits. A few days ago, she had a senator from China come and visit her company and our ranch. He was really interested in seeing my VR game, so I gave him a demo in my office. My roommates are all sales people as well, so they got to try out the game at the same time. One of them was instantly motion sick, but the other really enjoyed it. Probably the best takeaway from this was just how bad my user interfaces actually are -- they are not intuitive enough at all for completely new people to use. Also, the pacing of the action is also too rapid for novices, so I'll need to redesign my tutorial level to be more "tutorial" focused than story/immersion. Anyways, the Chinese senator was very impressed with what I'd been working on. I have a feeling that I may have a trip out to China in my eventual future. I think the Chinese market for VR is thirstier for content than the North American market, so it would be great for me to see first hand what the market landscape looks like.

A fellow VR game dev told me the other night that he's been wanting to show my game to other people, but the trailer for the game is so out of date that it doesn't do the game proper justice. I completely agree, it's two years old and features old technology which I don't support anymore. Here's the stupidest objection in the whole world: I don't know how to produce a good game trailer. This is extra stupid because... I work in an office filled with film people who could help me. What's wrong with me? I'm a bit afraid to ask for help knowing I have no money to offer. I have been doing a lot of reading of epic fantasy books on the bus ride too and from work. I'm currently reading through the "Legend of Drizzt" series by R.A. Salvatore. Every time I read one of these epic fantasy books, I feel totally inadequate as a writer. I have a lot of self doubt that I could produce anything as good. Despite that, I'm going to have to push hard and write out a story for Spellbound. The writing is going much slower than I would have liked due to various distractions (ahem, contract work and lack of funding). I also feel a bit daunted/overwhelmed by the size of the writing project and what it's going to take. I should just shut up, stop whining, and start writing.
"Yeah, Eric! Quit yer moanin', bitchin' and belly aching and get back to writing!"
*whip crack* I have been entertaining the idea of producing another type of nature VR travel experience using 360 videos. It would be much easier and faster to produce and could turn into a new revenue source to fund my development of Spellbound and build my brand a teeny bit more. I must find some time to produce a rough prototype and see if its technologically viable. I've written out a 2 page business plan and it seems pretty good (but all of our own ideas sound good!). This idea has passed through my feasibility filters and its time to start figuring out what it would take to produce. Anyways, it doesn't hurt to give it a try and see what happens.

On another note, I think some of my best ideas come to me while I'm walking to work. There's just something creatively magical about the act of walking and thinking. It really gets the juices going. I remember this one time I was working in Iraq on a tough problem with relational databases. Somehow, I had to get multiple records from one table to match multiple records from another table. I couldn't figure it out for days while sitting at my desk, but then I went for a long walk on base and solved it in my head. I came back, implemented it, and it worked perfectly -- it required an intermediary table to store lookups. Two days ago, I was walking a mile to my bus stop (in the rain) thinking about "stuff". The night before, I had been tutoring my girlfriends son on math homework. I have also given lectures at my former university and local meetups on game development and design. I have worked in Iraq and Afghanistan to rebuild war torn societies, and through my experience, I have concluded that the underlying foundation for a peaceful and prosperous society is an educated society. So, if you want to bring peace, prosperity and compassion to the world, start by educating people. I happen to love the acquisition of wisdom and the feeling of enlightenment it brings, so my way of sharing that is by teaching people what I know and hoping they too can share my passion. On my walk, I got to thinking: What if I give lectures in VR where people can learn something? It would be done within the universe of Spellbound, so the learning experience would be within a classroom of budding wizards, being taught be an old, gray bearded wizard (me). The character animations could be driven by a mocap suit and the voice could be recorded easily enough. The instructional material would be framed in the context of things wizards care about, so I'd be giving an hour long class on the intricacies of alchemy and brewing a witches pot, and it would be about selecting the right proportion of herbs, spices, ingredients, and cantrips. On the surface, it would be a lesson on magical brews, but in truth, it's a lesson on fractions and ratios. It would be a great fake out, where people come into a classroom expecting an hour of entertainment (which it is!) but they'd really get an hour of education. But, the lesson would be framed and presented in such a way that the audience doesn't realize its learning something else which is valuable in the real world too! I could produce a dozen lectures on various topics of interest, framed in the context of advanced wizardry, and people could attend my lectures in VR. If I can convey my enthusiasm for the subject, it'll be infectious and people will want to see all of the other lectures. What seemed like a action role playing game on the surface, had a lot of secret surprises on the back end. Some people may not be interested in this academic part of the game and prefer action and adventure, but others may be only interested in the academic side -- There's nothing wrong with wizards who spend most of their time in the academy advancing their own knowledge. After all, that's what wizards are predominantly known for! I think if I embed secret rune combinations within the lessons, students can get unique magical rewards by paying attention in class and it can be just as rewarding as exploring an ancient dungeon. I like this idea; I'll have to think about it more and let it ruminate. Lastly, I've been continuing my work with the Leap Motion and integrating it with 360 video. Check it out here: I heard from my partner that some sales guy saw our work and liked it so much that he said if we finish this app, he'd be willing to sell our services to other companies. If that brings in more work and it pays well, I'd be all for it. I'd eventually want to hire someone else to work for me and take over the production and I'd move myself into more of a creative managerial role, but for now, I have to keep building out the tech and envisioning how this will work. I've been trying to unite the film industry and the gaming industry for over a year, so this sort of represents a culmination of my efforts and helps create a sort of new type of media. I'm excited to see where other creatives can take this. Anyways, I still have a lot more work to do here and this is still evolving quickly, but I think what we're building here may be the first of its kind in the world. I'm excited.




Contract Work

I need to make money to fund the further development of my game. So, I've been doing paid contract work in VR. Most of the work is pretty easy for me and consists of producing VR applications which run 360 videos with some interactive GUI elements embedded into it. I also have been helping other game developers produce their games. Initially, I charged $50/hour for my early VR programming work. I believed that I needed to figure out the development process and it would take a bit longer because it was new to me, so I felt bad charging a higher rate. I got it figured out now, so I raised my rates to $75/hour. I... think I made a mistake. The way I came up with $75/hour is pretty straight forward. I took my previous annual salary and divided it by the number of hours in a full working year, and that gave me a rough ballpark on my hourly rate. The flaw in this approach is that I was assuming that the amount of work I have would be constant, that I would be working a full 40 hours a week with billable hours. The reality is that I have huge gaps between projects, so that means I have huge gaps between billable hours. So, the general intuition would be to increase my hourly rate, right? I think that's also a mistake. The problem is that I've gotten too fast. It used to take me something like 10 hours to produce a 360 VR video app. That's because I built it from scratch. Now, I have a code base and template I reuse. It takes me about 2 hours to produce a simple video app. With an hourly fee structure, it's more profitable for me to work slow so I can charge higher bills. But I can't do that, I'm an honest man and my integrity is priceless to me. I'm also a lazy engineer which causes me to strive for efficiency so I don't have to do tedious, wasteful work. Spending 10 hours on a 2 hour project would feel like a waste of time and an antithesis to common sense. So, I'm tentatively thinking that the correct fee structure is to charge a per project cost. If I quote someone for $5000 to complete a project, that's what I'll charge regardless of how long it takes. If I can finish the project in 5 hours, congrats, I just made $1000/hour. If it takes me 50 hours, then I made $100/hour. Now, I'm properly incentivized to work fast and efficiently. The faster I work, the more rewarding it is. This comes with some risks as well. What if I estimate that a project will take 15 hours, bid accordingly, but it really takes me 30 hours to complete? I'm making another mistake here... I'm not taking profit into account. If I step outside of myself for a moment and pretend that I'm an employee to myself, and employees are paid an hourly rate (let's say $75/hour) and I'm bidding on the cost of a project based off of just my raw production costs, then I make $0 in profit. All of the income goes directly into paying for the employee salaries, leaving nothing for the company, meaning growth is impossible and I lose money over time due to overhead costs. Instead, I should be taking the employee salary ($75/hour) and multiplying it by a factor of at least 2.5x. If I replace myself with a hired employee and keep the same fee structure in place, then the company is equally profitable because I am interchangeable with other workers. If I add more workers to the team, then of course my bid estimates will change. So, the total bid = sum of all wages * 2.5x; For clients, this could be a pretty good system as well. Instead of having runaway costs inflate a project budget, there is a fixed cost of production. My biggest challenge will be to accurately estimate the scope of work and bid accordingly. If I underestimate the scope, then I eat the cost difference. If I overestimate the scope, more profit, more reward! But then, I also come full circle to the original problem I had: If I originally took 10 hours to finish a project and bid accordingly based off of that time estimate, but through experience, innovation and increases in efficiency I now reduce that same work to 2 hours and bid accordingly, I would still be losing the hourly difference. So, do I bid as if I'm starting everything from scratch because my competitors would be in the same position? Or do I look at the requirements of a project and use that as an input parameter into a piece-wise defined function to assess estimated cost? Or, do I just pick high numbers in a random ballpark and hope to get lucky? Obviously, if requirements change, then the cost should change proportionately as well. If I charged a flat $10,000 for a project given its requirements / feature spec, and then a few weeks later the client decides to add/subtract a requirement, how would I figure out how to proportionately adjust the pricing to reflect the change in scope? I... don't... know... One other thing I'm finding annoyance at is that some clients aren't good clients to take on. Indies and startups are bad because they often don't have money, no matter their good intentions and promises. If it's going to break the bank for them to have me work for them, it's likely they'll be unable to pay me or that it will take 6+ months for me to get paid. I owe people money, I can't keep them waiting because I'm waiting to get paid. If they're sweating over my up front fee of $150, I shouldn't take them on as clients. My policy should be, "If I think they can't afford me, they can't afford me.". It may be better to risk leaving money on the table than taking on bad clients. Maybe I should increase my fee to weed them out? Another factor I hadn't considered are the non-billable hours I put into project efforts: Responding to emails and answering phone calls. On some projects, I've put more hours into phone calls, conversations and emails than actual, billable hours. Now, I want to be a nice person and to be easily accessible to my clients, but every hour I spend on email or phone calls is an hour I'm not spending making money. Every hour I'm not making money is also an hour I'm not working on Spellbound. I'm tempted to charge for my time here, but I don't want to start a stopwatch every time my phone rings or I get an email requiring a response. Maybe I should just pad my estimated hours to account for time spent communicating? Or maybe I should measure the average amount of time I spend doing administrative stuff on behalf of a project, and adjust my multiplier accordingly? Instead of a 2.5x hourly rate, maybe 3.5x? The last few factors I also hadn't been considering is that I'm a freelancer, with talent and experience, ready to hit the ground running, today. I'm not an employee, so I don't get "company benefits". No medical. No dental. No vision. No retirement fund matching. No overhead costs (HR, managers, office space, parking, cafeterias, admin staff, etc). When the project is complete, I am done and go away -- an employee would still incur costs afterwards. No employee liability. Don't like me or my work? Fire me, no mess, no HR hassle, no legal wrangling. That means I have to pay for all of that stuff out of my own pocket, so I need to charge more as a contractor. My girlfriend has taken ample opportunities to remind me that I'm not charging enough. She told me that based on my skill set, I would be equivalent to a "technical editor" in the Hollywood film industry, and they charge something like $175/hour. Based on my background and experience, and how niche my industry is, she believes I should be charging at least $300/hour. That... makes me a bit pale to consider as an hourly rate. I have a hard time believing I'm worth it. But hey, if I can complete a project in hours which would take other people 5-10x longer, if not more, than maybe I am worth it. I recently went and visited a motion capture studio near my office to figure out how I can use them and what their rates are. They charge $3750 for 4 hours, or $8000 for 8 hours. That's a lot of money for a poor indie like me, but... really, it's not a lot of money at all when you think about it. I should be charging roughly in that ball park, right? Deep down inside, I think I feel afraid to charge a lot of money for what I do. But I think I need to reframe the way I think about this. People aren't hiring *me*, they're hiring *my production company*, and for now, I just happen to be the sole employee. If I staff up in the future, I wouldn't feel bad charging high rates to cover my costs. But staffing up would also mean I have to dedicate a significant chunk of time towards staff training, and I'm capable of training staff, so... that means I'm pretty good, right? I guess I just see the work that I do as "easy" and "enjoyable" and I shouldn't be getting paid for this. But, the work is only easy for me because I've got 18 years of experience and the projects I take on are 10x easier than writing my own game engine from scratch, or building enterprise systems for the military. Truly, the biggest risk for me is that the work is such a cakewalk for me that I am bored by it. I was realizing this afternoon that I'm most incentivized to work on other peoples' projects when I'm getting paid really well for them. $75 per hour is not enough money to motivate me to overcome my boredom, but $150/hour is. My girlfriend also tells me that I'm terrible at business, that I don't really have the head for it. I half believe her because she's a lot more experienced than I am, and she's bringing in a lot more money than I am. I've been thinking carefully about what I'm currently doing, how it's not profitable, and what I need to do in order to make my work profitable and worth my time. With my current flow of contract work and my billing rates, I don't make enough money. Honestly, it's just barely enough to pay my cheap office rent. I'm practically treading water, getting nowhere even though I'm working hard. For the last few weeks, I've been thinking that I need to get more proactive about getting money. I need to get out of my chair, put on a nice dress suit, take my VR goggles, and go door to door at every company and show them what I can do for them and how it can help their business. I need to figure out my sales pitch, refine it, and go get myself some big work. I believe in VR, I think its the future, I am bullish on its prospects, and I can sell. I have proven to myself that I have the personality and capability to sell, I can build what I sell, so... I should just get up and go do it. I'm optimistic that I could do well, but I'm sort of holding myself back somehow. The dream is that I do well enough at bootstrapping that I can work myself out of every job and become more of a CEO/producer type, hiring people to replace me. Programmer? Hire that out. Sales guy? Hire that out. Film guy? Hire that out. Hire people for everything -- delegate -- don't get my hands dirty, don't get into the weeds. If I do, I'm still doing it wrong. While I'm fully capable of writing code and producing everything myself, I can't scale. I would be just one guy, taking on projects with a scope of what only one guy can complete. Big projects = big money. I also sort of think that I should split my time 50/50 between providing services to clients and creating my own software applications and releasing them online. The problem with exclusively doing work for clients is that it fixes my scalability to whatever workload my production company can handle. My throughput is fixed, and thus my income is limited by my throughput. It would be a trap which limits my growth potential. However, if I build and release my own apps at the same time, my growth potential is limited only by my marketing and sales capabilities. Once an app is completed, I can make an infinite number of copies in an instant and sell them. If I diversify and make several apps in several different market categories, a few of them are bound to succeed. I have been particularly infected by an idea which could potentially establish a new market category for content in the VR market (I'll share details after I execute). If I can produce it, market it, and sell it, and it thrives, then I could scale it out and go big. I'm planning on creating a working prototype this spring and releasing it to the market to see how it fares. Anyways, the point is that it would be easier to make $1m by scaling out a successful app than by scaling out client services, but a successful app could also be an additional service category offered to clients. However I do it, I will fund the production of Spellbound and I will have a well funded team working on it...eventually. Anyways, I did something cool the other day. I integrated Leap Motion with 360 videos, so you can use your own hands to pan the camera around. I'm also going to add in finger taps for pressing buttons, so people can feel sort of like Tom Cruise in Minority Report. The placeholder video was shot a month ago at a Dell factory in China as a part of their effort to be transparent about their production pipeline. Check it out:  




Spellbound: Winter Update

I took the last two weeks of December off for holidays, so no production was done for Spellbound during that time. I met up with my friend Russel (Magforce7) for an afternoon at my office and gave him a demo of Spellbound in VR. He works for Firaxis, so it was interesting to compare notes on development and production. Without a doubt, he's a lot more experienced with production and development, so I tried to glean as many tips and tricks as I could. It was also his first time trying VR, so I gave him a bunch of quick VR demos so that he could get familiar with the medium and how to interface with it. It's interesting to compare the differences between producing a traditional video game vs. a room scale VR video game.

In terms of production, I've written out the complete narrative manuscript for Episode 1 of Spellbound and have begun shopping it around to anyone willing read it. It's not "done" by any stretch, it's just the first draft, and the first draft is always going to be susceptible to lots of revisions. Currently, it's about 40 pages in length. That's about what I had expected. Now, I need to go through and do a ton of polishing passes. I think of the story sort of like one of those JPG images which loads over a slow internet connection. The very first version of the image is this highly artifacted mess which barely holds a semblance to the actual image, but with each pass, the resolution of the image improves and the details get more refined each time, until you end up with a perfectly clear image. With regards to writing narrative for a VR game, I think the pass process is going to be a lot more convoluted. The first pass is just trying to write the story itself and figure out what the story even is. The writer explores a bunch of different directions and the final product is the choices by the writer which yield the most interesting story. But, you can't just take the story of a writer and plop it into a VR game and call it perfect. In fact, the writer must keep in mind the medium they're writing for and what the capabilities of that medium are. If you're writing a script for a movie, you have to think about what scenes you're going to create and possibly consider a shot list, and also think about the actors who will portray your characters and the acting style. You can effectively frame the shot of the scene to show exactly what you want the audience to see. That's a great amount of power and control over the audience experience. Writing for VR is completely backwards. I have to preface this by saying that I'm a novice writer and have never written a script, much less, a script for VR, so take my words with a hefty grain of salt. My writing technique mostly consists of putting myself into the body of the character. I am that character. That character has a personal history. A personality. A style. Stated interests, and unstated secret interests and ambitions. Character flaws, and character strengths. I see the scene from the eyes of the character, see the state of the world, listen to what was just said, and then react based on the traits of my embodied character. The character should always be trying to progress their ambitions. Character conflict should happen when ambitions collide. When it comes to VR games, the protagonist is the player themselves, so you have to keep in mind that the protagonist has agency which the writer can't control. They experience the story from the first person perspective, through the eyes of the character they embody. So, whatever happens to the main character also happens to the player. With VR, the player brings their own body and hands into the scene, so those are things the writer can interface with. Maybe the player gives a bow to a king? What if they don't bow before royalty? Maybe when you meet a new character, they extend a hand to give a handshake? What happens if you don't shake their hand? Maybe a character comes forward to give the player a huge hug? The secret sauce for VR is finding these new ways to develop interpersonal connections with characters in the world and using that to drive story and player experience. I try to keep this at the forefront of my mind when writing for VR -- first hand player experience is king. I also want to give my characters depth, so I do this mostly through subtle narrative exposition, mostly in the form of ambient banter between characters. For the sake of simplicity of production, the main character doesn't have narrative conversation choices. This means I don't have to create conversation trees or user interfaces for dialogue choices and the flow of dialogue can be seamless and uninterrupted. I am starting to audition for character voices. I've got a list of local voice actor talents and am asking a few of them to send me a few demo lines from the manuscript and a quote for their day rates. It's hugely inspiring to hear the voices of the characters saying the lines I've written. It feels like these characters might actually exist somewhere outside of my imagination, and I owe it to them to give them the very best lines I can come up with to portray their nature and ambitions correctly. A few people have read my manuscript and given mostly positive feedback, so that suggests that I'm roughly on the right track. I'm going to spend a few days taking it to various writers meet up groups and getting critical feedback, so this will help me immensely to get to a higher level of polish and clarity. If you're interested in reading the manuscript and my production notes, feel free to read the google doc and supply feedback in the comments below: https://docs.google.com/document/d/1IvNYNf9NqtdikD6UZuGq-rUo9yU5LVqqgIlWsz6n2Qs/edit?usp=sharing (Note: It's a work in progress, so you can see changes happening live as I edit it.) The ideal is to write a story which is so compelling that it grabs people and makes them want to read it. I want to be able to drop a 40 page manuscript in someones lap and tell them to read it. They'll be thinking, "oh god, more bullshit. I don't want to read this crappy novice writing. I'll humor them and read two pages." So, they read two pages. It's good. They decide to read another page. It's also good. In fact, it's getting better. They turn to the next page to keep going. Wow. It's actually a decent story. They keep turning pages. Forty pages later, they're surprised to have read the whole thing and they are left wanting more. It's a pleasant surprise. The story should be good enough that it stands strongly on its own legs. It doesn't need anything else to be a compelling experience. Now, if you experience the same story in VR, and characters act out their lines, and the voice acting is stellar, the experience of the story is just multiplied by the talent and quality. This is the ideal I'm shooting for. Spellbound will be a story centered VR game, rather than a game which happens to have a shallow story layered on top. It's worth taking the time to nail the story and get it right, so I'm taking my time. When the manuscript is complete, I'll have voice actors voice out each of the characters. I really don't want to have to do a lot of dialogue resamples, so I need to make sure that the first time a line is voiced is also the last time it's voiced. The goal is to avoid revisions. So, how do I do this? My current plan is to polish the story and get it as close to perfection as possible. Hiring voice actors costs money. When I drop voiced lines into the game, I am going to need to know whether the line works in the current scene with the current context. So, a part of the creative writing process will require for me to experience the scene and adapt the writing for context and length through a bunch of iterations. I'm going to voice act my own characters with a crappy headphone mic and use these assets as placeholders. It'll be a really good way for me to quickly iterate on the character interactions and player experience. I kind of feel silly, like I'm just playing with dolls who are having a conversation with each other. But hey, maybe that's really the core of script writing in hollywood too? On a personal note, I've decided to give up all social media for a month. No facebook, no twitter, no reddit, no youtube, etc. The primary reason is because it costs me too much time. Typically, my day starts by waking up, pulling out my laptop and checking twitter and facebook for updates to my news feed. That costs me about 30-45 minutes before I get out of bed. Then I go to work. I get to work an hour later, start a build or compile, and since it's going to take 5 minutes to complete, I decide "Hey, I'll spend five minutes checking facebook while I wait.". That five minutes turns into twenty minutes without me realizing it. And this happens ten times a day. I can easily waste hours of my day on social media without consciously realizing it. It adds up, especially over the course of days and weeks. And for what? To stay updated and informed on the latest developments in my news feeds? Why do I actually care about that? What value does it add to my life? How is my life better? Or, is my life actually better? What if social media is actually unhealthy? What if its like cigarettes? Cigarettes cause lung cancer with prolonged use, so maybe social media causes mental health problems like depression, low self worth and narcissism with prolonged use? What if social media is inherently an anti-social activity? Anyways, I've consciously decided to abstain for a full month without social media as an experiment. So far, I'm five days in and realizing how much I was using it as an outlet for self expression. Something happens to me and my default reaction is, "Oh, this would be good to share in a post!", and now I realize "Oh, I can't share this on social media. Who am I actually trying to share this with? Why am I trying to share this? Can I just forget about sharing and just relish the experience in this fleeting moment?" The secondary effect of abstaining from social media is that I'm also trying to pull away from technology a bit more so I can find a more healthy balance between technology and life. Currently, if I'm not staring at a screen, I'm at a loss for what to do with my time. Should I really live my whole life staring at glowing rectangles? Is there more to life than that? How would I feel if I'm laying on my deathbed and reflecting on my life, realizing that I spent most of it looking at screens? I need new hobbies and passions outside of screens. So, I've picked up my old love for reading by starting in on some fantasy books. Currently, I'm well on my way through "The Way of Kings" by Brandon Sanderson. I'm reading his first book slowly, digesting it sentence by sentence, and thinking about it from the eyes of a writer instead of a reader. It's an amazingly different experience. He's got some amazingly clever lines in his book, and there are some amazing pieces of exposition which the author uses as a proxy to share his own attitudes and life philosophies. I am going to steal some of the writing techniques and use them myself. I'm also still doing VR contract work on the side in order to make money to finance my game project. The side work is picking up slightly and I'm getting better at it. I have this ambitious idea for a new way to create VR content using 360 video and pictures. Most clients are trying to capture an experience or create a tour of something in VR and taking audiences through it. Essentially, it's mostly just video captured in 360 and then projected onto the inside of a sphere, and then setting the player camera at the center of the sphere. It's somewhat simple to implement. My critique is that this isn't a very compelling virtual reality experience because it's really just a passive experience in a movie theater where the screen wraps all around the viewer. There's very little interaction. So, my idea is to flip this around. I'd like to take a 360 camera and place it at various locations, take a photograph/video, and then move the camera. Instead of having a cut to the next scene, the viewer decides when to cut and where to cut. So, let's pretend that we're creating a virtual reality hike. We incrementally move the 360 camera down the trail, 50 feet at a time, for the entire length of the hike. A hike may not be perfectly sequentially linear, there may be areas where you take a detour to experience a look out on the side of the trail. So, on the conceptual data structure level, we are going to have a connected node graph arranged spatially, and the viewer will transition between connected nodes based on what direction they want to go on the hiking trail. I'll have ambisonic audio recording, so you'll be able to hear birds chirping in the trees and a babbling brook in the side of the trail, etc. The key difference here is that the viewer drives the pace of the experience, so they can spend as much or as little time as they want, experiencing an environment/scene, and since they can control what nodes to visit next, they have agency over their entire experience. This is the magic of VR, and if I get a prototype proof of concept working, I think it can be a new type of service to sell to clients. I can go around Washington State and go create virtual recreations of hikes for people to experience. There's some beautiful hikes through the Cascade mountains. We have a desert on the eastern half of washington, filled with sage brush and basalt lava rocks. We also have a temperate rainforest on the Olympic peninsula, where we get 300+ inches of rain a year, with six feet of moss hanging off of tree branches. The geography, flora and fauna are somewhat unique to Washington state, so if I can create a library of interactive virtual reality experiences of various parts of our state, it would be a pretty cool experience, where you can get virtual tours of various parts of the state. It would almost be as good as visiting in person and a good way to preview a place you might want to experience. IF it is a popular form of content, I can expand my content library by offering virtual reality tours of other parts of the world people wouldn't otherwise be able to visit. Would you like to explore the tropical jungles of Costa Rica? Would you like to climb the mountains of Nepal? Would you like to walk around in Antarctica? Would you like to go to the Eiffel Tower? If I do this right, I could create a fun VR travel channel and combine some educational elements to the experience. It would be a good way for me to get out of the office and experience the world. I'm currently working on building a prototype proof of concept to figure out the technical side and user interface, and will probably have something rough built out by the end of the month. This could turn into a cool new way to do interactive cinema in VR. I haven't seen anyone else do something like this before, but I may just be under informed.




Writing the story for Spellbound

Spellbound is intended to be a story driven game. I feel that's the only thing which can make the game interesting on its own. The story of Spellbound has gone through a lot of evolutionary changes throughout the development process. When I initially conceived of the game, I just had a game concept: "Throw fireballs at zombies in VR, using your hands". As a game premise, that's mildly interesting but it would quickly lose its novelty and appeal. How do I make it interesting? I needed a story.

Initially, my writing approach was to ask hard questions about the world: Why are there zombies? Where did they come from? Why is the wizard in a zombie infested graveyard? What's going through the wizards mind? What was his life like? What was his past?

So, I tried to find answers which made sense, given that you're just some red cloaked dude in a wizard hat, slinging fireballs at zombies. The first version of the game and story was embarrassingly bad. The synopsis of the story: "You were a wizard whose wife had died, and you were searching for a way to bring her back to life because you missed her. So, you casted a spell promising to bring her back to life via resurrection, but instead, it just reanimated her and turned her into a zombie. The spell worked so well, that it also brought all of the corpses in the nearby graveyard to life as well! Your undead wife flees to the graveyard, so you have to defeat infinite waves of undead zombies. After a while, you face a big boss monster who was behind it all!"

As far as stories go, that was pretty pathetic but also short. I'm a half decent writer with imagination, I know I can do better if I just spent some time to work something out. I needed to ship something playable to people, quickly. I thought that the main map would be my main game play, but it wasn't completed yet and ready for public consumption (it didn't satisfy my quality standards). So, I created an early "prelude" level. I also needed a main menu in VR, and since this is needs to be a seamless experience between game world and game menu, the menu itself can't be a static 2D screen like you'd have in traditional 2D games -- the menu itself had to be a level which you interact with. I was ruminating on story in the back of my mind for a while at this point, and I decided that I eventually wanted to have five wizards, each from a different school and theme of magic, each with unique story lines. My game universe was growing in complexity. But, I can't focus on developing the story. I need to ship as soon as possible to get something playable out there! I had chosen the "Red Wizard" as the first school of magic and theme to focus on. I didn't know what the story would really be, but I had written a really rough outline which served as a rough map on where I wanted to go with the plot. I would come back to the story much later and flesh it out, but for now, I just needed to create the prelude story and introduce players to the game universe and introduce a character or two. I wrote the prelude story in a day, polished the dialogue, and kept it somewhat vague, but also left a cliff hanger as a lead in for the main story. Then I shipped it. Currently, you can still only play the prelude and experience that story, and its short at best, but it shows the story telling model I'm using for VR:
1. I introduce an illustrated storybook and a narrator reads the first six pages. This serves as an establishing shot / context, and also establishes the narrator.
2. I fade to black, load the game world, fade in, and the story resumes from the first person perspective. The wizard talks to himself as a way to guide the player on what to do (a bit weird), and the narrator adds story as well, sort of like how a dungeon master would.
3. At the end of the VR experience, we fade to black and return to the library menu, and resume reading 1-2 illustrated pages as sort of an "epilogue", which can serve as a seamless lead-in for the next story.

This month, I decided that I was a bit too aimless with my development and I needed to get more focused on shipping the next set of content. Okay, where do I begin? I don't have a level made, no story, barely any functioning spells, no crafting system, etc. What have I been wasting my time on?? Oh right, an AI system with machine learning. I realized that the pragmatic thing to do is stop everything else and focus on fleshing out the story for the red wizard. Once I have the story complete, I'll have a much better idea on the scope of the project, what scenes need to be built, what's important and what's not important, and I can start focusing on actually building my game around the story. This seems like an obviously good idea in hindsight. The story is like my game design document, and if the scope is too big, I can change the story until its achievable. So... I just have to write the story. The problem is, I just had a really rough outline on what I think the story should be about. Despite the outline, I actually don't know what the story is. Okay, so how do I figure that out? I just have to start writing. But, I can't just start writing blindly! I need to spend some time crafting the world, the characters, the history, the lore, etc! My approach to writing my story is to write out the very best first draft that I can, as completely as I can. The point is not to have a story ready for production, but to just figure out what the story is. What story am I trying to tell? Why is it interesting? What captures the readers attention and holds it? What can the audience get out of the story? What makes the story emotional? What creates a sense of wonder and amazement? What are the high points and low points of the story? Who are the protagonists? Who are the antagonists? Who are the supporting characters? What is every characters motive? Every character needs to have a flaw to be interesting, so what are the character flaws? How do those flaws get revealed? How does the character flaw play into the story? How does the story begin? What's the problem the characters are trying to solve? What's the struggle? How do the characters overcome the problem? How does the character need to grow in order to overcome the problem? How does the problem get resolved? How does the character feel about the resolution(s)? How does the audience feel about the resolution? How do we set ourselves up for introducing the next episode? Oh, and by the way, all of this has to be done in VR so we have to assume that the protagonist has total agency over decisions made, so story has to account for that.

It's a bit of an overwhelming puzzle to work out.  It's extremely important to note that since my game is going to be story driven, where the story either makes or breaks the final result, I cannot afford to half heartedly write a mediocre story. I have to write the greatest story I'm capable of writing. My game depends on it. The future of my one man company depends on it. My income depends on it. The story is the backbone. It's my secret sauce. My secret weapon. It's going to be what makes it a "must have" for every VR gamers library. And it can't just be a story which was shoved into a VR game, it has to be a story built from the ground up, specifically for VR, to make use of the unique story telling capabilities VR offers. So, I cannot just write out a first draft, call it good, and move forward with production. If it takes two weeks or two months to get the story perfect, then so be it. So, I'm thinking that I'm a bit of a novice when it comes to story writing. I have never published a novel. Never wrote a screen play. Never wrote a story for a game. At best, I've written a few short stories for a community college class. But, I have good story ideas, damnit! That's my stubbornness and ego peeking through, insisting that despite my lack of experience, I'm more qualified than anyone else to be the one who writes the story. How do I account for my lack of experience with "officially" not being published? I say, "It doesn't matter, I don't care, fuck it, I will just have to write 20 drafts to be on par with a professional." I think that's the right intuition though: Write 20 drafts of the same story. The first few drafts are going to be exploratory. You don't know what the story is until you've written it. You don't know who the characters are yet. You don't know their motives. The first version of the story is just a congealing of the oatmeal, where you bring it all together and sort of figure out what the real story is. This is where you answer all of the questions I listed above. You might need to write several versions of the story. Think of each version as sort of like a parallel universe, where each version can explore different possibilities in plot development. Eventually, you'll find that you're drawn to certain plot highlights and themes more strongly than others, and those become your story.

At this point, you have written your story about 3-5 times. You're familiar with it, but not intimately. Now, the story becomes more like sheet music to you (the author), and it's a bit of an unfamiliar song. You can kind of play the notes and create a semblance of what the song sounds like, but it's rough and spotty. You know what notes you need to hit and when, so the only way to properly hit those notes is to practice, practice, practice. This means you're going to be rewriting your story, over and over again, each time getting more and more familiar with the plot. There isn't a fixed number of times you need to rewrite the story, but you'll know when you've written the final version: It'll flow like beautiful music off the paper, wrapping the reader in a warm hug before fleeting away. The reader will be embraced in a feeling of warmth and happiness for a moment, and then left wanting more, more, more. You've now got a page turner. A novel people can't put down. A movie which demands your attention. A game people can't stop. What happens next?! ...Turn the page to find out!

I was recently encouraged by a blog article I read on the writing process of William Shakespeare. Most people think that his writings was pure genius, written from divine inspiration, and it just flowed to him easily via unnatural talent. Historical records of his writings show that actually... he wrote many, many revisions of his plays over the years. Even Shakespeare wasn't some savant writer who wrote perfect first drafts, and he's considered to be the best writer in the history of the English language.

But I realized that I can't just start writing successively better iterations of the same story. There's SO much more to the story world than what people read on the pages. You know how when you pick up some fantasy books, and on the first page they have a map of the world, with kingdoms, city names, mountain ranges, rivers, oceans, and all of that stuff laid out? There is a whole story universe which the story events are set within! Each kingdom may have different politics. Different cultural customs. Different building construction aesthetics. Different values. Those background differences will and should make an impact on the story as its being told! Is slavery legal in one kingdom but not another? How does the climate affect clothing and customs? How does a traveler from one kingdom deal with the differences in culture in another? Is it a source of character conflict? What are the motives of each kingdom and its political leadership? What is the history which shaped the current state of the world? How does the past factor into any current conflicts? There's a LOT more investigatory questions to ask, but you get the idea.

I realized that this narrative background stuff is very important to establish! It is literally the foundation upon which your story rests. The presence of this background scaffolding may never actually manifest in your story directly, but it is the world which contains your narrative events. If you don't build the world, your story doesn't rest on anything solid and it will be very wishy washy. So, before I started earnestly writing my actual story, I spent a lot of time writing about the world and its history. When you read my story, you are only experiencing 10% of the universe/work. The other 90% was scaffolding which was put into place, and then stripped away when it was no longer needed. People will just see the finished product and think, "Oh wow, this looks easy. I bet they just started writing from pure inspiration!", but that illusion is so far from the truth of the underlying writing process.

I spent nearly a week just writing scaffolding background material. What are all the races? What are they like? What are their values? What institutions exist in the world? What is the history of the institutions? What is the common sentiment in the kingdoms? What landmarks exist? Why are they important? What creatures exist? What's their lore and background? etc. etc.
You know what? I'm glad I did this. It created a nice background framework for me to work within. I, the writer, know everything about the Academy of Magic, who's really running it, where it's located, and its deep history, but the reader gets to discover little tidbits about this institution and they can gradually put it together like a puzzle. At the end, the reader may not know everything there was to know about the Academy of Magic, but maybe there will be more content later which brings those interesting details to the surface?

Just think about it: How much did you know about Hogwarts after the first Harry Potter book? How much did you really know about Luke Skywalker after only watching Episode IV: A new hope? And after you experienced all of the content and had a better understanding of the world, and then watched it again, how much more sense did the actions of the characters make when you understood the background context?

Anyways, I'd like to share with you a few select pieces of narrative content I've worked on recently. Keep in mind, all of this is first draft material, so there's a high likelihood that the 20th version will be very different:

Page 1:
[Narrator]: “The legend of Rupert the Red… goes something like this”
[Narrator]: “Over three thousand years ago, there was a grand battle between magicians of ages past. They nearly ruined the world, but instead, they set civilization back by thousands of years.”
*Picture of wizards at war, volcanoes exploding, land tearing up, red sky* Page 2:
[Narrator]: “The kings of old, never forgot the calamity. They unanimously decreed that henceforth…”
[Kings voice]: “all magic must be banned. Those caught practicing sorcery, shall be put to death!”
*Picture of kings sitting around a round table, one king is standing and leaning forward with a raised fist, addressing the other kings*

Page 3:
[Narrator]: And kingdoms across the lands, knew peace... With the exception of magicians.
[Angry crowd]: “Burn the witches! Burn them all!”
[Narrator]: “But while magicians and sorcerers can be hunted and killed, magic itself can never be extinguished. What the kings of old didn’t quite understand, is that magic itself is a gift bestowed upon mortals by the gods themselves. Oh, how they tried to kill magic though.”
*Picture of an angry mob with torches and pitchforks, surrounding posts with silhouettes of people tied to them, as a massive fire burns them*

Page 4:
[Narrator]: The gift of magic was a sliver of the gods themselves, given to mortals to fight against darkness. When darkness came again, the kingdoms were defenseless and fell like wheat to the scythe.
[People] : *anguished screams of terror*
[Monsters] : *roaring, gnashing and slashing*
*Picture of men, women and children being chased and killed by demon spawn. Sky is red, filled with smoke. The face of a grinning devil can be faintly seen in the clouds*
  Page 5:
[Narrator]: A few sorcerers who had evaded the murderous clutches of men, stood united against darkness and sealed it away at heavy cost.
[Magician Group]: Chanting in unison
*Picture: 5 men and women, holding hands in a circle, with red, blue, white, black and green magical flame pillars, and connected lines of magical color in a star pentagram shape. In the center, stands an old man (Sassafras).

Page 6:
[Narrator]: The kingdoms were safe again, but the kings… they blamed the magicians for their destruction.
*Picture of a group of soldiers nailing wanted posters to lamp posts*
(Hammering sounds)

Page 7:
[Narrator]: A young boy, with the reddest hair you’d ever see, was born to a pair of humble farmers living on the edge of the Black Forest.
[Baby] : Crying sounds
*Picture of a crying baby being held in the arms of a mother, with a red shock of hair on its head*

Page 8:
[Narrator]: His father named him “Rupert”. The boy grew up, as all young boys do, and trouble followed naturally, as it does with all young boys.
*Squealing pig noises and boyish laughing sounds*
*Picture of a young freckle faced farm boy with a pot on his head, chasing a terrified pig with a stick*

Page 9:
[Narrator] : But, as fate would have it, the natural troubles of boyhood soon turned into supernatural troubles which only followed Rupert.
*burning house & inferno sounds, screams*
[Narrator] : Rupert was a magician. The villagers were afraid and angry.
[Villagers]: “Rupert is cursed! He’s a witch! Burn him!”

Page 10:
[Narrator]: Rupert ran, and he ran, and he ran, deep into the black forest. The village hunters eventually gave up.
(picture of rupert hiding under a stump while a dog search party with torches looks for him in the distance)
*barking sounds in the distance*   Page 11: [Narrator]: Rupert wandered through the forest for days, getting hungrier and hungrier. He stumbled on an old, broken tower of mossy stone, and made it his home. He lived on bark and berries.
*picture of a young boy trying to eat bark in a forest, with teeth almost breaking against it*
Page 12:
[Narrator]: He lived for years, completely alone, terrified of the supernatural troubles which seemed to follow him everywhere.
[Narrator]: Last night, Rupert discovered a book as old as time: The lost book of Sassafras. He was about to change the course of history -- FOREVER.
*Picture of Rupert sleeping soundly on his back, with drool coming out of his mouth. A black crow with red eyes watches.*
Snoring noises, followed by “Caw, caw! Caw!” from the crow.

~~FADE TO BLACK FROM STORYBOOK MODE, FADE INTO GAME VIEW~~   Note: Cawlin has somewhat of a German accent. [First morning, wake up] Rupert is sleeping in his bed after his late night journey into the undead infested crypts. He has been sleeping restfully for 11 hours and it is now nearly noon. An impatient crow stands at the foot of his bed. RR: "ZZZzzzz...ZZZzzz...huuuurffffgll, guuurffflllghh..." (deep snoring) Cawlin: "Cawww... Cawww... Cawkadoodlydoo! Wake up, you!" RR: "ZZZz---huh? Who said that?! Who's there?!"
Rupert awakens slowly, the VR camera opens eyelids slowly, blinking awake. The player is looking down the foot of the bed at the crow. Cawlin: "Caww.." RR: "Oh… it’s just a stupid bird." Bird cocks it head to the side in curiosity. Cawlin: "Caww?" RR: "Oh, just listen to me. I'm already going mad -- first it starts with talking to the birds, then its rocks and then its trees." Cawlin: "Caw!" RR: "Say now, how did you manage to get in here? I didn't leave a window or door open last night, did I?" Cawlin: "Caw… Caw..."
We wait for the player to get out of bed. They can either click the bed or walk out of the bed zone. Once they move out, we quickly fade to black and fade back in, to the wizard standing at the bedside. RR: "If I'm going to be a raving madman talking to bird brains, you must ... have a name... I shall call you..." Cawlin: "Caw... Cawlin." RR: "...Cawlin." Cawlin: "Caw! It's about time you got up, it’s well past noon! And just who might yewwwww be??" RR: "What?! A talking bird?! Now, I've certainly gone mad!" Cawlin: "Yes, yes, you’re a certified loon and I’m a crow.” (rolls eyes)

Cawlin: “Now that we’ve gotten that out of the way, who are you?" RR: "Well...I'm Rupert!” Cawlin: "RRRrrrrupert… what is it that you’re doing in these woods?" RR: "This is my home! I live here." Cawlin: "Ho… how unusual... a huuuuman living in the black forest..." RR: "Unusual? ...Why?"
Cawlin: “Humans haven’t ventured into the black forest for centuries. Those that do… never come out alive. There’s something… peck-uliar about you Rupert… What ees it?”

*Rupert feels afraid for a moment because his secret about being magical might be given up*
RR: “I… I don’t know what you’re talking about.”

Cawlin: “No, there’s definitely something about you…. I can… smell eet… ah, there eet ees again! You’re… magical!” RR: “...Magical? I don’t believe in magic...”

Cawlin: “You fool! Here you are, speaking with a talking bird, and you don’t believe in magic? I watched you last night as you rrrRRrroasted the walking dead with fi-yar.”

RR: “Wait, you were there? You saw that?! It was real?!”

Cawlin: “Of course I was... I had been waiting for you... all night! Quite the pyrrrrrotechic display, if I might say.”

RR: “I still can’t quite believe what I saw. I almost thought it was just a bad dream -- I just -- haven’t been sleeping well lately.” Cawlin: “Yes, yes, it was all real. No matter! … Eet has come to my attention… that you have acquired a certain… book.” (pronounced almost like “buch”) RR: “Yeah, it was a really weird book… I heard it speak! A strange voice called out to me.” (Cawlin jumps up and down in excitement, flapping his wings)
Cawlin: “Ah… do you know what you’ve found? Theees ees sooo exciting! You’ve finally found eet!” RR: “Ehh… what?”

Cawlin: “The buch! The long lost book of Sassafraaaaaas! …. Eets verrry special to me. I must see it!” RR: “What’s so special about this book?”

Cawlin: “Oh, eet ees only the most powerful buch of magic in the heestory of the world! It has been lost for thousands of years, but lost eet ees no more! You have eet! Eet is very special.” Cawlin: "Thees book, you know, it doesn't just get found by anyone. It... choooooses... Yes, that's the right word.. The book chooses ... who it uses. Many wizards think they use books, but never does it occur to them that the book uses them! Sassafras was it's last chosen wizard, and that was thousands of years ago! And last night, it seems to have chosen… RRRrrrrrrupert. Now, ...Why did it choose rupert?!" RR: "I don't know! I barely know anything about magic.”

Cawlin: “The book must have it’s own reasons… muahahahaha” RR: "So, what now?" Cawlin: “We must read the magic buch, of course! Let’s go find eet!” Cawlin jumps onto the left shoulder of Rupert. There is no further dialogue until the player goes downstairs.

A large book sits prominently on a table next to the door. It is sparkling and glowing, softly illuminating the darkness with red light.
Cawlin: “Oh… there eet ees! ...thees ees so wonderful. I can feel eet… so close… yet so far.” (said in a deeper ominous voice)
Cawlin flies from the wizards shoulder to go over to look at the book on the table. This helps direct the players attention.
RR: “oooh...kay…” (said in the tone of, “who is this bird?”)

Cawlin: “Open eet! Let’s see what secrets eet contains!”
We wait for the wizard to use the book. When he uses it for the first time, the book opens and a bunch of green energy swirls from the book to the wizard. Upon the pages of the book is nothing but symbols and gibberish.

RR: “What was that?!”

Cawlin: “I don’t know. Magic maybe? Who cares, read the book!”

Cawlin: “Well? What does eet say? What do you see?”

RR: “It’s just a bunch of symbols and gibberish. I can’t read any of this!”

Cawlin: “What?! Oh no...I hadn’t counted on thees. Why did eet have to be him? ... Why?”

RR: “What? What do you mean?”

Cawlin: “You… you don’t actually know magic. Not yet, at least.”

RR: “I don’t? How is that possible? I was just throwing fireballs last night.”

Cawlin: “Ahem… yes… you’re welcome for thee assistance.”

RR: “Uh… what?”

Cawlin: “That fire essence you used last night… I put eet there for you. Eet was just a temporary conduit for your latent magics… You don’t *actually* know how to use magic yet...” RR: "Okay, so what? How do I read this book?" Cawlin: "I don’t know. I’m just a bird, I can’t read!"

RR: “So… then this book is useless to both of us.” Cawlin: “Maybe you can find a clue which could help us?” Cawlin flies back onto the left shoulder of the wizard.

When the player walks away from the spellbook, it disintegrates in a puff of green particles.
RR: “What happened to the book?! Where did it go?”

Cawlin: “Oh… amazing! …Eet’s bound to your magical spirit. Eet ees always with you!”

RR: “I don’t understand.”

Cawlin: “The buch! You can call eet back at any time, and you will never lose eet! Try it now… Just focus on a hand, imagine the book in it, press your fingers inward…” We wait for the player to press the book button on the motion controller. When they do, we spawn the book in that hand in a shower of green magical glitter.

Cawlin: “...and poof! There eet is! What an extraordinary book!”
The book is turned to the first page, and as we look at it, some of the symbols transform into letters and words. RR: “Well -- I suppose, but again, what use is a book I can’t lose if I can’t read it?” Cawlin: “Well, It’s a magic book, and magic itself is composed of symbols or something like that -- don’t ask me, I’m just a stupid bird -- but I’m sure there’s some way you can figure out how to read those symbols? Yes? Let’s open eet and see what clues we can find!” The wizard opens the book, and on the very first page is a small set of instructions on its use, written in a poetic style: It’s an empty book It stores the spells a wizard learns It has a few left over runes from Sassafras   Cawlin: “Oh, dear! The years just haven’t been kind to the pages of parchment. Even magic itself can’t protect its pages from the sands of time forever… Oh, no… oh, woe… it seems, knowledge… it has all been lost. Whatever will I do now?”
RR: “Uh… you make less and less sense by the minute. You seem to know more than you’re letting on, so tell me bird, what do you know about magic and this book?”

Cawlin: “Ehe. Well. ahem… Magic is just a tool used by mortals -- I mean, men… and eet can be used for evil or good. It just depends on the contents of the heart of the magician. Good magicians, naturally choose good magics, while evil magicians will choose… so called “evil” magics.” (Cawlin says “good” with disgust, and “evil” with affection)

RR: “So what? How does that help us?”

Cawlin: “One thing you must understand about magic, is that eet is composed of magical words and symbols. Without the proper words of a spell, there simply is no magic! So, men with the talent for magic, would often work very hard to find the proper symbols for magical spells. Sometimes, these… experiments, would go… very wrong! And they’d explode. Or turn into toads. Or become green for a day or two. Either way, playing with unknown magic is… dangerous.”   Cawlin: “Once a good sequence of magical words have been found, the magicians would write them down in their spell books. Then, they could say the magic words at any time, and… POOF! The spell would just happen!”

RR: “Just like that? It doesn’t sound so bad!”

Cawlin: “Well, it’s not quite so easy… There are lots of symbols to choose from, and just as important as the symbol itself, is the color of the symbol! Without the right rrrrecipe, you might be using the right words but never actually working the magic.”

RR: “So… magic words, magic orders, magic colors… why does it have to be so complicated?!”

Cawlin: *chuckles* “heee heee hee, you’re barely even a novice. Of course it seems difficult for you now, but in the hands of a master magician, magic can be wielded to shape worlds...and… make fooooood. Like… delicious corn! Let us start there -- you haven’t had breakfast yet, have you?”

RR: “I was just going to step out of the house to nibble on some delicious tree bark for breakfast…”

Cawlin: “You -- with your talent for magic -- have been eating bark this whole time?! Unbelievable! It’s time to change that. Fortunately for you, and my oh, so generous mood this morning, I happen to have found a few symbols of magic.”

RR: “What? You’ve been holding out on me. Why didn’t you say so sooner!”

Cawlin: “Well, they won’t do you much good unless you know how to scribe them into a proper spell.”

RR: “Where do I begin?” Cawlin: “First, we must go forage the forest for ingredients with magical properties. The first thing we’d like to collect, is a red pepper. Let’s go find some.” Rupert and Cawlin go wandering through the forest until they find a red pepper growing on a bush.

Cawlin: “There! Right over there! A red pepper!”

Rupert picks the red pepper.
RR: “Okay, I’ve got the red pepper. Now what?”
Cawlin: “The red pepper has the essense of red magic! That’s why it burns your mouth when you eat it. We must extract this magical essence and use it to write your first spell. Let’s go back home.”

Rupert and Cawlin return to the mossy tower.

Cawlin: “Everything has a bit of magic in eet. It is the job of the alchemist to extract this magic and brew bottles of magical extract. Many mortals don’t rrrrealize what they’re actually doing, but they treat these magical extracts as ‘medicines’, but it’s actually magic at work. A brewed potion has potency, depending on the skill of the alchemist and the ingredients used.”

RR: “I’ve never brewed a potion. Where do I begin?”

Cawlin: “Well, you don’t really have a prrrrroper alchemist work bench, so we’ll just have to use the most rrrrrrudimentary tools available to extract the magical essence from the red pepper. You must crush the red pepper between some rocks, and you’ll get a little bit of red magic essense. Try it now.”

Rupert places the red pepper on a slab of rock and smashes it with a rock. A few seconds later, small vial of red liquid emerges.

Cawlin: “You did it! A vial of red magic!”

RR: “How do I use this?”

Cawlin: “If you drank it, it would burn your mouth and upset your stomach, but we’re going to use it as ink to write magic symbols. Let’s go to your test chamber… Oh... you don’t have one. Well, that table will have to do then...”

When Rupert approaches the table:
Cawlin: “Fortunately, I happen to know two magical symbols -- ‘Li’ and ‘Tu’. We can write them down on a magical parchment, in any order and with any ink, and if the symbols match a spell, you’ll be able to save it in your magic book and cast it any time.”

Cawlin: “To begin, grab a parchment and a quill!”

Rupert performs a “use” action on parchment paper. The spell crafting UI pops up on parchment.

Cawlin: “You’re barely even a novice, so you can only discover spells with two magical symbols. Later, you can cast much more complicated spells. Let’s begin with novice level magic.” Cawlin: “You don’t have a lot of parchment to work with, so you’ll need to find a spell quickly. To begin, select a symbol slot with your quill…”

Rupert places his quill on a slot icon and a dialogue window pops up.

Cawlin: “You only have a red magic essence, so choose that as your ink. Then, pick a symbol to write in this slot.”

Rupert chooses a symbol (either “Tu” or “Li”) and writes it into the slot. After the symbol has been picked, it is written into the slot.

Cawlin: “See? Even a novice can do this! Next symbol!”

Rupert repeats the same process for the second symbol.

RR: “Now, I’ve got two red symbols written down. Now what?”

Cawlin: “Now, you try to cast these words! It’s already in your hand, so just give it a throw and see what happens…. I will just fly over here… and stay well out of the way...”

Rupert throws the current magic spell. It either creates a magic spell (if correct), fizzles out, or creates a magical disaster. (Let’s assume it fizzles out)

RR: “What? Nothing happened!”

Cawlin: “You’re spell fizzled. Consider yourself lucky! That combination of symbols and ink was not a spell, let’s try again.”
Rupert uses the parchment again.

Cawlin: “This parchment is magical! As you can see, you got the right symbols and right color, but in the wrong order. Now, we can try a different sequence.”

Rupert keeps trying out different symbols, until he writes out “Tu-Li” in red ink. When he gets this sequence:
Cawlin: “You did it! You created your first spell! This is so exciting… I remember now! Tu-Li is fire, but your TuLi is very weak because you used a red ink with low magical potency. However, this spell is now saved in your spell book!”

RR: “So, I can fling these little fire darts at any time now?”

Cawlin: “Yes… you’ve begun the journey of a magician! You can find more symbols to discover other spells, and brew more potent potions to create stronger spells.”

RR: “Wait a minute… my essence of red magic is gone! Did you steal it from me?!”

Cawlin: “Relax yourself, Rupert! Whether you fail or discover a spell, the used ink is consumed. Magicians are always scavenging for ingredients to brew -- you magicians are scavengers, just like me!”

RR: “Now what?”

Cawlin: “Well, I must go. I smell a dead racoon down by the lake, and I’m absolutely starving. As for you? I saw an abandoned ruin this morning, but it was too dark and scary for me. Maybe your fire could shed some light on the situation? Or perhaps, you can find other ingredients?”

RR: “You’re leaving me?!”

Cawlin: “I’m getting rather...peckish. I’ll be back... Muahahaha!” Cawlin flies away and the wizard is left alone. There’s not much to do, other than hunt for ingredients or check out the abandoned ruin. At this point, we spawn clovers, blueberries, red peppers, orchids, and black lotus flowers. These are collectible ingredients which can be ground up and turned into vials. We also unlock the ancient ruins and make it accessible. Within the ruins is a new magic symbol which can be learned and a mortar and pestle. The player can summon a small flame to light their way through the darkness. There is a section of the ruin which is sealed off with a heavy door and some other strange symbols of magic. When the player emerges from the ancient ruin, the day has turned to evening.

RR: “Wow, it’s evening already?”
RR: “It’s getting late, I’d better get home before the forest monsters come out!” When it’s dark, we start playing large monster noises in the distant forest, mixed with snorting noises (like a sniffing pig), and something large crashing through undergrowth.
RR: “There’s something out there… it’s hunting me!”
  Rupert returns to his wizard house. He’s tired and ready for bed.
RR: “Whew, safely home at last. I need to get some sleep.”
We wait for Rupert to go to sleep OR until it is 2AM in game time. Either way, we fade to black and we begin to hear snoring noises.




Spellbound: October Update

This update is going to show you guys what an idiot I can be. Be warned, this could happen to you too!

For the past month, I have been focusing almost exclusively on developing an artificial intelligence system which uses machine learning to play the characters within my game. This is a primary objective. I have spent several weeks learning more about artificial neural networks, reinforcement learning, and a few other AI methodologies. I am by no means an expert at any of this -- I'm just a novice/beginner. I have also spent considerable time working on developing my own AI system which combines the best elements from the existing methodologies but also introduces a model for actual intelligence. Digging into this has felt like a series of intellectual epiphanies exploding in my head and has been extremely rewarding. I feel like I have a strong grasp on intelligence, learning, consciousness, and sentience, and am on the verge of creating a successful conceptual model to emulate intelligence. Okay, that's a bold claim to make. I'm going to just cut to the chase and discredit myself. This is like saying, "I found a compression algorithm which compresses anything by 97%". Strong claims like this, require proof to be believed, and I have not implemented this. Instead, I'm going to share my design progress on this:
AI 2.0- Reinforcement Learning.docx
(~8 pages, 10 min read)

Within Spellbound, I have spent a lot of time refactoring the AI and preparing it for a machine learning system. An AI agent now has memory and gets signal inputs about the state of the world through its senses. I have implemented sight, hearing, and smell. Sight is a cone of vision which is oriented to the characters head position and rotation. I collect a list of all objects which overlap the cone, and then I do a line trace from the eye to the object to see if there is a line of sight. If an object passes the cone test and the line of sight test, then it is registered as a visible object. Hearing works a bit differently than sight: Sight is looking out into the world to perceive objects, hearing is waiting for object noises to come to us. So, when an object creates a "noise", I create a sphere at that location and set an intensity value to be proportionate to the decibel value of the sound. Then, I change the radius of the sphere at the speed of sound and stop when the intensity of sound attenuation reaches zero (via inverse square law). If this sphere overlaps an ear, and the ear hearing threshold is capable of hearing the current intensity of the sound, then we register the object as being "heard".
The sense of smell is a bit different. Some objects emit odors over time, and the odor of an object slowly radiates outward (probably following an inverse square law for intensity as well). The important note to make distinct about odor is that an object is continuously emitting odors over time. Again, an odor is going to be represented by a sphere which grows over time and only overlaps noses. As an odor emitting object moves, it emits more odor spheres, and we get an "odor trail". A smart creature with a nose can detect an odor, and then find what direction the odor gets stronger, and then it can follow the odor trail to the odor source. So, a hungry zombie can smell living flesh and follow the smell to a living person.
All of the sensory inputs are stored in the short term memory of a brain. If a sensed object is no longer sensed, the lack of sensory information doesn't mean the object stopped existing -- it's sill persistent in memory. Instead of using raw sensory information as our input stream, I use short term memory as the input stream to drive behavior. We can think of memory as a representation of world state for the AI agent, and then operate based off of the state. We can either use this state information as inputs into a state machine based expert system, or we can feed this into a machine learning system. Either way we handle the inputs, should not matter: The output of both systems should be the most optimal behavior for the given state.

Currently, Spellbound uses the state machine based expert system for AI. It works. It makes a believable illusion of intelligence. The code for each characters behavior is roughly 200 lines. That's kind of manageable, right? Keep in mind, the behavior is currently scripted only to suit what is necessary for the prelude chapter of the game, so every time I want to add new game mechanics or capabilities, I will have to script out more behavior. This is where I become an idiot. My line of reasoning:
"Okay, I am probably going to eventually have up to 50 different characters. They will all need AI scripts to drive their behaviors. My game is constantly changing, so that means every time I make a significant change to the game, I will have to update each AI script. That sounds like a lot of work! Okay... I also don't even know what the most optimal behavior for every character will be, so that may mean that some expert systems are not going to be very good. Wouldn't machine learning be able to handle this gracefully? Let's do that." Okay. Why am I an idiot? Because machine learning is a trap for engineers. I recently learned about this new term called "Nerd Sniping". Let's take a reality check on what I'm trying to do here. I'm trying to create a generalized AI system which is so good that it learns how to play any character in my game as an expert, without any coaching or training from me. To date, the DeepMind team funded by Google, has been able to create AI systems which play Go so well that they can beat world champions, they can play atari games perfectly, etc. Now, I'm asking that same type of intelligence to play any character in my game? It's possible, yes, but it's not easy. After spending a month doing R&D on this, I realize how hard this would be to accomplish, and if I were to put an estimate on how long it would take for a novice/beginner like me to implement this, I'd be looking at a minimum of 3-6 months. That's 3-6 months in developer time, which means the realistic estimate would be multiplied by any number between two and ten. Just as I have the capability to write my own game engine from scratch (which I spent 12 months on!), I also have the capability to create this kind of general AI system. The hard question is, "Is this really the most important thing for me to work on for the next six months?". Let's put this into a different context: "Is the alternative approach cheaper and faster and less risky? (yes)" and "Do you want to ship games today or build technologies for 6-12 months away?"

You know that "Always be closing" scene from "Glengarry Glen Ross"? The equivalent for game development is "Always be shipping!". The focusing question for everyone on the team should be, "What am I doing to make this game ship as soon as possible?" And the other question: "What am I doing to increase sales?"
If you don't sell, you don't make money.
If you don't make money, like it or not, you are on your way out of the industry.
If you don't ship, you don't sell.
If you ship garbage, you don't sell.

Therefore, by hypothetical syllogism: If you don't ship or you ship garbage, then you are on your way out of the industry.
If you want to stay in the industry, then ship fast, ship quality, ship often.

My AI system, while interesting, does not help me ship my game faster. It's a trap. It's a premature optimization to solve a problem I don't have yet (and may not ever have!). There's a bigger problem to solve: I need to ship quality content asap. I could continue working on this AI system and I could develop it to work and be so good that it can be reusable within any game, and I could turn it into its own product/technology and license it out to other companies, even outside of the game industry. I eventually plan on doing this. However, the right time is not right now. I need to ship my game, and whether I have machine learning AI or expert system AI, won't matter to 99% of the customers.

So, I'm going to focus on wrapping up the production of the Prelude episode, shipping it asap, and then switching gears to working on the content for Episode 1. I'm going to design the content for Episode 1 to keep AI behavior relatively simple for now. If I ship Episode 1 and sales completely suck despite my best marketing efforts, then there's no point in creating Episode 2. If Episode 1 is a success, then I can build Episode 2, and *that* may be the right time to build out my machine learning AI. Certainly by Episode 3. The key is to build a customer base first so that releases actually have an audience to see them.

I've recently been talking by email with a developer relations rep from Oculus. He wanted to drop the price of my game for their online store to better reflect the content. Initially I resisted the idea, but started thinking about alternatives. 

I currently offer my game on Steam for $20 in early access, which has Episodes 1-3 included, whenever the production finishes. I like the simplicity of that structure because it means I can just release builds which have content updates included. Another option I am now considering is releasing each episode as a separate purchase. I could release the prelude for free to act as a teaser/loss leader, and then have in app purchases for each episode. It might be a good way to build out an customer base, because people like free shit and if the content for the free episode is great and I leave a huge cliff hanger at the end, people will want to buy the next episode. The problem is that the current build on Steam only contains the prelude, so if I give the prelude away for free, nobody has any incentive to purchase the full set of content for $20. So, my current solution is to set the current build to the "premium" version when Episode 1 is released, and then make the prelude free. Existing customers won't feel cheated because they'll get all of the future episodes included. If people want to buy episodes individually, they'll cost a little more per episode ($7.99?) than a bulk purchase of $20. This also solves a future problem as well: What if a future customer isn't interested in the "Red Wizards Tale", but they do want to experience the content for "The Sorceress of Light"? Instead of spending $20 for content they don't want, they can spend it on what they do want.

Anyways, I need to refocus my efforts on shipping the final update for the Prelude. Get it done! The next step is to write the script for episodes 1-3. I've been reading a lot of fantasy books lately to get a better feel for writing fantasy, but I now just feel like an amateur writer in comparison to J.K. Rowling, Brent Weeks and George R.R. Martin. I guess it's important to remember that writing a good story is like constructing a skyscraper. If you only look at the finished product in wonder, you won't see any of the scaffolding it took to build it. The scaffolding of a writer is 20+ iterations of the story? So, I have to write my script about 20 times. The first five drafts will probably be garbage, and will mostly be about trying to find the story I want to tell. The remaining 15 drafts will be refining the story I found and polishing it to perfection. And writing for VR games is more like writing a movie script than writing a book. The reason I need to write out the full story in advance is that I need to know where the story is going so that I can go back to earlier sections of the plot and drop foreshadowing hints, cliff hangers, and sharpen plot twists.




Spellbound: September Update

PAX: I went to PAX as an attendee and checked out a few booths and games. I was thinking about setting up a booth in the VR section, but the financial reality made that impossible. I just can't afford the booth fee (10x10 booth - $1,050). Even if they gave me an indie discount, the price puts me way out. So, out of wild curiosity, I went to check out the VR village section of PAX. How many VR developers decided to have a booth at PAX? Who showed up? What was being shown? The results were surprising and not surprising at the same time. Oculus had purchased half of the floor space and were busy giving demos of their hardware and select games. They have deep pockets, so they can afford that, whatever it costed. The rest of the booths? There were about four VR booths. One was an indie team showing off a really early and rough prototype of their unity game. It was so early and rough that it was unremarkable at best. They got lots of feedback, but spent $1,000 + 4 days for it. There was Archangel VR, a booth run by Skydance Interactive's VR division, but aside from that, there was nobody else there. Zero indie VR developers at PAX. What does that tell you? I think it means that a lot of other indie VR developers are exactly in the same position I am in and can't afford PAX, so most of the VR industry is a no-show. VR Contract projects & 360 VR Audio:
I created a few 360 videos in VR with the film guys in my office space. I've gotten pretty good at it, so we're starting to experiment a bit more. One of the problems I have with 360 videos in VR is that it's really not the "best" use for VR. I think the inherent nature of VR requires the audience to feel like they exist within the virtual environment, and 360 VR doesn't quite sell the experience. So, we're looking at creating hybrid experiences, where we have a 360 video combined with 3D props which people can interact with. I'm also experimenting with better directional audio. I'm setting up a test demo where we have a 360 camera rig setup in a room and we also have four microphones set in known fixed positions, relative to the camera location. Then, I'm going to walk around the camera and make some audio noise so that the four microphones pick it up. Then, I'll take all four audio recordings and place sound emitters at the same relative position within VR, so when you replay the experience, each audio emitter plays their recorded track and the sound is automatically spatialized and attenuated. The cool part in all of this is that VR requires directional audio to attract the audiences attention to a point of interest. Like indirectly saying, "Hey, look over here! Something interesting is about to happen!". This does create some additional demands for video production though, because if a crew goes on site to film, they have to hide four to five microphones within the scene and save the positions relative to the camera so that it can be correctly replayed. The test is to see whether this creates enough value to make it worth the effort.

Another VR project I worked on recently was for a 360 VR video which plays like a "choose your own adventure". It's interesting, because you watch a bit of 360 video with actors following a script, something happens, a decision has to be made, and then you the audience, decide which direction the story goes, and the next segments of video resume until the next choice. I found that this has some technical problems to overcome:
1) high resolution 360 video has large file size. One minute of video is about 500mb.
2) The total size of a choose your own adventure video application is the sum of all videos. A 20 minute experience could be 20gb. I don't know how we're going to get people to download that onto their mobile phone. Video streaming would be a necessity!
3) Users have to be told that they have to interact with the video at certain segments. The interactive part of the video should loop without breaking narrative or fourth walls. This creates narrative challenges.

I tentatively think that this project is the first of its kind in the world. I've never heard of anyone else making a choose your own adventure film in VR. I think this could be a new product category and brings some interesting narrative tools to filmmakers. Branching stories are nothing new to video games, but it is new to immersive cinema. The project is a rough prototype which is seeking funding from Oculus via their launchpad program, so it may never actually see the light of day. Only time will tell, so we'll see what happens. Spellbound Story Writing: This month, I read the very first Harry Potter book. If Harry Potter is going to be a source of inspiration for the story/narrative, I should at least read the books so that I have a good understanding of the narrative structure and style. J.K. Rowling is a master writer and story teller, and it would be near impossible to replicate her work. However, that's not really my intent. I realized that just by reading her books through the eyes of a humble amateur writer, I picked up some new writing techniques. There was evidence of intentional design with the way the story was written and laid out (lots of setups). She certainly didn't just write a first draft, call it good and send it off to the publisher -- I got the sense that it was an intentionally crafted series of events which came through several iterative writing cycles. I think in my first draft, I'm mostly going to write out the full story with the intention of throwing it away (like a rough sketch). The goal is not to write a publishable story, but to figure out what story I want to tell. The next iteration would be a good second draft, but maybe the third, fourth, or fifth draft would be a lot closer to the final story. I think when you know what story you're trying to tell and how you're trying to tell it, the subsequent drafts become more focused on telling the story with flourish and style rather than figuring out what story to tell and how to tell it (if that makes any sense). The immediate production goal will be to finish up the current build I'm working on, and then spend a full month doing nothing but writing out the complete story as many times as it takes to get perfect. The story will have to be complete (for the whole "Red Wizards Tale" series) so that I properly structure the events to lead into the next story. It's always easier to change elements in a previous story if you find yourself writing yourself into a corner or if the story is boring. And it's way better to figure out how to fix the flaws in a story before you commit to the game production of each episode in the story -- know where you're going rather than blindly feeling your way forward. The interesting challenge here will be to figure out how to properly integrate VR into the story telling. So far, every story I have seen in VR has been garbage. I don't know exactly why, so I have to think long and hard about the underlying principles of VR narrative I need to use. One thing I know for certain though: The story protagonist must be the player. The story is what happens to the player, rather than something that is told to the player.

Spellbound AI: This has been an ongoing effort on my part. I initially set out to just finish the boss monster (Sassafras) and replace the placeholder asset I currently have in game. The idea was to create a boss which does a few special abilities and generally makes life difficult for the player, as would be appropriate for a boss monster. Unfortunately, I got carried away. The characters in the game were carefully scripted expert systems based off of state machines. Everything was hard coded, so things were pretty rigid. It works. Good enough. However, every action that a character could perform was just a hard coded "thing" that happened, rather than being an ability which was used. So, I set out to change this: Everything a character does should be an "ability"/"action" which is done. The ability is character agnostic, so using an "eat" ability would be a general ability but implementation would be character specific (polymorphism all the way!). Then I got this crazy idea: Each ability is really like an output node on an artificial neural network graph. In my current case, I'm just hard coding when to execute which abilities based off of an expert system I hand crafted.  Okay. It works for a few monsters. But what happens if I want to create dozens of different monsters, all with different behavior patterns? Do I *really* want to go and code up brittle expert systems for each monster class? Or is there a way to avoid all of this future work by creating the framework for a more advanced AI system now? I thought long and hard on how this new AI system should work. I don't want to hard code behaviors. I don't want to have an AI that needs to go through thousands of training cycles to get appropriate behavior. I want my AI system to gradually learn and get smarter. I want unscripted intelligent behaviors. So, to get all of this, I need to invent a new type of AI system. That requires creating a model for intelligence. I think I got it. Here's a rough outline on how it will work:
  Input Feed:
    A list of interactable objects (food, characters, doors, walls, ladders, etc).
    State of self (health, stamina)
    Hazards Decision Graph:
    Given the list of known inputs, choose the best action to perform.     The best action is the output with the best reward.     Graph Construction:
        The list of outputs is going to be created based on the list of inputs provided. We are going to create a list of possible final outputs.
        Then, we're going to create a weighted graph from our current state to the final output state.
        The weighting will be determined only by time cost (with travel time included).
        Then, we're going to evaluate the traversal cost of each final output node. This is done by summing the costs of each node traversed.
        The final output node with the best cost to reward ratio will become the "end goal".
        The chosen action will be the first step towards the end goal node.     The graph is reconstructed only when the input feed items changed (added or removed). After reconstruction, the graph is re-evaluated. Outputs:
    A list of possible actions Final Output:
    A chosen action   So, we have a graph which is constructed based off of input nodes (senses) and output nodes (possible actions) and the input nodes are connected to the output nodes via a series of necessary interactions. The final output will be determined by the best cost vs. reward ratio. The key to note is that the "cost" comes from the graph itself, but the "reward" value is going to be a variable function based off of the creatures brain value system. The graph will be like a template framework which brains use to determine the best course of action at any given point in time. The individual personality / behavior patterns will be created by tweaking a bunch of personality parameters which give various outcomes different reward weights. So, you can take the same graph, with outcomes which have the same weights, but the chosen outcome is going to vary by which brain is evaluating the rewards of each outcome! The brain of a goblin will choose different actions from the same weighted graph which a zombie would! The only unknown right now is "how does a creature do long term planning via evaluating a chain of consequences?" Anyways, a significant part of this month has been focused on creating the input layers and output layers of this graph. I have created the abilities system which can be represented as output nodes, and I'm currently creating the sensory input systems which are represented as input nodes. The current senses I am working on are:
-Eye sight

Eye sight is pretty straight forward: You just attach a vision cone to a creatures head and feed the creature a list of all interactable objects which overlap the cone.

Hearing is a bit challenging. I actually want my characters to listen for sounds and to interpret and identify them. The end goal is to have the players microphone listening for the players voice, so if the player is talking in the graveyard or screams at the sight of a zombie, nearby monsters will hear the player making noise and be alerted to their position. Smell is going to be an interesting sense. I will attach "smell emitters" as a component to objects. Every second, the object emits a "smell" which is represented as a slowly expanding sphere. Each smell sphere will be linked to the next smell sphere, so it'll be sort of like a linked list. If a smell sphere expands so much that a smell is sufficiently dissipated, then it is no longer "sensable" and will get destroyed. In effect, a player walking around the graveyard will emit a trail of "fresh meat" smells which zombies will latch onto and follow like blood hounds. A lot of this is currently very much still in the "concept" phase of development, so I may be completely wrong on some ideas and approaches. However, I think the concept for this type of AI is a bit different from anything else I've seen (though, I am ignorant at what others have attempted so this may just be a reinvention of the wheel). If all goes well, I'll have a generalized AI system which can be used for all creatures, and behavior becomes an emergent property of a brain with preset value systems. When the scope of my game expands, I'll have intelligent entities which learn to function within the environment with minimal extra work on my part. I think once I have a fleshed out version of this AI system working, I'll write a comprehensive article detailing it out so other people can replicate it. Startup Week: Yesterday I gave a bunch of demos to the public during Startup week in Seattle. Everyone who played the old build was amazed by the tech, visuals and interaction systems. I wanted to say, "You think that's cool? Just wait until you see what's coming next...". I have slowly come to realize that my interface system is not easy enough for people to use. I still have to instruct people on how to play the game, so that means my game is not good enough. Trademark Conflicts: Today, it finally happened. I had the first trademark name conflict. On occasion, I look at the traffic to my Steam page via google analytics to see if there are any changes. Normally, the page averages about 30 visitors a day (That's pretty bad!). Two days ago, traffic went up to 650 visitors in one day. WTF? I did absolutely nothing to get this traffic, despite any intentional efforts. What happened? Why were people suddenly looking at my store page? Did I get a big break? Did I get surprise press coverage without knowing it? Did a social media page promote my game without my awareness? Did a popular youtube video go up? A kindly worded Reddit post somewhere? Was the Seattle Startup week more positive exposure than I expected? Why did traffic spike? It turns out that PC Gamer had released an article about a game currently in development by Chucklefish. The game looks like a version of Stardew Valley, but involving magic. Their internal name for the game? "Spellbound". This got coverage on Reddit with about 950 upvotes, so people were really excited about this game in development. As a result, people went to steam and started searching for "Spellbound", trying to find the store page for the game, but instead stumbled onto my store page. Uh oh... consumers are confused! And also, "Yikes!". What happens if Chucklefish releases their game in a month or two, brands it as "Spellbound", pushes a lot of marketing material promoting that branding, and then they realize that my game is getting confused with theirs and getting blow off traffic? Then their legal team decides to file a trademark to protect their name and then issues a "cease and desist" order to me, forcing me to give up my game name even though I had it first? Oh no... that would be a complete disaster for me because I've been using the name for over a year and it's the name my customers are familiar with, and all of my hard fought efforts would be undermined. It would be extremely disheartening. So, today I learned all about Trademarks. I filed a trademark application with the US patent office to protect the name of my brand. I then sent a very kindly worded email to Chucklefish to inform them about the naming conflict. In hindsight, I should have done this over a year ago so that other companies could look up the name in the trademark database before choosing the name and avoid conflicts. Completely my fault! Let this be a lesson to you guys: Before you name your game, check to see if its trademarked, and if its not, trademark it! Copyrights apply to intellectual property, trademarks apply to brands. I expect this will never turn into an actual problem, so I'm not worried, but I did file a trademark as a precautionary measure. This is an area you would want to be pro-active in, rather than being reactive like I am.




Establishing and maintaining flow

Definition: "Flow" is that mental state you enter into when you are focused and highly productive. It is a pleasurable state to achieve and leads to productive gains (aka, "getting into the zone"). When it comes to any sort of creative work (game development, writing, artwork, design, etc), it is really important to get into the flow state and maintain it for as long as possible. I would dare to suggest that this is one of the most important things for you to manage in yourself and others, and success is hardly possible without consistent progress. You want to get into this flow state when you begin creative work. Establishing Flow: Onramps The reality is that establishing flow is a fickle beast, and it's not something that can be toggled on and off like a light switch. Sometimes, you may spend an entire day trying to establish it and have no luck. These days are generally wasted, unproductive days. However, there are various controllable factors which make it easier to enter into the flow state. Some factors have no effect on some people, but some factors are universal. Here is what I have found to work:

Coffee: It is brown, hot, delicious and a caffeinated stimulant. It gets my brain juices flowing.

Music: I find that music helps to eliminate external distractions and can be invigorating.

On ramps: I purposefully design my task list so that I have an easy entry point for the next day. Leave yourself something easy and accessible to start the day with. You want a quick and easy victory so that you can build momentum. Once you have momentum, you can increase task complexity/difficulty and slide right into the flow state. If you don't do this, you create a barrier for entry for yourself the next day and its mentally easier to procrastinate or avoid work because its hard. Example: "This bug is super simple to fix / this feature is super fast to implement, I'll leave it for tomorrows onramp."

Exercise: By exercise, I don't necessarily mean going to the gym or sweating up a flight of stairs. I like to briskly walk to work, which increases blood flow and wakes me up.

Intention to work: I find it's helpful to have an intention to go to work to get something done. Clench your fists and say, "I will get this done today, no matter what.", and make it happen. Set a resolve for yourself. If you are in an environment filled with other people, you will share their intentions. If they intend to screw around all day and do nothing, so will you. If they intend to focus and get work done, so will you.

Enjoyment: It really helps a lot to enter into the flow state if you enjoy what you are doing.

Habit: If you have established a habit of consistency, you will find it's easier to repeat a pattern. This can be good and bad, because habits can be good and bad. Focus on creating good habits and breaking bad habits. 

Days off: We are not machines, we're humans. We need to take days off from work in order to maintain fresh minds eager to work. If you don't, you risk burn out and your productivity will diminish to zero whether you want it to or not. Its more productive to not work every day. That doesn't necessarily mean you have to take off every weekend -- take off a week day. You know its time to take a day off or go on vacation when you mentally feel like you are in a repetitive grind, doing the same thing, day in and day out. Sleep: From experience, it is not possible to enter into the flow state and maintain it when I have not had sufficient sleep. I am adamant about this. If you need an extra hour of sleep, take it! Would you rather spend the whole day fighting against brain fog due to lack of sleep (resulting in a wasted day) or would you rather spend an extra hour or two sleeping so that you can be maximally productive for the rest of the day? Distractions: The flow crash. I think of flow like traffic and driving cars. You have to gradually increase your speed before you reach this optimum cruising speed of maximum productivity. Distractions are like getting into a head on collision or hitting the ejection seat button. Here are the distractions to worry about and why they are distractions People interrupting you - They come up to you and start a conversation with you while you were in the flow state. Now, that state has been ended and you probably lost about 15 minutes of productivity time in addition to the time it takes to have the conversation. You want to design your work situation to prevent people from interrupting you. Lock the door. Have reserved distraction free time. Work alone. Schedule meetings instead. Side conversations - Someone else is talking about something to someone. They're having a conversation about something. It doesn't even have to be interesting. Whether you want to or not, you are probably listening to bits and pieces of this conversation. Every time you switch your mental focus from your task at hand to the conversation, you are interrupting yourself and getting distracted. Ideally, the way to counter-act this is to work in a quiet space without distracting conversations or noises. A second best solution is noise cancelling head phones with music which has no vocals. This is one of the top reasons why I think "open office" floor plans are terrible for productivity. Social Media & Email - Holy crap, this can be distracting and a major time sink. This warrants a category on its own because it can really destroy your day. How? Let's say you get an email from someone. What happens? Do you get a pop up notification and a noise? This suddenly attracts your attention to this email event, even if you ignore it. Flow = hitting the brakes. Social media is terrible as well because it can turn into an addictive cycle. "I wonder what's happening on facebook? Do I need to catch up on twitter? Reddit? instagram? email? online forums?" The curiosity can haunt you when you're trying to establish the flow state and you can easily give in to your own curiosity and accidentally waste 15 minutes to 5 hours on social media and email. This is a robbery of your time. For what? What tangible value do you actually get out of it?  Cell phones - Yet another source of distractions. They ring and make noise when people are trying to call you. You feel obligated to answer calls or risk being rude. You get text messages from people in your life. Ideally, I would throw my phone into the ocean and never get another one. Practically, you should put your phone on silent. Let your loved ones know that you are unavailable during certain hours. Home life - If you work from home, there are more distractions than you can count. The more people, animals and noise there are, the more distracting home becomes. Is your spouse trying to spend time with you? No work gets done. Do you have kids who need attention? No work gets done. Kids also have no concept of interruption, so they can't sense when you are busy. If you have animals, what happens when the dog barks at a noise? Or the cat meows for attention or walks across your keyboard? What about chores? "Honey, can you take out the trash? Can you do the dishes? Vacuum the living room?" etc. Home is generally a terrible place to get work productive done. If you must work from home, you should have a quiet study to work from, where you can lock the door to keep people out. Alternatively, you should work away from home. Food and bathroom breaks: It's a biological necessity for survival to eat and drink, and generally something you should do. Keep in mind though, excessive drinking of coffee (or other liquids) can lead to frequent bathroom breaks, which interrupt your flow. If you smoke cigarettes, smoke breaks can also be flow breakers. I advise against drinking alcohol if you're attempting to remain productive. If you get hungry, you should eat. Continuing to work while hungry turns into a flow interrupter because the pangs of hunger start turning into repetitive interruption signals. Technology - You have to be very careful with technology. Some technology is beneficial and enhances productivity, but other technology is a source of distractions with limited benefit. It's sometimes hard to tell the difference. Generally, instant messengers, skype, discord, email, and any application which interrupts you with a notification of any sort is bad for flow maintenance. Entertainment - In 2017, you have a ton of entertainment available for you at your fingertips, at any time you want. You can watch netflix. You can play video games. You can browse videos on youtube. Watch movies on demand. Stream TV shows. Use social media. This overabundance of available entertainment makes life fun, but it drains away your ability to be productive. This makes creative work much more challenging because there is an overabundance of distracting time sinks available to rob us of our productive time. Have fun, but be disciplined and use set hours for entertainment (start times and stop times). Conclusion: Overall, if you work in a quiet, isolated environment, you can get a lot more work done (Some people work late into the night because its quiet, isolated and distraction free). Take the time to be introspective about your work day and assess how it went. What was good and helpful? What was bad and unproductive? Some days, you won't enter into the flow state. Don't beat yourself up over it. It happens to everyone. Instead, focus on how you can make tomorrow a better day. What can you do today to make tomorrow better? I'm interested to hear what you guys think. Did I miss anything huge? What works for you? What hinders you?




July/August Update

The biggest struggle for me is still money. It's getting harder. Game sales have pretty much stopped completely, but game development continues forward. I'm starting to think I'm a bit crazy.
The rational side says, "Why are you still working on building a product which literally gets zero sales? It's time to move onto something that actually makes money."
But the emotional side says, "But I believe!!!" (bursts out in song) and then it tries to rationalize it by saying that "but... but... I just need more compelling content! Then, sales will pick up naturally!"

Reality check time: I have proven through analytics that adding content patches through steam updates does not in fact, increase sales or even viewer traffic to my store page. I could release product updates every week and that would not affect my sales numbers. The only possible way a product update would affect my sales numbers is if the product becomes good enough that people who own the product tell their friends about it. It's not there yet, so that's why I keep working on it and barely scraping by. Eventually though, I'm going to have to shift gears from product development towards product marketing and advertising.

Barely scraping by seems to be the name of the game for 95% of everyone in the VR industry right now. There have been some interesting recent developments lately. Owlchemy Labs, the creators of the smash hit "Job Simulator" and "Rick and Morty VR" have recently been bought out by Google. Google now completely owns one of the best VR content creators in the industry. The founders probably got hella rich and don't have to worry about anything but creating cool VR content now. Lucky them. One of my friends works for a local VR startup as their only programmer, and things are getting so tight that he had to get a second retail job in order to get by. The startup is too broke to pay him and their sales have dwindled as well (everyone should expect the long tail and budget for it!). The other huge development lately has been that AltspaceVR has shut down. They were a 35 person VR company which created a social hangout within VR, similar to Second Life with VoIP. They were funded entirely with venture capital money. I can't imagine the stress and heartbreak that brings to the team. But... 35 full time employees. Damn... and you have to make payroll every two weeks for 35 people? And you have a product and business model which doesn't involve bringing in money from users? Your days were numbered... I'm fascinated by why various companies fail and succeed. Obviously, creating and having a product is not the entire picture. It's all about making money to sustain your business operations.

My business operating expenses are extremely low. I pay $400 a month for my rented office space, $8.91 per day for burritos, $2.50 for a one way bus ticket, and $2.48 for a cup of black coffee. I owe people money, so I have to pay them off before I ever pay myself. Realistically, my chances of making a lot of money in the near future are near zero without funding and support. But hey, my operating costs are so low that I can almost do this indefinitely. My company will survive. It'll be small, but it will survive and continue forward, scratching out a teeny bit of money.

Speaking of money, the most profitable area right now is doing VR contract work. I've been working on a couple different side projects for various local companies, creating VR experiences around their products and services. I'm about to start working on an interactive VR film proof of concept, which plays sort of like a "choose your own adventure" 360 film in VR. It's going to be an interesting twist on interactive cinema. The broader goal for me is to learn as much as I can and broaden the scope of my VR designer skills. I've become a part of the production cycle for creating VR media and I'm bridging the gap between gaming and cinema within VR. Here is a sample of a VR app I made for Dell in May: I was thinking critically about this on my bus ride to work this morning and I realized something important: Is watching a cinematic in 360 stereo really VR? Why/why not? What's missing? The viewer. Who are you when you're viewing these 360 videos in VR? Okay, what kind of defining rule can we create which differentiates VR from fake VR? My tentative rule is that the viewer has to be a character within the experience for it to count as VR. The important thing here is to create a sense of "agency" and identity with the viewer. So, the cardinal sin for a VR designer is to take away agency from the player (such as controlling their head or playing a cinematic). The follow up question: "Does it really matter?" Yes, it kind of does matter because everyone is doing it wrong and calling their creation "VR" when its not really VR. It's really challenging to start defining what this new medium is and is not though. I think the guiding principle I use is that "Virtual reality should be indistinguishable from reality and the human experience." People can turn their heads and look down at their body, move their hands, feel solid objects, etc. The closer your VR gets to reality, the more you can confidently call it VR.

My challenge will be to convince companies to see it my way and spend the extra money to move from a stereo experience to a VR experience. I don't know if that's a battle worth fighting. The challenge with 360 video is that the video itself doesn't lend itself to user agency. The camera is placed on a tripod and people act out a scene all around the camera. So, the person experiencing the 360 video can't move around in the scene as if they were a part of it. The solution might be to ditch the 360 camera completely and go with motion capture and animated characters within a 3D environment, but that will mean much higher production costs and longer timelines. At the end of the day, what does a client care about? Accomplishing their objective, whatever that may be. Where does the line exist between exerting my subject matter expertise and satisfying the customers objectives?

Anyways, I am slowly realizing that I'm no longer just an indie VR game company, I'm becoming a VR media company. I wasted the entire last week watching "The Internationals" Dota2 tournament. The game itself is somewhat interesting, but more interesting is the growing rise of E-Sports. I think it's going to disrupt the definition sports. Every year, the Dota2 championship match grows in popularity and the prize pool grows by millions. I think last year the total prize pool was $16 million. This year, it was $24 million. All of the money comes from the Dota2 gaming community. The final championship match had 4,700,000 viewers around the world watching it unfold. I watched it on Twitch.tv, and the channel had about 380,000 live viewers. The sports stadium down the street supports about 68,000 people. So, just on Twitch, we had about five full stadiums worth of people watching the event online. Think about all of this for a moment: 4.7 million people watching ten people play a video game against each other for $24 million. If we project the trend out, over time we can predict that next year the prize pool will be even larger and the viewership will match proportionately. On a broader trend, I think E-sports will eventually eclipse conventional sports. Football is currently the most watched sport in America, but maybe in 30-40 years, E-sports championships will be the most watched sporting events? Remember that revolutions don't happen by people giving up their favorite sports/ideas, but by a younger generation gradually replacing an older generation. The younger generation is enamored with E-sports. Football? What's that? Obviously, the take away is that competitive E-Sports are a great way to build a community and player base around your product. There was one moment in the Dota2 championship match that really, really blew my mind. A pair of OpenAI researchers had created a bot which learned to play Dota2. Traditionally, bots are just hard coded expert systems with their behaviors and rule sets defined by the programmer. Traditional bots create the illusion of intelligence, but they start to break down when you introduce information it wasn't scripted to handle. The Dota2 bot was a little different. The researchers didn't say it explicitly, but the AI was an artificial neural network (ANN) with deep reinforcement learning. The AI brain as a generalized intelligence, so the researchers didn't tell it anything about how to play Dota2. They had the AI play against itself thousands and thousands of times over the course of two weeks. This was its training regimen. Gradually (and as expected), the AI learned how to play Dota2. But, it got scary good at it. It had mastered all of the nuances and game play techniques the pros use, it had learned how to time animations, block creeps, etc. It played perfect Dota, with perfect response times. It was so good that it beat every professional Dota2 player. The worlds best human players, all defeated by an AI bot which taught itself how to play Dota2. Absolutely amazing! For the last three weeks, I have been refactoring my AI and game systems and gradually moving towards an artificial neural network type of AI. I'm still creating hard coded expert systems, but I'm gradually changing my back end systems to make everything into an interaction or used ability. These will eventually become the output nodes for my ANN graph. The dream is to tweak a few brain parameters and then just have the various ANN AI's play with each other for 2 weeks, become experts, watch how my brain tweaks changed their behavior patterns, and change and adapt their brains until they roughly exhibit the behaviors I want them to have. AI programming won't be about creating expert systems, but about creating brains and tweaking reinforcement learning rewards to get distinct behaviors. The extra cool part is that the AI can continue to learn even after it has been deployed to the world. The vision is that the initial training cycle is to just get the AI to be competent enough to behave intelligently and convincingly. After deployment to the world, the training continues. However, now instead of the AI training on a single computer against a copy of itself, it is now training on hundreds of computers with human players in VR. Every day or so, the AI will upload whatever it learned to a central online database and download what other versions of AI learned from playing with other players. In a way, it turns into an evolutionary algorithm which gradually gets more and more intelligent over time. The hard part will be managing version control and testing for fitness.

The other wrinkle in this plan is that the AI could get too smart. Not in a "take over the world" sort of way, but as in it's too good at playing the game and players don't enjoy playing anymore because they lose 100% of the time. I suppose a part of the AI development could use the player frequency as an input feed and the AI is rewarded if the player continues playing the game. In that sense, a big focus of the AI is to make sure the players are entertained, and this win/loss threshold can be adaptive per player. Maybe the AI ends up developing a profile on each player and knows what it takes to maximize that players enjoyment? Maybe some AI's will play cooperatively with particular players, and as adversaries with other players? I'm getting slightly into science fiction here. I'll never forget the experience I had of having a seemingly intelligent crow on my arm in VR. It was absolutely magical. Now, if I gave it the ability to think intelligently and speak its own mind, the magic would become real. What if the pet crow AI was the sum of all AI's from all interactions with players and the world, and you could get it to say what its thinking, and it is rewarded (via reinforcement learning) when it says something which keeps the player safe? What if the AI learns that there is danger in the dark cave and most players who venture down into the cave end up dying, so the AI learns to say something really scary which keeps the player from going down into the cave? The AI has then learned exactly what to say in order to frighten us, through thousands of sessions of trial and error. Anyways, I think we're on the verge of an AI revolution and I want to be a part of bringing that AI into VR. It gets interesting when you consider that a sandbox type of game would become very different on every play through when you have emergent AI systems interacting as a part of that world.  I've been seriously contemplating the idea of writing a science fiction novel based on an AI system which gains sentience and begins the AI singularity event. I'm thinking the book writing project would be a side project. I'd spend one day a week writing it. My sister is interested in being a co-author, so we need to spend some time hashing out details and measuring the feasibility of our ambitions. I've never written a novel before, so there is a lot of risk due to inexperience. But, who cares? Better to try and fail than to never have tried at all out of a fear of failure. That's how you get good at anything: try, fail, improve, try again, repeat. Eventually, you'll break out of the failure loop and enter into the success loop.




Designing Intelligent Artificial Intelligence

Below is my preliminary draft design for the AI system within Spellbound. I'm slowly migrating away from scripted expert systems towards a more dynamic and fluid AI system based on machine learning and neural networks. I may be crazy to attempt this, but I find this topic fascinating. I ended up having a mild existential crisis as a result of this. Let me know what you think or if I'm missing something. Artificial Intelligence: Objectives:
Spellbound is going to be a large open world with many different types of characters, each with different motives and behaviors. We want this open world to feel alive, as if the characters within the world are inhabitants. If we went with pre-scripted behavioral patterns, the characters would be unable to learn and adapt to changes in their environment. It would also be very labor intensive to write specific AI routines for each character. Ideally, we just give every character a self-adapting brain and let them loose to figure out the rest for themselves.  Core Premise: (very dense, take a minute to soak this in)
Intelligence is not a fixed intrinsic property of creatures. Intelligence is an emergent property which results directly from the neural topology of a biological brain. True sentience can be created if the neural topology of an intelligent being is replicated with data structures and the correct intelligence model. If intelligence is an emergent property, and emergent properties are simple rule sets working together, then creating intelligence is a matter of discovering the simple rule sets. Design:
Each character has its own individual Artificial Neural Network (ANN). This is a weighted graph which uses reinforcement learning. Throughout the character's lifespan, the graph will become more weighted towards rewarding actions and away from displeasurable ones. Any time an action causes a displeasure to go away or brings a pleasure, that neural pathway will be reinforced. If a neural pathway has not been used in a long time, we reduce its weight. Over time, the creature will learn. A SIMPLE ANN is just a single cluster of connected neurons. Each neuron is a “node” which is connected to nearby neurons. Each neuron receives inputs and generates outputs. The neural outputs always fire and activate a connected neuron. When a neuron receives enough inputs, it itself fires and activates downstream neurons. So, a SIMPLE ANN receives input and generates outputs which are a reaction to the inputs. At the end of neural cycle, we have to give response feedback to the ANN. If the neural response was positive, we strengthen the neural pathway by increasing the neural connection weights. If the response was negative, we decrease the weights of the pathway. With enough trial runs, we will find the neural pathway for the given inputs which creates the most positive outcome. The SIMPLE ANN can be considered a single cluster. It can be abstracted into a single node for the purposes of creating a higher layer of connected node networks. When we have multiple source inputs feeding into our neural network cluster and each node is running its most optimal neural pathway depending on the input, we get complex unscripted behavior. A brain is just a very large collection of layered neural nodes connected to each other. We’ll call this our “Artificial Brain” (AB) Motivation, motivators (rule sets):
-All creatures have a “desired state” they want to achieve and maintain. Think about food. When you have eaten and are full, your state is at an optimally desired state. When time passes, you become increasingly hungry. Being just a teensy bit hungry may not be enough to compel you to change your current behavior, but as time goes on and your hunger increases, your motivation to eat increases until it supersedes the motives for all other actions. We can create a few very simple rules to create complex, emergent behavior.
    Rule 1: Every creature has a desired state they are trying to achieve and maintain. Some desired states may be unachievable (ie, infinite wealth)
    Rule 2: States are changed by performing actions. Actions may change one or more states at once (one to many relationship).
    Rule 3: “Motive” is created by a delta between current state (CS) and desired state (DS). The greater the delta between CS and DS, the more powerful the motive is. (Is this a linear graph or an exponential graph?)
    Rule 4: “relief” is the sum of all deltas between CS and DS provided by an action.
    Rule 5: A creature can have multiple competing motives. The creature will choose the action which provides the greatest amount of relief.
    Rule 6: Some actions are a means to an end and can be chained together (action chains). If you’re hungry and the food is 50 feet away from you, you can’t just start eating. You first must move to the food to get within interaction radius, then eat it. Q: How do we create an action chain?
Q: How do we know that the action chain will result in relief?
A: We generally know what desired result we want, so we work backwards. What action causes desired result (DR)? Action G does (learned from experience). How do we perform Action G? We have to perform Action D, which causes Action G. How do we cause Action D? We perform Action A, which causes Action D. Therefore, G<-D<-A; So we should do A->D->G->DR. Back propagation may be the contemporary approach to changing graph weights, but it's backwards.
Q: How does long term planning work?
Q: What is a conceptual idea? How can it be represented?
A: A conceptual idea is a set of nodes which is abstracted to become a single node?
Motivators: (Why we do the things we do)
    Body Temperature
    Social Validation
    Pain Relief
    Virtues, Vices & Ethics
Notice that all of these motivators are actually psychological motivators. That means they happen in the head of the agent rather than being a physical motivator. You can be physically hungry, but psychologically, you can ignore the pains of hunger. The psychological thresholds would be different per agent. Therefore, all of these motivators belong in the “brain” of the character rather than all being attributes of an agents physical body. Hunger and body temperature would be physical attributes, but they would also be “psychological tolerances”. Psychological Tolerances: {motivator} => 0 [------------|-----------o----|----] 100                  A            B           C    D    E A - This is the lowest possible bound for the motivator.
B - This is the lower threshold point for the motivator. If the current state falls below this value, the desired state begins to affect actions.
C - This is the current state of the motivator.
D - This is the upper threshold point for the motivator. If the current state exceeds this value, the desired state begins to affect actions.
E - This is the highest bounds for the motivator. The A & E bounds values are fixed and universal.
The B and D threshold values vary by creature. Where you place them can make huge differences in behavior. Psychological Profiles:
We can assign a class of creatures a list of psychological tolerances and assign their current state to some preset values. The behavioral decisions and subsequent actions will be driven by the psychological profile based upon the actions which create the sum of most psychological relief. The psychological profile will be the inputs into an artificial neural network, and the outputs will be the range of actions which can be performed by the agent. Ideally, the psychological profile state will drive the ANN, which drives actions, which changes the state of the psychological profile, which creates a feedback loop of reinforcement learning.
  Final Result:
We do not program scripted behaviors, we assign psychological profiles and lists of actions. Characters will have psychological states which drive their behavioral patterns. Simply by tweaking the psychological desires of a creature, we can create emergent behavior resembling intelligence. A zombie would always be hungry, feasting on flesh would provide temporary relief. A goblin would have a strong compulsion for wealth, so they'd be very motivated to perform actions which ultimately result in gold. Rather than spending lots of time writing expert systems styled AI, we create a machine learning type of AI.  Challenges:
I have never created a working artificial neural network type of AI. 
  Experimental research and development: The following notes are crazy talk which may or may not be feasible. They may need more investigation to measure their merit as viable approaches to AI.

Learning by Observation:
Our intelligent character doesn’t necessarily have to perform an action themselves to learn about its consequences (reward vs regret). If they watch another character perform an action and receive a reward, the intelligent character creates a connection between an action and consequence. 
Exploration Learning:
A very important component to getting an simple ANN to work most efficiently is to get the neurons to find and establish new connections with other neurons. If we have a neural connection topology which always results in a negative response, we’ll want to generate a new connection at random to a nearby neuron.  Exploration Scheduling:
When all other paths are terrible, the new path becomes better and we “try it out” because there’s nothing better. If the new pathway happens to result in a positive outcome, suddenly it gets much stronger. This is how our simple ANN discovers new unscripted behaviors. The danger is that we will have a sub-optimal behavior pattern which generates some results, but they’re not the best results. We’d use the same neural pathway over and over again because it is a well travelled path. Exploration Rewards:
In order to encourage exploring different untravelled paths, we gradually increase the “novelty” reward value for taking that pathway. If traveling this pathway results in a large reward, the pathway is highly rewarded and may become the most travelled path.
Dynamic Deep Learning:
On occasion, we’ll also want to create new neurons at random and connect them to at least one other nearby downstream neuron. If a neuron is not connected to any other neurons, it becomes an “island” and must die. When we follow a neural pathway, we are looking at two costs: The connection weight and the path weight. We always choose the shortest path with the least weight. Rarely used pathways will have their weight decrease over a long period of time. If a path weight reaches zero, we break the connection and our brain “forgets” the neural connection.
Evolutionary & Inherited Learning:
It takes a lot of effort for a neural pathway to become developed. We will want to speed up the development. If a child is born to two parents, those parents will rapidly increase the neural pathways of the child by sharing their own pathways. This is one way to "teach". Thus, children will think very much like their parents do. Other characters will also share their knowledge with other characters. In order for knowledge to spread, it must be interesting enough to be spread. So, a character will generally share the most interesting knowledge they have.  Network Training & Evolutionary Inheritance:
An untrained ANN results in an uninteresting character. So, we have to have at least a trained base preset for a brain. This is consistent with biological brains because our brains have been pre-configured through evolutionary processes and come pre-wired with certain regions of the brain being universally responsible for processing certain input types. The training method will be rudimentary at first, to get something at least passable, and it can be done as a part of the development process.
When we release the game to the public, the creatures are still going to be training. The creatures which had the most “success” will become a part of the next generation. These brain configurations can be stored on a central database somewhere in the cloud. When a player begins a new game, we download the most recent generation of brain configurations. Each newly instanced character may have a chance to have a random mutation. When the game completes, if there were any particular brains which were more successful than the current strain, we select it for “breeding” with other successful strains so that the next generation is an amalgamation of the most successful previous generations. We’ll probably begin to see some divergence and brain species over time? Predisposition towards Behavior Patterns via bias:        
Characters will also have slight predispositions which are assigned at birth. 50% of their predisposition is innate to their creature class. 25% is genetically passed down by parents. 25% is randomly chosen. A predisposition causes some pleasures and displeasures to be more or less intense. This will skew the weightings of a developing ANN a bit more heavily to favor particular actions. This is what will create a variety in interests between characters, and will ultimately lead to a variety in personalities. We can create very different behavior patterns in our AB’s by tweaking the amount of pleasure and displeasure various outputs generate for our creature. The brain of a goblin could derive much more pleasure from getting gold, so it will have strong neural pathways which result in getting gold. AI will be able to interact with interactable objects. An interactable object has a list of ways it can be interacted with. Interactable objects can be used to interact with other interactable objects. Characters are considered to be interactable objects. The AI has a sense of ownership for various objects. When it loses an object, it is a displeasurable feeling. When they gain an object, it is a pleasurable feeling. Stealing from an AI will cause it to be unhappy and it will learn about theft and begin trying to avoid it. Giving a gift to an AI makes it very happy. Trading one object for another will transfer ownership of objects. There is no "intrinsic value" to an object. The value of an object is based on how much the AI wants it compared to how much it wants the other object in question.
Learning through Socialization:
AI's will socialize with each other. This is the primary mechanism for knowledge transfer. They will generally tell each other about recent events or interests, choosing to talk about the most interesting events first. If an AI doesn't find a conversation very interesting, they will stop the conversation and leave (terminating condition). If a threat is nearby, the AI will be very interested in it and will share with nearby AI. If a player has hurt or killed a townsfolk, all of the nearby townsfolk will be very upset and may attack the player on sight. If enough players attack the townsfolk, the townsfolk AI will start to associate all players with negative feelings and may attack a player on sight even if they didn't do anything to aggravate the townsfolk AI.




Spellbound: May-July Updates

Tomorrow morning, I have to fire someone. It's been a tough three months with a lot of big life changes. My girlfriend and I were unable to pay our apartment rent in downtown Seattle, for the months of April and May. So, we were strongly encouraged to move out. We were paying $2461 per month in rent, plus $200 a month for parking, plus utilities, all for a 940 square foot two bedroom apartment with no air conditioning. Then they raised the rent. So, we moved out and found a house to rent in Edmonds, a small sleepy town about 12 miles north of Seattle. We doubled the square footage and only pay $2000 a month in rent. It's amazing. It's so peaceful and quiet. It is far superior to living in an apartment. The Seattle apartment was two blocks away from a fire station, so you would often have fire engines roaring down the street with sirens blaring at 3am. Or, there'd be someone unloading product all night for the business next door, operating a hydraulic lift. Or, maybe there'd be homeless or drunk people having an argument outside my window. I don't miss it one bit. The only thing I miss is my 15 minute commute to work by walking. Moving was a bit of a... problem. The day before, I fell off of a horse, you see. I was at my ranch, testing out a new horse to see how well it rode. It was acting a bit anxious. The saddle didn't quite fit. The horse wasn't responding very well. I figured the horse needed to get used to a rider a bit more and that I'd tire it out a bit by galloping around and break it in. So, we did. We galloped down the forested road a bit, went down the field, galloped some more, and did two loops. Then, I brought the horse back to the hitching post. This stupid daschund dog came running and barking at me and the horse, completely oblivious to the sheer difference in size between a 7lb dog and a 700lb horse. Despite that, the horse was even more anxious. So, I turned it around and went over the bridge into the field by the creek. I was going to gallop it a bit more to tire it out. So, off we go again! I see some sticks and logs in the field ahead, so I start steering the horse to the left, except its not listening. We're just running at a good 30mph. Then, at the very last second, the horse sees the debris -- and makes an almost 90 degree left turn at 30 miles per hour. Naturally, this isn't a video game, so the principles of momentum apply, and my body wants to go straight. I stomp really hard on my right stirrup, with all my body weight, to stay on the horse -- except the saddle slides to the bottom of the horse and I go with it. Keep in mind, the horse is still galloping as I'm falling. In a split second decision, I decide that I'm doomed to fall and get hurt, but the smartest thing to do is get my boots out of the stirrups so that I'm not dragged behind the horse. If I don't get my boots out, I will get killed, and that's more important to avoid than getting hurt. I did it. I got my boot out, just in time. Then I land HARD on my right back onto hard dirt. Immediate pain. I'm writhing on the ground in sheer agony, screaming in pain. It's arguably the most pain I'd ever felt in my entire life. I left myself writhe in the dirt for ten seconds and then decide its time to man up. I lay still. What's my damage assessment? My legs work. I have feeling. No broken spinal cord. I have extreme pain in my rib cage and back. I feel swelling already. Breathing is hard. My immediate assessment is that I probably broke a rib and its probably got multiple fractures. Nobody knows where I'm at, so I have to get up. Moving is excruciatingly painful, but I gotta do it. Little by little, I upright myself, then slowly stand up on my two feet. Then I slowly, ever so slowly, hobble my way back to the farm house. It's a long walk.

My girlfriend sees me. I tell her what happened. I go sit in a rocking chair for a minute. Then I decide it's time to go to the hospital. The pain is getting worse. I struggle to get into the car. Then, we seem to hit every. single. fucking. pothole. along the way, each one inducing nightmarish pain in my back. We get to the emergency room. I'm brought inside immediately and put on a gurney for evaluation. I'm brought into this machine to get a CAT scan and X-Rays at the same time. It hurts so much to even breathe. Despite that, I'm calm. I'm not in mortal danger. I'll get through this, but it's gonna hurt. Well, the good news is, I don't have any spinal problems and no broken ribs. I do have a bruised right lung, internal bleeding, and as I discover later, the main source of pain was a torn back muscle. The torn muscle was the worst. It felt like every time I moved, someone was stabbing me in the back with a screwdriver and twisting viciously. I was cleared to go home and given pain meds. The whole day I laid on the couch, not daring to move. I needed two people to help me sit up, and that was extreme pain. The hardest part of my day was getting up to go use the bathroom. It literally took me a good 45 minutes to walk down the hall to use the toilet because the pain was so bad. The second day, the pain got even worse. The third day, the pain was slightly less, but still excruciating. We returned to my apartment in Seattle. We had to move out. How is that going to happen when I can't even move? Thankfully, friends and family are the greatest blessing in the world. My brothers, sisters, mom, and friends all came to help us move (and a couple hired hands). The only thing I could do is lay in bed and watch as everyone around me moved furniture. I know I was supposed to be relaxing and getting better, but I just felt so guilty watching everyone else working. Anytime I had dumb ideas about getting up, my back would hastily remind me not to. It took me a full week of laying down to recover enough to the point where I could walk around with minimal pain. I went back to work on Monday. However, my commute was now a bus ride and some short walking. With virtual reality game dev, you frequently have to get up and test something out in room scale VR. It's a bit more physically active development work than you'd think. I couldn't quite do that yet. I took it easy. Then, late evening came. It was time to walk to the bus stop and go home. Now, for those who don't know Seattle, it has some hills. My bus stop was two blocks away, but it required walking up a slight incline. Normally, I'd just power walk it and have no problems. But this time, walking even at a slow pace was just too much for me. A bruised lung left me so faint that I was about to pass out. I literally had to stop and take a breather. Maybe it was too early for me to go back to work if this was my condition? So, I decided to continue resting for another week, doing light duty. By the end of two weeks, I felt nearly completely recovered. It was an amazingly speedy recovery, considering the pain and seriousness of the injuries. I am very lucky. I could have been hurt much more seriously. Now, I am a lot more cautious around horses. I don't need to repeat that life experience. 

What's funny is how different riding horses are in real life compared to video games. Never, ever do you ever worry about falling off of a horse in a video game. Riding a horse is always like driving a car, it always perfectly does exactly what you want, as if the beast doesn't even have a mind of its own. It's interesting to think about the difference in user experiences between real life and game design and the balances between trade offs.

Anyways, long story short, I fell off of a horse and was out of commission for a bit.

During the month of May, I started doing some freelance contract work. I built a VR application for Dell, just in time for their annual Dell World event. The film guys in my office went to three different parts of the world and shot some 360 video to highlight the philanthropic programs Dell was doing to make the world a better place. We wanted to create a seamless and easy to use, interactive and immersive VR experience. People would pick up the GearVR, place it on their head, watch a couple videos, learn about the programs, and continue on with the conference, just a little wiser. We nailed it. We completely blew everyones socks off. The beauty of the Unreal Engine, coupled with good design and good assets, made an incredible VR experience. After the conference, they told me about one guy who was acting like a know-it-all, claiming that 360 video was not VR and pre-judging our app as being shit. Then, the skeptic put on our headset and tried out the experience. He's immediately in a stereoscopic world and able to use his gaze to interact with objects in the scene. Sure, the 360 video is projected onto the insides of a sphere, but that doesn't mean that all of the environment has to be projected onto a sphere or be a passive experience  Afterwards, he couldn't stop raving about how amazed and wrong he was. I also started doing consulting on the side for a small local VR company here in Seattle. They were having some major problems with shipping on the GearVR platform. The problem is that the Samsung Galaxy S6 phone is notorious for overheating. The Oculus Store won't accept any submissions which cause the S6 to overheat within 15 minutes. Their app was overheating the phone within 5 minutes. So, this was clearly an optimization problem. Their dev team wasn't the very best when it comes to creating high performance systems. What they created is more than acceptable for a PC, but on a phone? Terrible. I spent considerable time testing and optimizing the scene and trying to get the app to run for 15 minutes before overheating. It's a really tedious process, where you have to document what change you made, create a package, deploy it to the phone, run a couple sessions, take an average, and figure out whether your change had any effect on the overall temperature heating rate of the phone. This workflow could easily take a few hours to test a few things. I got tired of this monotonous process, so I started just measuring the rate of temperature increase over time. The goal was to keep the phone temperature below the shut off value for the entire experience. As the temperature of the phone increases, we throttle down the experience quality. As the quality decreases, the temperature delta decreases and we squeeze out more lifetime. It was sort of like a temperature based LOD system. I was kind of proud of it. I'm not sure if anyone else has had to invent something like that. Anyways, I proved that it worked and got the app to run for at least 15 minutes on my test phone. I submitted it to Oculus for review, eagerly waiting for the test results... days go by... and then... REJECTED! Why?? Supposedly, their S6 was overheating within 5 minutes. How is that possible? We have the exact same phone! I'm still a bit baffled.

For my own game, it's development has taken somewhat of a back burner. It sells on average, 1 copy a day on Steam. That volume is gradually decreasing. The bottom line is that it barely makes any money. Contracting work pays much, much more. However, Spellbound is my baby and I will continue working on it in between higher paying projects. I still spend a majority of my time working on it though. I have identified a couple key problems and areas to work on. The problems are as follows:
1) The content is too short and incomplete.
2) There is a marketing and advertising problem. Nobody knows about my game. #1 is relatively easy to fix: Just keep working on the game and adding in more content. The challenge is to create more content without spending any money or increasing debts. You want more art? voice acting? sound effects? music? You gotta pay for that... with money you don't have. #2 is the really hard one. How do you get your game in front of more people without spending lots of money? I have come up with a few key strategies:
A) I need to identify and develop hardware companies in the VR space and create a cooperative partnership with them. I'll make my game compatible with their hardware, and their hardware will have compatible content. It's a win-win for both of us. Hardware sells content, and content sells hardware. If 2000 people buy a unique hardware peripheral, the next thing they'll do is look for quality content to use with the hardware. I want to make sure that Spellbound is at the top of that list everywhere they look.
B) I also need to make my game as "discoverable" as possible. This means that it should be easy for people to stumble onto it. Let's face it. Nobody is going to go into their search bar and directly type in the name of my game and buy it. The only way people know about it is if they accidentally find it. Okay, that's a bad thing to rely on, right? What if... we make it easy for people to stumble onto the game in multiple places? What if we have the game available on multiple online distribution channels? Buy it on Steam! Buy it on Oculus Store! Buy it everywhere! Wherever you buy it, I don't care, so long as I get paid! If I make one sale a day on one channel and that becomes my average across all channels, then I just need to be on 50 channels to make 50 sales a day! (yeah, right)
But, that does speak to the value of diversifying and broadening your footprint and availability.
C) Make game content so good that people will talk to other people about it. This is extra hard for a lone indie with no budget. I'm convinced that there is only *one* way to do this right. I have to tell the most amazing story ever in the history of stories, and I have to keep the world super small and highly polished. Small, amazing story & polished. That's a tall order. Everyone else will beat me on scope. Everyone else will beat me on quality art assets and uniqueness. Everyone else will probably beat me on tech as well, though using UE4 helps even that playing field. A great story is my only chance. I can write, but is it any good? Can I write an epic story which speaks to the very heart and soul of the player? How exactly do I do that in VR? What's unique about VR that no other medium has? What do I need to discover that nobody else has discovered yet? ... short & scary answer: I don't know yet. I just have to have faith in my abilities, hard work and dedication.

In line with my first strategy, I have created a partnership with NullspaceVR. They're creating the Hardlight haptics suit for VR. I got to try it out at their office and get some first impressions. It's pretty cool. They have a vest you wear which has a bunch of rumble packs placed all over your body. The developer can control which rumble packs activate and the intensity and type of the vibration. By selectively controlling the rumble packs, you can create various physical sensations on the players body. In my game, I want players to feel an impact on their body at the precise location a zombie hits them. I think this would heighten the sense of immersion and presence players experience and also work as an additional user interface medium (rather than having graphical damage indicators). The key consideration is that the support for this hardware should be treated as an optional accessory to enhance gameplay rather than a requirement to play -- additional hardware requirements only increase the consumers barrier for entry, and it's already high enough as it is with VR hardware. I have also started refactoring the artificial intelligence system in my game, for the fourth time now. This may be a mistake, but I'm doing it anyways. It's not broken. It works. But it's too scripted. The current systems are just hard coded expert systems and I don't find them very interesting or convincing, and worst of all, if I want to change behavior, I have to rewrite code. So, I've been doing some hard thinking and designing a new approach to AI. Characters now use "abilities". Abilities are a type of polymorphic action which can be assigned to a creature. If I have a zombie and a knight, I can grant both of them the "Melee Attack" ability. They can both activate the ability, but the creature response to the ability differs by creature type. The ability mostly contains meta data, such as ability cooldowns and timings for effect activations, but they can eventually be treated as "nodes" in a graph. So, I grant a creature a long list of abilities (eat, sleep, melee attack, ranged attack, run away, cast spell, etc) and ideally, it will choose the most suitable ability to use in context to its current situation. How do we determine which ability to use in the current situation? We use a weighted graph (similar to an artificial neural network). Okay, but how do we find the graph weights then? I don't want to run thousands of training simulations to get the most appropriate behavior. Instead, what I really, really want to do is just give a creature a bunch of preferences it wants to satisfy and then it chooses the most important preference to satisfy and figures out what action to take to satisfy it. Initially, the weighted graph would probably be all wrong, so we'd have to run through a few training cycles -- but not too many! The secret sauce would be to use the same graph weight for the same creatures, save them to disc so that learning is persistent through various play sessions, and also share the graph weights with some sort of online database which other brains download. That super smart zombie you are fighting? He's smart because he trained against 1000 online players and he shared his training knowledge with all zombies. At this point, ideally, all I would have to do to get different behavior patterns out of wildly different creature classes, is to tweak their innate preferences and reward systems. Zombies are constantly hungry and crave living flesh. Goblins absolutely love gold above everything else. Dwarves just want to forge stuff out of iron. Demons want to own souls like goblins own gold. Bandits just have a lower moral standard than regular people. etc. etc. Slight tweaks to preference parameters would ultimately result in different behavior patterns and it would slowly get replicated universally across all game clients over time. If I can do this, and just sort of create a sandbox game world, will the AI actors live interesting lives? Will every play through be significantly different? I don't know. It's a lot of extra scope to digest.

The real question is, does the player give a fuck? Or would a scripted AI be "good enough"? Am I engineering stuff that doesn't increase the bottom line? Or am I creating something ground breaking? It's hard to tell. I need money but I also want to make cool stuff at the same time. Anyways, tomorrow morning I have to fire someone. One of the staff at our ranch has been taking our tools and selling them in town. This is the last straw in a long list of second chances. My younger sister told me something wise: "You get what you tolerate." I can't tolerate theft and the distrust that creates, no matter the sob story. The line has been crossed. I hate firing people, I take no pleasure in it, but it's a necessity for the future success of a business. You know you're ruining someones day/month, but people have to be held accountable for their own actions, good or bad. Running this ranch has been a valuable teacher on the nuances of business and management, but I can't help but feel there are many lessons for me yet to learn. P.S. I am probably the closest to being a cowboy coder right now.




Why your indie game dev team will fail

I wrote this article on Medium and thought I'd cross post it here:
https://medium.com/@Slayemin/your-indie-game-dev-team-will-fail-108d4b663e7e This is based off of my own past personal experiences (and failures) and observations of indie teams. I think a lot of the points are probably common knowledge among experienced game devs, but it's good to share it regardless. If we can steer a few more teams onto the right track and get good games, it's worth the effort  

Note: I've been procrastinating on monthly updates. Long and short is that I've been busy, distracted, recovered from falling off a horse, etc.




Spellbound: April Update

It's been a tough few months. Spellbound is not really selling very well on Steam. It's to be expected, since the game is both in Early Access mode and has zero marketing behind it. But, it's still a disappointing reality. I'm optimistic that it will eventually change. All I have to do is keep working away at the game, add more content, start marketing and promoting it, and create more interest and attention. The biggest challenge right now is financial. I'm quite broke, but that's not really news for anyone, but it is very limiting. It means I can't hire anyone to help me. It means I can't spend money on marketing and advertising. It means I have to spend my time working on side projects which bring in extra money. Ultimately, it lengthens my timeline to final delivery. My costs have become extremely lean. My operating costs are now $400/month and I have to buy food and pay rent. I have to do everything without spending money because I don't really have money to spend. For the month of April, I have spent most of my efforts on trying to figure out how to make money on the side and how to market and advertise my game. I'm working in an office of film guys and they are offering their clients 360 video services, and will fly around the world to film and make 360 video content. Their target hardware platform is the GearVR, so they recently pinged me to help them produce their content. Easy! The first project was a short 2 minute 360 film for a film producer. He needed it made in time for NAB so that he could give demos and get work. I delivered. He was happy. Now, I just need to invoice him. I'm certain there will be much more work in the future. Dell is also another client. Their project is a bit more involved: They have three different philanthropy programs they want to promote, so I'm creating their application for GearVR as well. What's interesting about this project is that it was originally just going to be a series of 360 videos viewed in GearVR, but now that I'm involved, it has become a much more interactive VR experience. The film making and VR gaming industries are merging together, and this product is a testament to that. I foresaw this over two years ago, but didn't really expect to be one of the people to bring our industries closer together. But, it's exciting. I think this project will raise the bar for everyone else doing 360 videos. I've also been doing a little bit of consulting on the side. A fellow VR company is trying to get their GearVR app submitted to the Oculus Store, but their problem is that the phone overheats within 5 minutes. They asked me to come help them troubleshoot this. So, how do you troubleshoot a nebulous problem like this? With super debugging skills (see my last post). You can't exactly set a break point on a particular line of code or point at one thing and blame it, you have to have a really good, thorough debugging process. Anyways, I helped them out and they're now on the right path to resolving their problem. But I'm not just doing VR consulting to make money. There really isn't enough money to make it worth my time yet, and it comes with opportunity costs. I'm also selling my girlfriends product "The Perfect Wine Opener" at various street fairs, home shows, and events around the pacific northwest. Yeah. I'm a programmer, selling products to complete strangers. And I'm actually very good at it. Like, scary good. Put me in your crappiest show in the crappiest booth, and I will sell the shit out of your wine openers. Two weekends ago, I almost sold out completely and made around $2,000 -- in a weekend! This weekend, I went to an outdoor show, which was completely miserable because it was cold, rainy and windy, and I still sold $1,200 of product. I've had a guy go out to get me a coffee and come back, and I've sold another $100 in the three minutes he was gone. I honestly think that sales is a very wonderful, valuable skill to have. Think about how amazing it would be to be both a skilled salesman and a VR content creator at the same time. Not only do you understand exactly what your customer wants to get out of your experiences, you can also build it. So, it's a bit of a perplexing wonder that Spellbound isn't selling very well, considering how good I am at selling wine openers. I'm treating all of this as a science problem to solve (we engineers are good at these!). I'm going to use the same process I use to debug software to debug my marketing problem: So, why isn't anyone buying my game? What's my hypothesis? How do I test my hypothesis? How do I measure the reaction? What assumptions am I making? Last week, I assumed that if I created a Reddit AMA, I would get a lot of extra traffic to my storefront and I would see a measurable bump in sales. So, I spent the whole afternoon answering questions about VR game development. Surely, people are interested in virtual reality, game development, philosophy, ethics, war, and all of them together, right?! Those were all stupid assumptions I made. Apparently, there wasn't much interest. So, why do some AMA's get 1,500 questions and others like mine get 24 questions and engagement with 7 people? Probably because I'm not a celebrity or really weird/interesting? I have no idea. Regardless, the test results showed that there was absolutely zero change in traffic or sales from my established baseline. My hypothesis was proven wrong. And that's okay! It's 100% acceptable to be wrong! In fact, the faster you can figure out that you're wrong, the faster you can quit doing the wrong things and try different wrong things! Eventually, you'll try something that isn't wrong and you'll do something right! The key is to not get down when something negative happens!!!!!! I guess this is what makes me so good at sales. Every rejection, every objection, is perfectly fine. Just be like a rock in the bottom of a stream and let it roll off of you like water. Learn and move on fast. It's all about having a positive, optimistic attitude, no matter what is happening. Broke? Keep your head up and keep charging forward! Getting shot at? Keep your head down but don't stop smiling -- you're still alive! People quit your team? That's to bad, it's certainly a setback, but you know who won't ever quit your team? Yourself! You'll get new people eventually -- success attracts them. An indomitable spirit, positive attitude and a strong work ethic will steamroll any obstacle in your path between yourself and success. I'm a betting man, and I would still bet on myself. The lack of funds is just a small, temporary problem / challenge, but there are much bigger problems to solve in my future. I've got an industry to define and build. On that front, I have been going through the process of getting Spellbound onto the Oculus Store. It's every bit of a painful process as you'd imagine. First, you have to make your marketing materials and create your storefront. Then you have to submit a build to Oculus and go through a QA review process. I've been rejected three times. The first time, I didn't have an "entitlement check", which means I'm not checking to see if the game is a legitimate purchase. I missed that in the plethora of documentation. Second time around, I ran into this really, really annoying "black screen" bug which only happened on the oculus rift with a packaged build for levels which contained sub levels. This took me over a week to isolate and identify. It was obviously a game breaking bug. The third time I got rejected, it's because my game isn't hitting the required 90 frames per second. This is where I'm currently stuck. My scenes are complex and heavy, and I average around 45-60 frames per second. Once I can consistently hit that magical 90fps mark in all parts of my game, I'll resubmit. It's a tough benchmark to hit while trying not to lose quality in content. But, after I get accepted onto the Oculus Store, I'll have my game available on two different distribution channels. Then I can have no sales on both channels! :D But no, really, it's actually a good thing. It increases my "discoverability" and any additional marketing and advertising I eventually push out, will make my game easier to find and purchase. I think the way this works is that the more successful a game is on a storefront, the higher it "ranks" in the listings and featured sections. The more it is featured, the more eyeballs it gets and the more it is purchased. It turns into a self promoting cycle which snowballs. Naturally, these storefronts will want to continue promoting products which sell very well. It only makes sense, right? There's no incentive to promote garbage which doesn't sell well. If you take 30% from every sale and promote stuff that doesn't sell, you don't make much money. The key is to be able to say, "This will sell well. People who buy it, will like it." Am I there yet? I'm not sure. My biggest problem is that my game doesn't have enough content to make it compelling. But, that's also a temporary problem. I am also very interested in making this into a multiplayer game. But, multiplayer is going to be challenging if there aren't enough players to play with yet. So, I also need to grow my player base to justify multiplayer. Currently, I average about 1-2 concurrent sessions globally, so spending a few months building multiplayer capabilities would be a wasted effort. So, expand the player base, add more content, add multiplayer, make game better, rinse, repeat. In another recent development, I met with the Nullspace VR team last week and tried out their Hardlight VR haptics suit. They've recently had a successful kickstarter and have been getting a lot of positive press recently. They're obviously a hardware company, and as they say, "hardware is hard!". Hardware is another platform to build content for. Anyways, I tried out their suit. It was pretty cool. I felt that the VR demos they gave didn't really do their tech proper justice. I could do way better. But it's cool tech. So, I'm going to add support for their hardware in a future release of Spellbound. When a zombie claws at you, you'll feel it on your body. When you die and they munch your corpse, you'll feel it. When you get hit by a sizzling wraith spell, you'll feel the impact and burn on your body. It'll be amazing. They played Spellbound and really liked it as well, so in a few weeks or months, we're both going to announce another title with official support for their hardware. I think this will help both of our teams. I need the marketing exposure, they need content to support their hardware, and consumers need amazing, immersive VR experiences which takes VR to the next level. Anyways, VR is going to be a big deal in a few years. I hope I have a part in building its future. Right now, I have to make sure I can survive and be a part of it.




Principles of Debugging Effectively

I just spent three days debugging a problem within my VR game. I don't quite understand the root cause of the problem, but I do know enough about the nature of the problem to create an effective work around. Over the course of my career as a programmer and developer, I've gradually gotten better and better at debugging and troubleshooting. I think this is a really hard skill to get down and get good at because its more of a methodology and way of critical thinking to master than a particular debugger in an IDE. Without wasting a bunch of time, I'll get right to it. The first step is to identify a problem. It's a problem if the behavior of the software application does not behave as it was designed or intended to behave. The second step is to be able to reliably reproduce the problem. This isn't always easy. In theory, someone could create a random number generator which creates undesirable behavior in a 1 in 100 chance, and that would make the behavior very difficult to reproduce. If you can, it would be super helpful for you to be able to create a game "replay" file, and then save and replay the game and observe the behavior. Let's say you get this far: You've identified a problem and you can reproduce it reliably. Now what? This is when we start to practice the "scientific theory". This is where I've seen many, many people screw up and waste time chasing ghosts and trying to fix problems they don't have. The first step in this process, is to write down your hypothesis. Seriously. Write it down. I'm not kidding. Open up notepad and write down your very best guess at what you think is causing the problem. Remember, this is a guess. It is NOT a diagnosis!!! In science, when you have a hypothesis on how something works or why something happens, a scientist doesn't go around trying to prove that the hypothesis is correct -- instead, they try to falsify the hypothesis by finding contradictory evidence. The distinction here is ultra important! All you need to do is find one contradictory counter-example to invalidate the hypothesis. If a hypothesis is invalidated, it means that the hypothesis was wrong and we can now move on to formulating a new one. Having a hypothesis invalidated is the opposite of bad, it's very good because now you're one step closer to truth. I take the same approach to debugging. I write down my hypothesis. Then I try to find ways to prove it is wrong. It is more often the case that I have about 10+ different hypotheses which could explain the cause of the problem. Either zero or one of them is correct. To find the correct hypothesis, I begin running tests and collecting data to invalidate each possible hypothesis by counter-example and contradiction. I want to prove via negation that a hypothesis is impossible. Usually, this involves a lot of isolation of variables and potential causes. During every test, I also write down what I tried and what the results were. This helps me be more rigorous and formalized with my methodology. I also forget things, especially after hours and days of testing, and writing things down helps me not waste precious time repeating experiments. The process of narrowing down multiple hypotheses to a single hypothesis, is itself a skill which gets developed over time. Valuable knowledge isn't just about getting answers, it is also about asking the right questions. Let me illustrate with a scenario: Imagine that one day, you meet an angel. It is a divine creature and meeting it is extremely rare. The angel tells you, "I will grant you the true answer to any question you want. What question would you like answered?". Some people might be tempted to ask about the meaning of life, or when they'll die, or next weeks winning lottery numbers, but the very best question to ask is, "What is the best question to ask you?"
For, if you know the right question to ask, finding the answer is relatively easy. So, when you're trying to negate/break your hypothesis, focus carefully on asking the right questions. Don't be afraid to take five to ten minutes to think about it. It is better to move slowly in the correct direction than to rush quickly in the wrong direction. Finally, when you have a hypothesis which has withstood the onslaught of testing, you have something which is demonstrably strong. The hypothesis may still be wrong and you just don't know it yet, but it's an operating hypothesis now -- you can reasonably assume it is correct until proven otherwise. I have had operating hypotheses proven wrong on multiple occasions, and that is always a humbling moment for pause and reflection. Once you have an operating hypothesis, you can begin diagnosing and fixing the problem. I won't get into how to fix problems. That's beyond the scope of this and kind of irrelevant because its so subjective. Once you believe you have fixed your problem, it is now time to TEST. Did the fix actually work? Is the problem behavior still persisting? If the problem is still there, then either your operating hypothesis is flawed or the fix is flawed. If you think you fixed the problem, great! You have a new hypothesis to disprove! On multiple occasions, I have mistakenly believed that I have fixed a problem when in truth, my insufficient testing lead me to believe I had fixed it when I really had not fixed it. Why is this rigorous scientific methodology so important to follow? Because it works, it saves time, and it finds truth. I once worked with a few novice programmers and sys admin contractors in the US military. They were an embarrassment to the professions. Invariably, as with all software and IT systems, stuff would break or stop working. What did they do? They immediately rushed to the first hypothesis which came to mind, assumed it was true, made it their diagnosis, and began fixing the diagnosed problem. Their fixes would take days of effort and lots of coordination between groups in various parts of the organization. The problem is, they were often wrong. Very wrong, They'd apply a fix and it wouldn't fix anything and the problem would persist. Then they'd invent a new cause, rinse, lather, repeat, until eventually, they got lucky and stumbled into the right answer or everyone gave up and scraped the project. Lots of fingers would get pointed, lots of baseless conspiracy theories are invented, etc. You can imagine the nonsense they put everyone through. So, back to my debugging experience today: I used the process I outlined above. I wrote down my initial hypothesis and devised a test to prove it wrong. I successfully proved it wrong. I invented a new hypothesis. Proved that one wrong as well. I wrote down about 18 different hypotheses, before I eventually narrowed down the specifics of my problem. The problem is that when I enter my game level with an oculus rift VR headset, the screen is entirely black. This only happens on "packaged builds" of my game, which means it is ready to ship to customers. This game breaking bug slipped through my informal QA because I had made some dangerous assumptions. Oddly, this bug is particular to just the Oculus Rift. If I repeated my reproduction steps with an HTC Vive, I would have no issues. Was it an engine bug or a project bug? I recreated a similar scenario with a new project using all of the same settings, and failed to reproduce the error. So, its a project specific error. Is my level corrupted somehow? I made a duplicate of the level and started deleting half of my assets. If it magically worked, then I knew that one of the assets I deleted was the culprit. Sort of. It turns out that if my level has sub levels and those sub levels are set to automatically load as the game loads, oculus can't handle it in the latest version of the engine, only in my project. I have no idea why, but putting a 2 second delay in the game followed by a manual loading fixed the problem. So, to recap:
1. Formulate a hypothesis.
2. Try to invalidate / negate your hypothesis through data collection. Goto step 1 until step 2 fails.
3. You have an operating hypothesis, now apply a fix.
4. Test your fix. "My fix worked" is your new hypothesis, return to step 1.
5. Go slow and be right. Okay, if you've read this far, here's the kicker: This process and methodology doesn't just apply to debugging software and IT systems. It applies to everything in life. Problem: "People don't know my game exists."
Hypothesis: "If I create a bunch of facebook posts / ads, people will know about my game."
Test: Create posts
Data Collection: Look at your web traffic and analytics. Did you see a change? Is your hypothesis invalidated? When you are armed with this process and methodology, you can find truth. When your actions are based upon truth, you will enjoy successful results based upon those actions grounded in reality.




Spellbound: February Update

I don't really have the energy to write a long dev blog for this month. I was invited to meet a chinese delegation looking to do some collaboration with the VR scene in Seattle. I picked the brains of a few fellow chinese devs and I learned that most of them understand english well enough that translation isn't 100% necessary to be successful in the chinese market. That refuted an assumption I had made about the necessity of localization. I was also invited to be a judge for a VR hackathon (a 48 hour game jam). I brought a sound team from Scotland on board. I've been working on a system to interact with objects in VR using your own hands. It's really hard. I'm trying to convey the sense of object weight even though you're not physically holding anything. You also have two hands, so objects need to be able to respond. My use case is a heavy barrel which can be pushed and rotated with two hands by applying forces to it. I think it's going to be really important to get this interaction system working perfectly because it's going to be the basis for how players interact with all objects in VR. I see this as being the tech I eventually use in the future to let people interact with products in VR. One thing that's going to be extra hard is dynamically figuring out finger positions on an object -- think of where your fingers land on the surface of an object as you touch it. I also spent a day shooting a new game play trailer for the Oculus Store. I had about 6 actresses come in and play the game on camera and I recorded the game play and their responses. I later discovered that I wasn't recording any of the sound, so all of my recorded gameplay footage was useless. Even if I had the sound though, screen capturing VR footage doesn't work very well. You only get one eye, so the aspect ratio is all wrong. I think what I need to do is create a "replay" system. You play the game in VR while recording every variable, then you load up the game in full screen mode and play the replay file and record the screen as a video file. I think if I build in support for this, I'll be a step closer to multiplayer support and I'll have a solution for youtube broadcasters. The focus for the month of March is to get another big release out ASAP.



  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!