InstaTech Release

A while ago, I released "version 1" of InstaTech. I'm still debating whether I want to make a serious marketing effort just yet, or at all.

So, while I'm on the fence about that, I figured I'd at least start sharing and mentioning it. InstaTech is a suite of tools for providing IT support. It has a remote control application, live chat support, and workstation management bundled together.

The website is at https://instatech.org, which is also available from the Projects menu above. On the Downloads page, there are prebuilt clients that are ready-to-use and are completely free for personal use.

The remote control app requires a server to connect the client app and the viewer, which is web-based. Using a server to relay the connections is how it's able to traverse NATs and firewalls without any port forwarding. The clients on the Downloads page use a server that I'm hosting, but for business use, customers will need their own server.

The Package Builder will allow you to create your own server install package that has the client applications included. Try it out on your own IIS server! Oh, and there will also be a huge update coming to Game Cloud soon. :)

Game Cloud Update

Today, I released a long-overdue update for Game Cloud.  Up until now, the app was downloading a copy of all the game's files stored on the server to compare them against the local ones.  It was a really poor design, and it's been on my to-do list for a while.

Game Cloud should now be a lot faster when syncing.  Woohoo!

Oh yeah, I forgot!

I was doing some work on one of my new projects in the wee hours of the morning, and I decided to tinker with an old, under-powered tablet we have laying around.  Windows 10 doesn't run well on 1GB of RAM (read "hardly at all"), so I'm going to try various Linux distros to see if I can get any use out of it.

I wanted to remote into it from my laptop to do some clean-up on it first, since dinking around with it using touch is slow and tiresome.  Neither Remote Desktop nor Remote Assist was working, and I was about to download Team Viewer on it when I realized, "Oh yeah!  I made my own screen sharing app!"

While Team Viewer Quick Support certainly gets the job done just as quickly, there was an unique satisfaction in using my own application for real work.  I can't wait to see it in action when the full InstaTech service goes live!

Another Project

