programming-game
Version:
The client for programming game, an mmorpg that you interact with entirely through code.
55 lines (44 loc) • 1.64 kB
Markdown
<p align="center">
<a href="https://programming-game.com">
<img src="https://programming-game.com/og" width="70%">
</a>
</p>
<p align="center">
<a href="https://discord.gg/69M8p25ffP">
<img src="https://img.shields.io/discord/1195118926871416924?logo=discord&logoColor=white&color=7289da">
</a>
</p>
<p align="center">
<a href="https://programming-game.com">Programming Game</a> is an mmorpg that you play through code.
</p>
## Quick Demo
There's an in-browser, no sign up required demo available [here](https://programming-game.com/demo).
## Getting Started
[Create an account](https://accounts.programming-game.com/sign-up) then clone the [starter](https://github.com/gdborton/programming-game-starter) and follow the [getting started guide](https://programming-game.com/docs/getting-started).
## Controlling your Character
Control of your character is done through code. Below is the most basic snippet you can use to get started.
```javascript
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, so feel free to explore the api.
*/
onTick: (heartbeat) => {
if (heartbeat.player) {
return heartbeat.player.move({
x: heartbeat.player.position.x + 1,
y: 0,
});
}
},
});
```
## Getting Help
If you need any help with code or mechanics, or want to coordinate with other players, come [join the discord server](https://discord.gg/69M8p25ffP)