Posts

Showing posts from December, 2019

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 code will go into on

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,

Ship 1 Interior

Image
I initially intended to setup the environmental prefabs to be snappable. But when I tested it, I found out they already where. This made most of the level editing a breeze, so the task quickly became - Create the interior of the first ship. Which I also lit and baked.  And so its done. The next part I'm working on is animating the doors. Of course that also means I need the internal code system started so I can have boolean events to trigger the door state changes. I will also have to animate the code changes.   I figured it would also be good to share a few highlights, of things that I think are working well. The first one is that the environment was snappable, so placing the bulk of the environment was under an hour. Decoration tweaking and signs added a little more, but I could have spent a long time adding those.  Then I followed the following scene structure. A root empty name Environment split into Labels, Lighting, Rooms and Interactives.  Labels is a help

First Intro

Image
Now that proofs are done, I'm working towards final code. I'm also working towards first kept code. But getting this game started, I wanted to really set the tone for graphics quality, stylization, and effects. Now that I have a good visual, I want to keep that up.  This video features the ship just spinning in a circle, so I'm hoping to add controls next. However, music was added as an after thought. I might try to get that in next as well. I.e. it was edited into the video, along with the text and fades.

Space Art

Image
So I know I'm going with Low-Poly for things in space, and I've been trying to come up with an interesting background concept.  I.e. the space background is going to be a common theme, and should be fairly straight forward on the coding side. But how it is coded depends heavily on the style. As I've been doing some graphical research, I found a low poly look that seems great.  Such as this: But not this: A couple things that stand out The top image has no star background, just space debris. Of course the top image also has a nice atmosphere, possibly via a mix of bloom, depth of field and ambient occlusion There is also a shadow effect. To duplicate this and get good performance, I'll probably look to bake the lighting and effects in as much as possible, which also means setting as much of it to static as I can.  Fortunately, the low poly models will help considerably. Also, I'm not planning on using any reflective materials. This is f

Sprint 1

Image
In the spirit of agile development, I will be developing short passes, and getting features or requirements in place. (In a later article, I plan to talk about why sprints are not needed in agile, and why I won't likely won't use them.) I want to start very visually, and space is a great place for that. I'm working on samples of how the ship will fly through space. The game is low poly, and I'm considering the possibility of a low poly space background, which lead me to this concept: This is the first attempt. Please don't think the game art will look anything like this. I'm experimenting, and plan to do several more and compare directions. The code to complete this was actually really simple.  I have one script that rotates a sphere based on its position.  I.e. it literally just applies the position to the Euler rotation.  Then, that follows the camera, stretching from just behind the camera to way past the ship we are following.  Then, as the ship moves,