WebAssembly in the Cloud

Will it MUD?

Overview of MUDs

  • Data-Driven — an engine presents a gaming experience by reading from a fixed-schema set of data
  • Code-Driven — a driver (what we nowadays would call a virtual machine) loads user/wizard-supplied code files on demand to provide the gaming experience
  • The game driver (virtual machine) — This is a stateful process that runs on a host, providing a network interface and exposes a suite of “efuns” (external functions) to LPC code.
  • The mudlib — Code written in LPC that provides the foundation of the game, e.g. weapons, objects, economy, guilds, magic, rooms, etc.
  • User (wizard) Code — Code written in LPC by players of the game. This code utilizes the mudlib to create the virtual world in which players inhabit.
inherit “/lib/room”;void create() {
::create();
set_short(“a simple room”);
set_long(“A simple room in a simple building.”);
set_description(“This is a simple room in a simple building. It is very nice.”);
add_exit(“north”, “/realms/descartes/north_room”);
}

waSCC Overview

waSCC as an Evolution of LPMud

  • Game Driver (VM)
  • Mudlib (LPC)
  • User Code (LPC)
#[macro_use]
extern crate wasmud_mudlib as mudlib;
gameobject_handlers! { mudlib::msgs::CREATE => create }fn create(msg: mudlib::msgs::CreateMessage) -> HandlerResult<()> {
mudlib::room::create(); // Perform default room setup
set_short(“a simple room”);
set_long(“A simple room in a simple building.”);
set_description(“This is a simple room in a simple building. It is very nice.”);
add_exit(“north”, “/realms/descartes/north_room”);
}
fn create(msg: mudlib::msgs::CreateMessage) -> HandlerResult<()> {
mudlib::room::create(); // Perform default room setup
set_short(“a simple room”);
set_long(“A simple room in a simple building.”);
set_description(“This is a simple room in a simple building. It is very nice.”);
add_exit(“north”, “/realms/descartes/north_room”);
let dragon = clone_object(“/npcs/dragon”);
dragon.move(this_object())?;
}

Summary

--

--

In relentless pursuit of elegant simplicity. Tinkerer, writer of tech, fantasy, and sci-fi. Converting napkin drawings into code for @CapitalOne

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kevin Hoffman

In relentless pursuit of elegant simplicity. Tinkerer, writer of tech, fantasy, and sci-fi. Converting napkin drawings into code for @CapitalOne