Posts

Dialogue ?= Debug Log

Image
I've been taking a serious look at dialogue. I've built dialogue systems before, and I had an idea as to how to approach it. But I also knew a problem I would face was trying to manage the shear amount of content. And while I felt good about the architecture in general, I had not come up with a visual concept I was happy with. So I did what has worked out well in the past. I asked questions, and ended with a great concept that is very fitting. Source:  https://pixabay.com/illustrations/question-mark-pile-questions-symbol-2492009/ So I started asking questions. In my meetup group, RE: Game Dev, I asked to hear about other people's experience. I also searched for existing articles and tutorials, and came across a great one from the GDC, "Dialogue Systems in Double Fine Games".  This proved excellent, as I kept pausing and rethinking my decisions. But still ended up really close to my original intentions. That video was great, but it also referenced ...

I'm not dead. And I'm taking my code with me.

Image
Its been a few weeks since my last post, so I just wanted to make sure anyone following is aware I haven't died, and neither has Codavore. But, I have had way too much going on. I'll get into that and what I've been silently completing (Unit test coverage). Source:  https://pixabay.com/photos/despaired-businessman-business-2261021/ I started a contract with Microsoft, so have 40 hours a week there. I'm interviewing for FT positions in Microsoft, Seattle and in several other countries including Spain, Canada, Denmark, France and Germany, which is easily adding about 20 more hours and calls at Midnight then 5 AM. And on top of that, my game dev group, REGameDev (Redmond Eastside Game Developers) is partnering with DigiPen to run a Game Jam. And then my locator class sprung a leak... So amidst all that, I am still working on the project, but it has hit a spot with no visible activities. The Locator Service is an integral part of the architecture, and specifically h...

Animations & More Light

Image
I put animations in again and tweaked the lighting more. Here is a screenshot, at the bottom is a video clip showing the player with no light and personal lighting. The animation is quite simple. First I'm using Simple Citizens pack, as shown here below, and using the default animation pack that comes with it. You are welcome to get it yourself, its not pricey. Simple Citizens - Unity Asset Store Then I added a NavMesh to the background to define where my character could walk, and added a NavAgent to the character, so they could traverse the area. On top of that, I added this simple script: using UnityEngine ; using UnityEngine.AI ; public class CharacterAnimator : MonoBehaviour { private Animator _Animator; private NavMeshAgent _Agent; public string SpeedVariableName = "Speed_f" ; void Start () { _Animator = GetComponent<Animator>(); _Agent = GetComponent<NavMeshAgent>(); } void Update...

A Momentary Lapse of Passion

Image
There have been so many projects that I have lost passion for while developing, that a few years ago, I challenged myself to start paying close attention to this. To start researching the psychology of what drives me to and from a goal. In that time, I found that Game Design is actually a key value in life's success. And Codavore will survive because of this. :D I'll tell you a short story of why I lost my passion for Codavore and then how I revived it. In hopes that when you hit this runners wall, you might be able to get past it as well. source:  https://pixabay.com/photos/light-bulb-idea-creativity-socket-3104355/ 2 weeks ago, I wanted to start working on the dialogue system, as that would be a common need in this game. I had seen the start of an instructional video on how another person had created this really nice looking Dialogue Graph, and kept looking for opportunities to apply it (or similar) in my code. So my first steps into the dialogue pushed me into worki...

Architecturally Deep

Image
I could show you code towards the navigation and Camera switching I have in place, but I want to go over a much more impactful issue to the success of the game; Architecture. Don't worry,  I will go over how I got camera control and character movement working in later posts. Architecture Source:  https://pixabay.com/illustrations/blueprint-technical-drawing-4056027/ So, in programming, we quickly become our own worst enemy, by overly complicating things. So now as the production code is falling into place, I have to seriously consider the long term effects of my early choices. So to do this, I'll address several key issue, and talk about how to handle them. I want to preface any architecture explanations I give to say I DO NOT BELIEVE there is a perfect architecture or pattern to solve everything. I believe that you should look into many different architectures and learn their strengths and weaknesses, so you can figure out what is needed. Spaghetti So ...

Roslyn Parsing now Formatting Code

Image
I almost took another break on Roslyn’s SyntaxTree, to tackle dialogue. But I spent Thursday resolving it to completion. 😊 For the initial test, I wanted parsing, as it is * somewhat * easy to apply formatting based on the syntax kind (of which there are around 500 see: https://github.com/dotnet/roslyn/blob/master/src/Compilers/CSharp/Portable/Syntax/SyntaxKind.cs ).  I set it up to pick a color at random for each new kind it comes across in code. (rather than resolve them all right now) What is not so visible, is the fact that I now have access to the types called out in the code . I can tell what classes and namespaces are in use. After researching several paths, including looking up black lists of C#, such as CAS, I ultimately will be going with a white list.  If a type or method is not in the white list, the code will not be executed, and the unsafe code will be highlighted as under risk.  I will also generate a black list myself.  Basically c...

Setting up Roslyn Parser In Unity

Image
So, I did manage to get the Roslyn C# Parser partially running, on the last commits of the Proof development. Now I'm putting Roslyn back in.  As I'm finding the same hurdles I thought I would call them out more clearly for others to tread. Generated on WordClouds.com , from sample C# parsed by Roslyn SyntaxTree First off, it wasn't a straight forward install, of just add this package and go. The first step was to install NuGet for Unity, as found here: ( https://github.com/GlitchEnzo/NuGetForUnity ). Instructions and download are there. Keep in mind: NuGet Packages are typically designed for Visual Studio solutions, but this is Unity. Many packages will not work out of the box. Roslyn is no exception. So now, with NuGet running, we need to pull in Roslyn. Search for "Microsoft.CodeAnalysis.CSharp" and pull it in. Once done, there will be a handful of errors, relating to references being missing or incompatible.  So now we need to fix those errors. Now, ...