Monday, August 10, 2020

Windows Virtual Desktop spotted in the strangest place ever!

 If you follow my blog posts and articles you’ll that a for a big part I like to write about Application and Desktop delivery using Remoting Protocols (WVD, RDS VDI et cetera). Mostly on the Microsoft platform and today almost exclusively on Azure. Most of my articles are in-depth technical articles. Occasionally I also like to change gears and discuss the technology from a crazy, funny or at least different perspective!

You might remember the recent post I did about running  fluently from within WVD. The accompanied video got 10k views LinkedIn. It instantly became my most popular LinkedIn post, which was hilarious!

Catch the video here: .

Image for post

Since  works great from within WVD, lets switch to another popular game: Minecraft! My two kids (who are 12 and 9) love the game and I have seen them design and create the most amazing worlds. From time to time we also play this together creating new worlds and also playing many of the popular games within like e.g. EggWars or Hide & seek.

Minecraft is developed by Mojang Studios, was release in 2011. It’s an extremely popular game with 200 million copies sold across all platforms and 126 million monthly active users as of 2020. In 2014, Mojang and the Minecraft intellectual property were purchased by Microsoft.

The above made me think last weekend and challenge myself.

If we can play Minecraft from within WVD, would we also be able to use WVD from within the Minecraft game?

Challenge accepted !

Step 1 So, the first step is to see if Minecraft would work from within a WVD session. After having implemented many different WVD use cases successfully including some have graphics design applications, I’m pretty confident it should work just fine.

The proof of the pudding is in the eating! Below is a screenshot of Minecraft running inside a WVD session. In this case I’m using a GPU-powered VM, the NV6 containing an NVIDIA M60 GPU and I’m connecting to the session using the WVD Windows client. The game performs really well but the perceived performance is of course very much dependant on Round Trip Latency and available bandwidth. For the NV6 machine itself in terms of resources, running the game is peanuts.

Image for post
Image for post

The result was as expected really, not too much excitement there. Now that we have proved this first step, it’s time to move on to the much more interesting step. Leveraging a WVD session from within the Minecraft game! And yes, by that I really do mean launch a WVD session and interact with it whilst inside a Minecraft world!

Step 2 For this step I have installed Minecraft on my local machine. I’m using the Java edition (not the App from the Microsoft Store) because I’m leveraging various mods (modifications build on top of the original game engine) to achieve the goal. I’ll provide the details and download locations of the mods I used at the end of this article.

Let’s jump to the end result right away. The below shows I’m leveraging a WVD session from within the Minecraft game! I’m accessing a Windows 10 Multi-Session VM, published via WVD ARM (Spring Release) leveraging a GPU. The latter is of course not needed, but just makes it extra fun. I’m interacting with the WVD session inside the Minecraft world as if I’m looking at a huge touch screen display!

Pretty cool demo right? Isn’t that the strangest place where you have seen WVD in the wild? I personally was really surprised by the overall performance. From various different angles the desktops looks great and even the performance, especially considering this is the Web Client, is pretty good! Did you also catch the second screen inside the WVD admin dungeon? That was just so much fun to build. Of course clicking the huge projected screen by moving my Minecraft character around is far from an ideal workplace, but that was not purpose of the demo. Even scrolling works, although rich-click inside the session was a challenge I did run into.

Some more details on the setup. In order project the live session and use a WVD session from within Minecraft I needed a display screen, some way to access the internet and the functionality to leverage a keyboard and mouse. I used the following mods to achieve this goal. Forge 14.23.2.2611, MCEF 0.9 and WebDisplays. The last one provides you with the building blocks that allow you to create a screen, keyboard and browser. Since the WebDisplays mod essentially is an internet browser, I’m of course leveraging the  to achieve this goal as you can also tell from the demo.

Fun fact, when trying to discover what kind of browser / OS I was dealing inside the MOD it showed Windows 8 and Google Chrome version 51!

Image for post
Image for post

How this was built

After installing all of the necessary mods, building the screen is pretty simple. First you create a new screen / video wall by building it using the “Web Screen” blocks. There are some limitations in terms of sizing, I think the width can be a maximum of 16 blocks.

Image for post

Next you build a keyboard to interact with the session as as as a controller.

Image for post
Image for post

To turn the screen on you use the “Minepad” item to turn on the screen.

Image for post

And finally you need to connect the screen, remote controller and keyboard together. You can do this by using the “Linking Tool”.

Image for post

One this is completed we have a working display with a browser. Click on the Remote Controller to browse to a URL.

Image for post
Image for post

Another fun fact, seconds after grabbing previous screenshot is started pouring rain, so I just had to take another screenshot of that! :)

Image for post
Image for post

And finally, for those who are wondering if you can plan Minecraft inside a WVD Session and access that WVD session from Minecraft, yes you can!

Do you think that’s air your breathing now?

Image for post
Image for post

Another fun experiment in the books! I hope you enjoyed it :) Here is  containing more fun videos!