Skip to content

.NET single-page WebAssembly and console versions of R136 that share the same game engine.

Notifications You must be signed in to change notification settings

rbergen/R136.NET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R136.NET

Plain .NET build Azure SWA STA Azure SWA PRD

This is a .NET web and console version of a text adventure a friend and I created all the way back in 1998. More information about the game and its history can be found in the README of the original C(++) version GitHub repo.

Since its resurrection, R136 has become a willing vehicle for me to try new things. This single-pager "static" web app, console application and shared game engine blend, marks my first dabble with developing for/in/using:

Concerning the game itself:

  • It has been converted from a purely C-like procedural implementation to an object-oriented one.
  • Much of it (including all visible texts) can now be configured through JSON files.
  • It now runs in English as well as Dutch, and features on-the-spot switching between those two languages.

Building

On any system that has a .NET 8.0 SDK and node.js (npm) installed, R136.NET can be built using Visual Studio 2022, the dotnet command line interface or another tool that uses the latter.

The Web project is a Blazor WebAssembly project with AOT compilation enabled. This means that the following command must be issued once before building it for the first time:

$ dotnet workload install wasm-tools

The Shell and Web projects have an optional build-time dependency on the BuildTool project; the latter takes care of processing the base .json files in the data directory structure to their production counterparts. The dependency is optional in the sense that the JSON processing is simply skipped if the BuildTool executable is not found when building the dependent projects.

When building the solution, this dependency is taken care of automatically. When building individual projects using the command-line, the BuildTool should be built first if JSON processing is desired. This can be done by running the following command from the src subdirectory before building a dependent project:

$ dotnet build R136.BuildTool/R136.BuildTool.csproj

The dependent project can then be built, after (Shell used as an example):

$ dotnet build R136.Shell/R136.Shell.csproj

I've successfully built the Shell project on Windows and Linux (Cloud9 Amazon Linux 2, to be precise), following these instructions.

- Rutger van Bergen - github.com/rbergen