programming-game

0.0.8 • Public • Published

Programming Game

Programming Game is an mmorpg that you interact with entirely through code.

Getting Started

Visit the homepage and sign in via Github to create your account. You'll need to sign up for a $5/month subscription for each character that you wish to control within the game. The full game is accessible with only one character, but requires coordinated teamwork to progress.

After creating your account, and activating your subscription, you can copy your User ID as well as your API KEY to use with this package.

Controlling your Character

Control of your character is done entirely through code. Below is the most basic snippet you can use to get started.

import { connect } from "programming-game";

connect({
  credentials: {
    id: "<supply your user id here>",
    key: "<supply your api key here>",
  },
  /**
   * onTick gets called for each subscribed character on every update from the
   * server.
   *
   * It's fully typed through typescript, so feel free to explore its api.
   */
  onTick: (heartbeat) => {
    if (heartbeat.player) {
      return heartbeat.player.move({
        x: heartbeat.player.position.x + 1,
        y: 0,
      });
    }
  },
});

Readme

Keywords

none

Package Sidebar

Install

npm i programming-game

Weekly Downloads

1

Version

0.0.8

License

ISC

Unpacked Size

221 kB

Total Files

27

Last publish

Collaborators

  • gdborton