+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wordbots",
"version": "0.19.0-alpha",
"version": "0.20.0-beta",
"description": "A card-and-board game that showcases card game semantic parsing",
"license": "MIT",
"engines": {
Expand Down
112 changes: 81 additions & 31 deletions src/common/containers/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,51 @@ import Background from '../components/Background';
import MarkdownBlock from '../components/MarkdownBlock';
import Title from '../components/Title';
import * as w from '../types';
import { lookupParserVersion } from '../util/cards';

interface AboutProps {
version: string
}

interface AboutState {
parserVersion: string
}

export function mapStateToProps(state: w.State): AboutProps {
return {
version: state.version
};
}

class About extends React.PureComponent<AboutProps> {
class About extends React.PureComponent<AboutProps, AboutState> {
public state = {
parserVersion: '(loading)'
};

public componentWillMount() {
void this.lookupParserVersion();
}

public render(): JSX.Element {
const [version, sha] = this.props.version.split('+');
const { parserVersion } = this.state;
const shaTruncated = truncate(sha, { length: 8, omission: '' });

return (
<div className="helpPage">
<Helmet title="About" />
<Helmet title="About / FAQ" />
<Background asset="compressed/image1-1.jpg" opacity={1} style={{ backgroundSize: 'contain' }} />

<Title text="About" />
<Title text="About / FAQ" />

<div style={{ display: 'flex', justifyContent: 'stretch', margin: '20px auto', width: '84%' }}>
<div style={{ width: '50%', marginRight: 20 }}>
<Paper style={{ padding: '5px 20px' }}>
<MarkdownBlock source={whatIsWordbots(version, shaTruncated)} />
<MarkdownBlock source={whatIsWordbots} />
</Paper>

<Paper style={{ padding: '5px 20px', marginTop: 20 }}>
<MarkdownBlock source={statusReport} />
</Paper>

<Paper style={{ padding: '5px 20px', marginTop: 20 }}>
Expand All @@ -51,6 +69,14 @@ class About extends React.PureComponent<AboutProps> {
<Paper style={{ padding: '5px 20px' }}>
<MarkdownBlock source={credits} />
</Paper>

<Paper style={{ padding: '5px 20px', marginTop: 20 }}>
<pre>
Game version: v<a href={`https://github.com/wordbots/wordbots-core/releases/tag/v${version}`}>{version}</a><br />
Build SHA: {shaTruncated === 'local' ? '(local)' : <a href={`https://github.com/wordbots/wordbots-core/commit/${sha}`}>{shaTruncated}</a>}<br />
Parser version: {parserVersion.startsWith('(') ? parserVersion : <a href={`https://github.com/wordbots/wordbots-parser/releases/tag/v${parserVersion}`}>{parserVersion}</a>}
</pre>
</Paper>
</div>
</div>

Expand All @@ -69,44 +95,65 @@ class About extends React.PureComponent<AboutProps> {
</div>
);
}

private async lookupParserVersion(): Promise<void> {
try {
this.setState({
parserVersion: await lookupParserVersion()
});
} catch (error) {
this.setState({
parserVersion: '(failed to connect to parser)'
});
}
}
}

export default withRouter(connect(mapStateToProps)(About));

const whatIsWordbots = (version: string, sha: string) => (`
## Wordbots [${version}](https://github.com/wordbots/wordbots-core/releases/tag/v${version})+${sha}
![](http://app.wordbots.io/static/screenshot_mini.png)
**Wordbots** is a customizable hex-based card game with a twist – _you_, the player,
get to create the cards!
const whatIsWordbots = `
## What is Wordbots?

Wordbots is currently in **alpha**.
We _have_ a working (but not fully complete) parser for card text, basic gameplay functionality, and a lobby for multiplayer gameplay.
We _don't_ currently have any mechanism to ensure that cards are reasonably balanced –
that's still something we're brainstorming.
`);
**_Wordbots_ is a card game with a twist – _you_, the player,
get to create the cards!**

const howItWorks = `
## How Does It Work?
The basic gameplay of Wordbots is that of a positional card game _(think Hearthstone, Faeria, or Duelyst)_.
The fact that players make their own cards makes Wordbots games rather wild and unpredictable, and also
introduces behaviors that are not possible in other games, such as cards being able to _rewrite_ other cards mid-game.

[Glad you asked! There's a whole separate page explaining the magic.](/how-it-works)
Wordbots started as an experiment in semantic parsing, way back in 2016. It has since spiraled into a very-long-term side project.
I guess making a multiplayer game is kind of complicated!
`;

const getInvolved = `
## Get Involved!

Interested in Wordbots? There are many ways you can get involved:
const statusReport = `
## What's the status of Wordbots? Is it "done"? Will it ever be?

1. Join us on [our Discord channel](http://discord.wordbots.io) to discuss Wordbots.
Wordbots is in **early beta** (but it will probably forever retain the "beta" designation).

2. Got comments or questions? Is something not working? Are some elements of the game confusing?
[Fill out our feedback form](https://docs.google.com/forms/d/e/1FAIpQLSed43Rc8HcdZug7uW8Jdxsa6CpHP8kQLnioIz_tiFos2NvMtQ/viewform?usp=sf_link)
to let us know.
It's more or less "feature-complete", in the sense that:
* the parser works decently well at what it does; and
* there are a variety of fully-fledged gameplay formats, some more balanced than others

3. Technical folks, follow the development of the game on [GitHub](http://git.wordbots.io).
Feel free to add issues or even make a pull request if you're feeling brave.
Is it a "game"? It's certainly playable! Of course, it's not going to be the next Hearthstone.
Our goal is to get somewhere in the middle between "cool tech demo" and "successful multiplayer game".

You can check out [Wordbots's version history on GitHub](https://github.com/wordbots/wordbots-core/releases).
`;

const howItWorks = `
## How does it work?

4. Last but not least, donations enable us to keep working on Wordbots, so if you're feeling generous,
[send a dollar or two our way on Patreon](https://www.patreon.com/wordbots).
[Glad you asked! There's a whole separate page explaining the magic.](/how-it-works)
`;
const getInvolved = `
## How cool! Any way I can get involved?

* Join us on [our Discord channel](http://discord.wordbots.io) to discuss Wordbots. This is the place to go with any general questions or comments about Wordbots – we'd love to hear your feedback!

* Technical folks, follow the development of the game on [GitHub](http://git.wordbots.io).
Feel free to add issues or even make a pull request if you're feeling brave.
Interested in starter issues? Reach out on [our Discord](http://discord.wordbots.io)!
`;

const credits = `
Expand All @@ -123,11 +170,12 @@ with help from:
* [John Patterson](https://www.johnppatterson.com/) - consultation, code contributions, voice acting
* [Danny Burt](http://dbz.rocks/), [Bryan Hoyt](https://github.com/bryanftw), [Michael Ebert](https://github.com/MichaelEbert), [Tim Hwang](https://timhwang21.gitbook.io/index/) – consultation, [code contributions](https://github.com/wordbots/wordbots-core/graphs/contributors)
* Asali Echols, James Silvey, Annie Nisnevich – extensive playtesting
* Adam B, Honza H, Drew T, Greg S, Liam D, Erik K, John B, Alex B – playtesting
* Adam B, Alex B, Daniel M, Drew T, Erik K, Greg S, Honza H, John B, Liam D – playtesting

The Wordbots parser is built on top of the [\`Montague\` semantic parsing engine](https://github.com/Workday/upshot-montague).
The Wordbots parser is built on top of the [\`Montague\` semantic parsing engine](https://github.com/Workday/upshot-montague),
by Thomas Kim, [Joseph Turian](https://github.com/turian), and [Alex Nisnevich](https://alex.nisnevich.com/).

The Wordbots frontend incorporates the following (MIT- and WTFPL-licensed) projects:
The Wordbots frontend incorporates/vendors the following (MIT- and WTFPL-licensed) projects:

* [\`react-hexgrid\`](https://github.com/hellenic/react-hexgrid) by [Hannu Kärkkäinen](https://github.com/Hellenic)
* [\`spritegen\`](https://gitlab.com/not_surt/spritegen) by [Carl Olsson](https://gitlab.com/not_surt)
Expand All @@ -143,6 +191,8 @@ Wordbots uses the following fonts and icon fonts:
* [Material Icons](https://mui.com/components/material-icons/) by Google
* [RPG-Awesome Icons](https://nagoshiashumari.github.io/Rpg-Awesome/) by [Game-Icons.net](https://game-icons.net/), [Daniela Howe](https://github.com/nagoshiashumari), and [Ivan Montiel](https://github.com/idmontie)

_No LLMs were used in the making of Wordbots._

`;

/* (No longer needed now that we have the New Here? widget on the homepage? -AN)
Expand Down
6 changes: 3 additions & 3 deletions src/common/containers/Admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ class Admin extends React.PureComponent<AdminProps> {
}

private async lookupParserVersion(): Promise<void> {
const parserResponse = await fetch(`${PARSER_URL}/parse?format=js&input=Draw%20a%20card`);
const parserResponseJson = await parserResponse.json();
this.setState({ parserVersion: parserResponseJson.version });
this.setState({
parserVersion: await this.lookupParserVersion()
});
}

private async previewMigration(cards: w.CardInStore[], setId: w.SetId | null): Promise<void> {
Expand Down
6 changes: 6 additions & 0 deletions src/common/util/cards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ export function parseCard(
);
}

export async function lookupParserVersion(): Promise<string> {
const parserResponse = await fetch(`${PARSER_URL}/parse?format=js&input=Draw%20a%20card`);
const parserResponseJson = await parserResponse.json();
return parserResponseJson.version;
}

//
// 3.5. Keyword abilities.
//
Expand Down
2 changes: 1 addition & 1 deletion src/server/handleRequest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function renderFullPage(html: string, head: HelmetData): string {
<meta property="og:type" content="website" />
<meta property="og:title" content="Wordbots" />
<meta property="og:description" content="Wordbots is a customizable hex-based card game with a twist – you, the player, get to create the cards!" />
<meta property="og:image" content="/static/screenshot.png" />
<meta property="og:image" content="/static/static/artAssets/dome2.png" />

<link rel="icon" href="/static/favicon.ico" />
<link rel="apple-touch-icon" sizes="57x57" href="/static/icons/apple-icon-57x57.png" />
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载