Geeks With Blogs
Freestyle Coding Programming in the Real World C#
A Case Study in Producing Unique Hash Values
As I was working on updates the The Krewe app, I found myself needing to re-implement the Geocoordinate. Before you ask, I'm making a PCL library, and the PCL doesn't have shared version of the object. You can have a GeoCoordinate on the phone, or a Geocoordinate on the desktop or tablet. I figured the object was lightweight enough that it wouldn't be too difficult to implement in a portable way. Being the good programmer I am, I went to overload the 3 required methods from Object. Of course, Equals ......

Posted On Friday, January 16, 2015 1:20 PM

Processing Kinect v2 Color Streams in Parallel
Processing Kinect v2 Color Streams in Parallel I've really been enjoying being a part of the Kinect for Windows Developer's Preview. The new hardware has some really impressive capabilities. However, with great power comes great system specs. Unfortunately, my little laptop that could is not 100% up to the task; I've had to get a little creative. The most disappointing thing I've run into is that I can't always cleanly display the color camera stream in managed code. I managed to strip the code down ......

Posted On Wednesday, August 20, 2014 4:42 PM

Data Binding to Attached Properties
When I was working on my C#/XAML game framework, I discovered I wanted to try to data bind my sprites to background objects. That way, I could update my objects and the draw functionality would take care of the work for me. After a little experimenting and web searching, it appeared this concept was an impossible dream. Of course, when has that ever stopped me? In my typical way, I started to massively dive down the rabbit hole. I created a sprite on a canvas, and I bound it to a background object. ......

Posted On Friday, June 14, 2013 3:17 PM

Exploiting the Non-Uniqueness of Guids
You know those seemingly random Guids? Guess what? They're not random. I'll give your head a moment to recover from that bombshell. Ok, back with me? Good. I was digging DEEP in some hardcore specs when I stumbled upon this. I had a situation where I have a Guid as a unique identifier. This identifier had some subsequent child data that needed to refer to the global object but required different handling. Yes, I'm being slightly vague. I do have to respect company proprietary data. Due to this dilemma, ......

Posted On Friday, May 17, 2013 3:48 PM

Improved Keyboard Buffer for Windows Store Apps
Last night, I was playing around with my port. I was having a bit of a problem getting the mouse click to behave as I expected. In a fit of inspiration, I solved that problem in such a way that it allowed me to dramatically improve the keyboard buffer. With the popularity of the keyboard buffer, I thought I'd share right away. As I stated in the original post about the keyboard buffer, WinRT doesn't route keyboard events unless there is a valid target. This forced me to have a control that required ......

Posted On Wednesday, February 20, 2013 11:27 AM

Binding to a UI Element From a Background Thread in Windows Store Apps
This post should be considered part two of the series of posts called "Recreating XNA in Windows Store Apps." I'm basically creating a DrawableGameComponent. However, let's face it, I've discovered that titles like the about gets better traffic. When we last left, we had an object that would update itself on a background thread at a periodic rate that vaguely resembled the functionality of the game loop. Now, we need to draw the object. The good news is that WinRT will automatically update the object ......

Posted On Thursday, February 7, 2013 10:03 AM

Creating an XNA GameComponent in Windows Store Apps
It was unofficially announced yesterday that XNA has officially hit the end of its life. Fortunately, as mentioned in the last post, I'm working on porting everything out of XNA. However, there is stall a lot in XNA to love. As such, I have been making it a point to borrow some of the better features of XNA. Think of this post as the beginning of a series of posts called "Recreating XNA in Windows Store Apps." The first thing I needed to recreate was a GameComponent. For those of you not familiar ......

Posted On Thursday, January 31, 2013 12:27 PM

Creating a Keyboard Buffer in Windows Store Apps
NOTE: I created a better version of this control. There are some important facts in this post that you should read first. However, check out Improved Keyboard Buffer for Windows Store Apps for a much improved version. As I mentioned in my previous post, I came across a situation where I needed to create a keyboard buffer for a Windows Store App. I will now explain why I needed to do this and how I did it. Windows Store Apps do some strange things with the keyboard. There is a completely logical explanation ......

Posted On Saturday, January 26, 2013 12:06 PM

This is not the OnKeyDown you are looking for.
I've been working on porting my sample game code to WinRT. One of the immediate things I found is that there is no direct access to the keyboard buffer. I mean, sure. WinRT is meant to work with devices that don't have keyboards, but that's no excuse. So being the bourbonred-blooded geek I am, I decided to implement my own. Most of this process is not for this post. My next post will show this whole process and include lots of sample code. However, there was one part that was so evil, I decided it ......

Posted On Thursday, January 24, 2013 3:37 PM

CodeMash Content
Greetings. Just a quick note that 99.9% of my CodeMash content is now up. Look in the sidebar under Projects, and got to GitHub Repositories. Or, if you're lazy, click this: https://github.com/freestyl... For the .1%, I took out the XACT project. I do not currently have a license for the song I use, which is fine for educational / fair use. However, I cannot, in good conscious, redistribute it. Enjoy ......

Posted On Sunday, January 13, 2013 10:27 PM

Copyright © Chris Gardner | Powered by: GeeksWithBlogs.net | Join free