ASP.NET SignalR is a library for .NET that adds real-time / bidirectional communication to your web application. In this course we will learn how to use this framework to build a real-time two player memory game.
ASP.NET SignalR is a library for .NET that adds real-time / bidirectional communication to your web application. In this course we will learn how to use this framework to build a real-time two player memory game. Throughout this course you will learn how to construct a game framework that leverages the power of MVC 4, SignalR hubs and the integration of a server side blackplane for load balancing and scale.
Introduction Hello, my name is Joel Neubeck and in this course we will be building a game, a game of memory using the SignalR platform. Many of us as kids played the popular card game, Concentration or Memory. In this game, a bunch of cards are laid face down on a surface and two cards are flipped face up. Each player flips a pair of cards hoping to create a matching pair by remembering where each card is located. In our version of this classic game our surface will be a web browser and our opponent will be a person on the internet. Our game mechanics will be identical. A player will flip a pair of cards and their opponent will witness the flip in real-time. As cards are matched, one player will emerge the winner. So what can you expect in this course? First, we will look at the SignalR framework and understand how to accomplish real-time server to client communications. Next, we will analyze the game of Memory to develop a sound game architecture. This architecture will include constructing the game mechanics to manage player to player communications, all while visualizing our game board and tracking game progress. Lastly, we will put it all together and explore how to test and scale our application in a production environment.
Building the Game Hello, my name is Joel Neubeck and this is the third module in the course Building a Game of Memory with SignalR. In this module we are going to build our game. It is now time to integrate SignalR into our MVC 4 project and dig into how SignalR works. Next, we will write our model classes, as well as a class that will be used to manage our players, as well as our active games. Lastly, we will write our hub and the corresponding client methods that will control how our views visualize game progress. Let us get started. Before we jump into writing our game, let us create one additional sample app to better understand how to get SignalR to work within MVC 4. For those users running Visual Studio 2012 make sure you have installed the Microsoft ASP. NET Web Tools 2012. 2. This will ensure that you have the SignalR templates added to Visual Studio, which will simplify our integration. If installing 2012. 2 is not possible, you will have to manually install the SignalR NuGet package after you have created your MVC 4 project.