hungud / aspnet-core-demogame

ASPNET Core demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ASP.NET Core Demo with SignalR

This is a simple showcase of a trivial multiplayer game using SignalR. It also showcases many of the new features of ASP.NET Core, including:

  • Strongly-typed Options
  • Cascading configuration
  • Custom Tag Helpers
  • View dependency injection
  • Bundling/minifying
  • Injected Filters

💯

Run the app:

dotnet restore
dotnet run

To play the game, just move arrows. In non-development environment, it will autogen player names.

In Visual Studio it will run under IIS Express. You can also publish it to Azure to test it out (be sure to enable Web Sockets in Azure, probably will need S1 or above).

Join the game by typing a name and press the arrow keys to move your player. Other players will be shown and updated when they move.

To keep things simple, moves are step-based (32px) and bounded to the map. Player state is stored in a static dictionary.

THIS IS NOT AN EXAMPLE OF HOW TO MAKE A MULTIPLAYER GAME. It is merely a fun exercise to show .NET Core and SignalR working together.

About

ASPNET Core demo

License:MIT License


Languages

Language:JavaScript 79.7%Language:PowerShell 12.8%Language:C# 6.3%Language:TypeScript 1.1%Language:HTML 0.0%Language:CSS 0.0%