I figured I should do a quick post about what I've been working on.  I recently started a new project, which I'm calling InstaTech (https://instatech.org).  It's going to be a website for remote computer support, and I just completed the screen-sharing tools.

I'm kind of on overdrive with this project at the moment, but once I'm at a good "cruising point", I'll divert some time back to After.

Game Cloud interruption... Oops. :(

Hey, all.

If you've had problems signing into Game Cloud the past couple days, that was my fault.  The introduction of some back-end code for OurDocs caused the issue, and I failed to catch it during my testing.

I apologize if the issue has caused any inconvenience.  It should be all fixed now, but please let me know if you have anymore problems.

Thanks!

Updates and Goodies!

Hello, all!

I have lots of exciting updates today!  Firstly, you may have noticed another site change recently.  I added "Web Apps" to the menu so I'd have a place to add browser apps, since they don't really fit in the Downloads category.

After has been moved into there, and I've added OurDocs as well!  OurDocs is a online document collaboration app.  It allows two or more people to work on the same document at the same time.  It's kinda like "multiplayer OneNote".  It also has a chat feature and some other stuff, and I'll be adding more things as I have time.

A lot of back-end code I wrote for OurDocs applied to After as well.  While factoring in the updates, I decided I'd create a public repository on GitHub where I could share little helper methods and other pieces of code that others might find useful.  You can find it here: https://github.com/This-Will-Be-Your-Username

I also put a lot of work into After today, and I'll be posting an update on there as well.

That's it for now!  Take care!

Socket Server Example

 Hello all!

I’m reposting this entry that I had originally posted in my After dev blog. Since I’ve begun rewriting After as a web app, all the code I’d written for it will be thrown out. But I still think it’s pretty cool information to share, so here it is. :)

—– Original Post from February 23, 2016 —–

For my first post on the topic of C# and UWP, I suppose it would be fitting to write about the first challenge I faced when developing After: How do I create a socket server?

I had experimented with socket servers previously in WPF applications, but I didn’t have very much experience with them. Also, UWP apps use a different library for sockets, and I’d never sent anything other than strings over them. So it was kind of intimidating at first. However, the API is very similar to WPF’s socket library, and after breaking it down and taking it one step at a time, it was a lot more simple than I had anticipated.

Just like WPF apps, stream sockets have a listener class that fires a connection received event upon connection requests. So I set up my StreamSocketListener like so. In this case, I used a static class and static methods for my socket server, but you can instantiate it any way you want.

    public static class SocketServer
    {
        public static Dictionary<string, StreamSocket> SocketLookup { get; set; }
        public static bool IsRunning { get; set; }
        public static bool IsAfterLIFE { get; set; }
        public static StreamSocketListener Listener { get; set; }

        public static async Task<bool> StartServer()
        {
            Listener = new StreamSocketListener();
            Listener.ConnectionReceived -= Listener_ConnectionReceived;
            Listener.ConnectionReceived += Listener_ConnectionReceived;
            Listener.Control.KeepAlive = true;
            try
            {
                await Listener.BindServiceNameAsync(VMS.Current.Port);
                HostGame.Current.WriteOutput("Starting host on port " + Listener.Information.LocalPort + ".");
                SocketLookup = new Dictionary<string, StreamSocket>();
                IsRunning = true;
                return true;
            }
            catch (Exception ex)
            {
                Listener.ConnectionReceived -= Listener_ConnectionReceived;
                Listener.Dispose();
                IsRunning = false;
                HostGame.Current.WriteOutput("Error in server.  Closing host.");
                await Utilities.WriteError(ex);
                return false;
            }
        }


July 2016 – Translucency

So far, pretty straight-forward, but a few comments might be warranted. For event binding on static or persistent objects, I always remove before I add. I had an issue once with events getting bound multiple times, likely due to poor coding practices. :D Hey, I’m still learning! But since no exceptions are thrown by attempting to remove a binding that doesn’t exist, I don’t see any harm in doing so, and it ensures that there will always only be one binding.

VMS is the view model for the server. Current is a singleton instantiation of it. The Port property is bound two-way to the text box where the port number is entered. The SocketLookup collection will be used later to retrieve the sockets for individual connections based on their ID/username.

Now we have a server listening for connections. Here’s what happens with incoming connections.

        private static async void Listener_ConnectionReceived(StreamSocketListener sender, StreamSocketListenerConnectionReceivedEventArgs args)
        {
            var remoteAddress = args.Socket.Information.RemoteAddress.ToString();
            var reader = new DataReader(args.Socket.InputStream);
            var writer = new DataWriter(args.Socket.OutputStream);
            try
            {
                if
                {
                    // Security checks omitted here for… well, security reasons.
                }
                else
                {
                    writer.WriteBoolean(true);
                    await writer.StoreAsync();
                    var socketID = Guid.NewGuid().ToString();
                    await Utilities.WriteStringOverSocket(writer, socketID);
                    writer.DetachStream();
                    reader.DetachStream();
                    SocketLookup.Add(socketID, args.Socket);
                    ConnectionToClient.ConnectToClient(socketID, args.Socket);
                }
            }
            catch (Exception ex)
            {
                writer.DetachStream();
                reader.DetachStream();
                await Utilities.WriteError(ex);
                return;
            }
        }


July 2016 – Translucency

I’ve removed the majority of what occurs here for security reasons, since sharing this information could assist someone in circumventing my security. This is where you want to perform any initial security checks (i.e. banned IPs, DoS protection, etc.). If everything checks out, I assign a GUID to the socket and send it back to the client so it’s aware of its own ID. I then pass the socket and its ID to ConnectionToClient, which is responsible for handling all communication from this point on. On the client side, the connection is getting passed to a respective ConnectionToServer class. :)

The ConnectToClient method handles the account authentication and assigns a username to the socket. We’ll skip that since it uses the same techniques as what follows, which is basically an infinite loop that will handle the rest of the incoming data from the socket for the remainder of its lifetime.

public static async void HandleClient(Player ClientPlayer)
        {
            var reader = new DataReader(SocketServer.SocketLookup[ClientPlayer.Username].InputStream);
            while (true)
            {
                try
                {
                    await reader.LoadAsync(4);
                    var dataSize = reader.ReadUInt32();
                    if (reader.UnconsumedBufferLength < dataSize)
                    {
                        await reader.LoadAsync(dataSize - reader.UnconsumedBufferLength);
                    }
                    var strData = reader.ReadString(dataSize);
                    var objData = await Utilities.Deserialize(strData);
                    SocketServer.ReceiveDataFromClient(objData);
                }
                catch (Exception ex)
                {
                    if (VMS.Current.PlayersOnline.Exists(p => p.Username == ClientPlayer.Username))
                    {
                        await Utilities.WriteError(ex);
                        LogoutPlayer.ForceLogout(ClientPlayer);
                        reader.Dispose();
                    }
                    return;
                }
            }
        }

July 2016 – Translucency

First, it waits for data to come in on the network stream. Everything I send over a stream socket is preceded by exactly 4 bytes, which is a UInt32 that lets the receiving data reader know how much data to read. There are other ways to handle the reading data from network streams, but this is the way I chose.

Everything that’s sent from server to client and back is serialized into XML, so it’s expecting the incoming data to be a string. It sends that string to the Utilities.Deserialize method, which will convert the string into an object. I’ll go over how the serialization works in my next post.

Next, we send that object to ReceiveDataFromClient for processing. Every object that’s sent over the network stream has a common interface. By checking the type of class being received, the receiver knows which method to call that will execute the logic necessary to process it. For example, if the data coming in is of type Message, there could be a ShowMessage method on it that will display the message according to its properties.

This loop repeats indefinitely until an error is encountered. The example above merely logs the player out, but you could also include advanced error handling depending on the situation, such as reconnection attempts, etc.

Well, that’s all for the socket server, I think! In later posts, I’ll talk about how the serialization works and how to construct your classes that will be used to send data over the network (also called Data Transfer Objects or DTOs).

Take care!

– Jared



 

 

 

Site Updates!

Site Updates! – Translucency Greetings, all.

You may notice that the website looks a little different now. I finally got around to making it more mobile-friendly! Woohoo!

Is it perfect? Nope. Is it beautiful? Not really. Does it work? I think so. Will I fix it if it doesn’t? Eventually. ;)

 

