Content that is all about programming and coding! Find examples of code often written in C# along with tutorials.

Unity3D and .NET 4.x Framework

Unity3D Default .NET Framework I recently wrote that I wanted to start writing more Unity3D articles because I'm starting to pick up more Unity3D hobby work. It felt like a good opportunity to share some of my learnings so that anyone searching across the web might stumble upon this and get answers to the same problems I had. Unity3D as of 2018.1.1f1 (which is the version I'm currently using), still defaults to using .NET 3.5 as the framework version. Nothing wrong with that either. I'm sure there are reasons that they have for staying at that version, probably because of Mono and cross platform reasons if I were to guess, so I'm not complaining. For reference, this setting in Unity3D is referred to as "Scripting Runtime Version". So if you're googling more about this later, that's what Unity calls it.…

0 Comments

Delta State Algorithm Creation Series

Delta State Algorithm Motivation This post will act as the table of contents for an algorithm I'm developing for calculating deltas between state for generic sets of data. I figured this would be an interesting series to write about so I can document my thought process, trials, errors, and successes. At the end of this I plan to share working code that implements this algorithm so that you can use it in your own work. Now that I've been not diving more into Unity3D development for my hobby programming, I'm getting to a point in game development where I need to manage state for data in a way that allows patches of state to be applied in a layered fashion. A couple of examples of this include: Applying save game state to a base game state Applying a patch to…

1 Comment

API: Top-Down? Bottom-Up? Somewhere in the Middle?

A Quick Brain-Dump on API Desgin I'll keep this one pretty brief as I haven't totally nailed down my thoughts on this. I still thought it was worth a quick little post: When you're creating a brand new API to expose some functionality of a system, should you design it with a strong focus on how the internals work? Should you ignore how internals work and make it as easy to consume as possible? Or is there an obvious balance? I find myself trying to answer this question without ever explicitly asking it. Any time I'm looking to extend or connect systems, this is likely to come up. Most Recently... Most recently I started trying to look at creating an API over AMQP to connect my game back-end to a Unity 3D front-end. I had been developing the back-end for…

0 Comments

What Makes Good Code? – Patterns and Practices Series

What Makes Good Code? It's been a while since I've had a programming oriented post, and I figured this would be a great topic to write about. It's been a topic I've been thinking about more and more over the last year and I've been experimenting with certain patterns and practices to see if certain things actually make code "better". A lot of the information presented in this series will be completely based on my opinion, but I'll try to back up my opinion with as many concrete examples as I can. If you have a differing opinion, I'd love to hear it in the comments. I'd also like to call out that much of what I'll be discussing is in the context of object oriented programming. To be specific, there may be mostly C# examples used. If this isn't something…

1 Comment

Should My Method Do This? Should My Class?

Whose Job Is It? I wanted to share my experience that I had working on a recent project. If you've been programming for a while, you've definitely heard of the single responsibility principle. If you're new to programming, maybe this is news. The principle states: That every class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class You could extend this concept to apply to not only classes, but methods as well. Should you have that one method that is entirely responsible for creating a database connection, connecting to a web service, downloading data, updating the database, uploading some data, and then doing some user interface rendering? What would you even call that?! The idea is really this: break down your code into separate pieces of functionality.…

0 Comments

Multiple C# Projects In Your Unity 3D Solution

Problem: Visual Studio and Unity Aren't Playing Nice! UPDATE: This is for older setups with Visual Studio and Unity. You may want to look at Assembly Definitions. I just started poking around in Unity 4.6 and I've been having a blast. I've made it to the point where I want to actually start hammering out some code, but I came across a bit of a problem: I want to start leveraging other projects I've written in my Unity solution while I'm in Visual Studio, and things are blowing up. So, what gives? Okay, so let me start by explaining why I want to do this. I understand that if I'm making a simple game, I should have no problem breaking out my unity scripts into sub folders and organizing them to be nice and pretty. The problem I'm encountering is that I…

11 Comments

First C# Dev Connect is Coming Up

  C# Dev Connect Meetup! About a year ago I had thrown around the idea of creating a C#-specific group that would meet at a regular interval with some of my colleagues. I saw that there was interest, but between all of the things we had going on in our personal lives and work lives, we just hadn't been able to co-ordinate something. I'm excited to announce that with some more solid planning over the last couple of months, C# Dev Connect will be able to host their first meetup! The company I work for, Magnet Forensics, has graciously offered our new office to host the event which will help tremendously. We'll have a group of people from Magnet Forensics their to help out, but the only thing "Magnet" about the event is really just that it's hosted at the office. What's…

0 Comments

MyoSharp – Update On The Horizon

MyoSharp If you haven't checked it out already, my friend Tayfun and I created an open source C# wrapper for Thalmic's Myo. It's hosted on GitHub over here, so you can browse and pull down code whenever you want. We've had some great feedback from users of our API, so we continue to welcome it (both positive and negative!) in order to improve the usability. Thalmic has plans to release a firmware update to allow more data to be accessible through their API. Right now, MyoSharp is a bit out of date, but once this big firmware update lands we'll take some more time to get it up to date again. Remember, it's open source so you can feel free to contribute! Troubleshooting The most common question I receive is "I keep getting an exception about not being able to connect…

0 Comments

End of content

No more pages to load