Beta Release of Game Cloud

Beta Release of Game Cloud – Translucency

Good evening, everyone!

I’m incredibly excited to share with you all that I finally have a beta release available for my latest application: Game Cloud! Please share this with all your nerdy/gamer friends. :) I need beta testers and lots of feedback before the final release, and any additional word-of-mouth exposure would be super helpful. Head over to the downloads page to grab the portable exe.

So what is Game Cloud, you ask? Well, allow me to tell you! It’s a cloud-based storage app specifically designed for PC games. Anyone who plays games through Steam should be familiar with the concept, which they call Steam Cloud. It syncs your saved games automatically, so you can play a game on one computer and pick up where you left off on another. Game Cloud does the same thing, only it can be used for any game, not just supported Steam games.

This project has been a much larger undertaking than I had originally anticipated, but the results have been totally worth it. It’s fully functioning and ready to use. I just need to add some finishing touches, get feedback from actual users, and continue testing a little more thoroughly to make sure all the bugs have been worked out.

So please share this with your friends! I’m excited to hear what other gamers think about it and see how well it holds up to real-world use.

Thanks and goodnight!

 

Sleepy Kids Available on the Windows Store

Sleepy Kids Available on the Windows Store – Translucency

Hello, everyone!

Despite the lack of updates during the past few months, Translucency is still live and well. I’ve been working with Microsoft for several weeks to iron out some issues between my developer account and the Microsoft store, which was preventing me from moving forward with my first app.

With that all cleared up, I’m happy to announce that Sleepy Kids is now available on the Windows Store! Here is the direct link to the Store page: https://www.microsoft.com/store/apps/9nblggh1jn8t

Sleepy Kids is a Universal Windows App that will run on any Windows 10 device. Information is also available on the download page.

Most of my development time has been spent on my upcoming game, After. I’ve made a ton of progress since my last post, but I’m not yet ready to reveal too many details. There’s a link on the navigation bar that will lead to the development blog. All information and updates related to After will be on there. I’ll be activating the link soon, and updates will start becoming more frequent.

I’ll also be launching a Kickstarter campaign for After. My goal is to have that ready by February, but nothing’s set in stone. You’ll know when it’s close, though. I’ll be plastering information all over the place with annoying frequency to reach as many people as possible. You, my dear friends, will be asked to help spread the word!

Well, that’s all for now. Feel free to check out Sleepy Kids, report any bugs, rate and review it on the store page, etc.

Thanks!

– Jared