Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@fabric/rpg 0.2.0 #4

Draft
wants to merge 46 commits into
base: modernize
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
806087b
Swap out assets with user submissions
martindale May 24, 2019
2b8c0b5
snapshot for public demo/collab edit
martindale May 30, 2019
6860563
Import assets, resource definitions
martindale Jun 1, 2019
04886e8
Update docs
martindale Jun 1, 2019
c928740
General refresh of changes from weekend work
martindale Jun 18, 2019
1e25945
Add Semantic, player definitions
martindale Jul 7, 2019
4c52bad
Import upstream components, begin re-work for Maki
martindale Jul 7, 2019
84916b2
Add Semantic Themes
martindale Jul 7, 2019
49b9887
added two sprites
lostamongtrees Jul 18, 2019
9468e10
Quest Formula
lostamongtrees Jul 18, 2019
5a11aa0
Cupcake
lostamongtrees Jul 18, 2019
08d4bbb
Add and extend various new methods
martindale Aug 27, 2019
54b17f5
Remove UI Component
martindale Nov 4, 2019
74a9466
Patch various methods for portability
martindale Nov 4, 2019
ae3f721
Merge pull request #2 from lostamongtrees/sprites
martindale Dec 23, 2019
e8a7af7
Add phaser
martindale Dec 28, 2019
34a6a66
Merge branch 'rpg-0.2.0-develop' of github.com:martindale/rpg into pr…
martindale Dec 28, 2019
cabf2c7
Remove Semantic source
martindale Dec 28, 2019
25e080c
Defer _restoreIdentity to App
martindale Dec 29, 2019
3960679
Remove Old UI code
martindale Dec 29, 2019
b102260
Snapshot working session
martindale Dec 29, 2019
e475d84
Re-add Canvas, isolate types from Fabric
martindale Dec 29, 2019
ebed657
Update index.json
sifsand Jan 6, 2020
05ca987
Fix formatting issues
martindale Jan 6, 2020
a396731
Merge pull request #1 from martindale/patch-2
sifsand Jan 7, 2020
6464613
Remove trailing comma in monster index
martindale Jan 10, 2020
15cff5f
Merge pull request #3 from sifsand/patch-1
martindale Jan 10, 2020
a146c75
Added Mobs
lostamongtrees Feb 5, 2020
d5bf938
Create whip
lostamongtrees Feb 5, 2020
7eb57cd
add whip
lostamongtrees Feb 5, 2020
1641dce
Image optimization
littlekreen Feb 6, 2020
5728453
expressed programmatically
littlekreen Feb 6, 2020
b413230
Merge pull request #7 from littlekreen/patch-1
martindale Feb 7, 2020
d7022b8
Merge pull request #6 from littlekreen/image-optimization
martindale Feb 7, 2020
ed23720
Remove trailing comma
martindale Feb 7, 2020
3eac618
Merge pull request #4 from lostamongtrees/patch-1
martindale Feb 7, 2020
30ad39c
Create vehicles.json
lostamongtrees Feb 10, 2020
fd3ad72
Merge pull request #9 from lostamongtrees/patch-3
martindale Feb 15, 2020
d75e16b
Update branch
martindale Mar 6, 2021
99ceeca
Merge branch 'rpg-0.2.0-develop' of github.com:RolePlayGateway/rpg in…
martindale Jan 18, 2022
740bb6d
Merge branch 'patch-2' of github.com:lostamongtrees/rpg into prototype
martindale Jan 18, 2022
19c536f
Initial migration to latest Fabric
martindale Oct 4, 2022
cf8722b
Update Fabric, remove `canvas`
martindale Oct 4, 2022
d6956a7
Update to latest Fabric API
martindale Oct 10, 2022
8c8ea0c
Update package-lock.json
martindale Oct 10, 2022
79e7657
Update to latest Fabric
martindale Jan 15, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:10
WORKDIR /rpg

# if package.json changes. Docker deploys auto-update
COPY package.json /rpg
RUN npm install
RUN npm build
COPY . ./rpg

EXPOSE 9999
CMD ["npm", "start"]
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# RPG()
# `@rpg/core`
simple Fabric-hosted RPG

## Quick Start
`npm install && npm start`

## Developers
```
mkdir ~/workspace && cd ~/workspace # create workspace (if not exist) and cd

# fork & clone each repo for contributions you might make
git clone [email protected]:YOUR_USERNAME/rpg.git
git clone [email protected]:YOUR_USERNAME/http.git
git clone [email protected]:YOUR_USERNAME/fabric.git

# configure symlinks for each independent repository
cd fabric && git checkout rpg-0.2.0-develop && yarn link
cd ../http && git checkout fabric-0.1.0 && yarn link && yarn link @fabric/core
cd ../rpg && git checkout rpg-0.2.0-develop && yarn link @fabric/core && yarn link @fabric/http

# install & start
yarn install
yarn start

# enable use of development version for target...
yarn link @fabric/core
yarn link @fabric/http

# Restart the main process and check dependencies.
# Good luck, have fun!
# ~ E
```

Remember to run `yarn build:ui` at least once for local environments.

### API
See output of `npm run docs` for an HTTP-serving URL with well-organized
documentation. All source code is included, so feel free to submit proposals
for potential changes.
Binary file added assets/212465-razzle-dazzle-cupcake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/212466-forncake-cupcake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/212480-naked-cupcake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/avatar-sheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/brick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/dark-earth-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/dirt-tile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/dirt-transition-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/dirt-transition-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/dirt-transition-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/dirt-transition-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/dirt-transition-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/dirt-transition-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/dirt-transition-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/dirt-transition-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/earth-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/goomba.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/grass-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grass-tile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/brand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/quant/brand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
279 changes: 226 additions & 53 deletions assets/index.html
Original file line number Diff line number Diff line change
@@ -1,56 +1,229 @@
<!DOCTYPE html>
<html lang="en" manifest="assets/cache.manifest">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RPG</title>
<link rel="stylesheet" type="text/css" href="index.css" />
</head>
<body>
<header>
<h1>RPG: <small><a href="https://www.roleplaygateway.com/">the many worlds</a></small></h1>
<p>Use `[spacebar]` to activate the currently-selected ability. Arrow keys to move. This is only a demo!</p>
<nav data-bind="controls">
<button data-action="generate-identity">create new character</button>
<button data-action="toggle-fullscreen">fullscreen</button>
</nav>
<p><code>ERA:</code> <code>dev</code></p>
<p><strong>Source:</strong> <a href="https://github.com/FabricLabs/rpg">fabric:github.com/FabricLabs/rpg</a>
</header>
<div data-bind="fabric">
<canvas id="canvas" width="400" height="300"></canvas>
<noscript>
<h3>JavaScript Renderer Available</h3>
<p>If you're reading this, you should consider enabling JavaScript for full effect.</p>
<h4>No JavaScript Required</h4>
<p>All hyperlinks will resolve to fully-rendered HTML documents on the legacy web. This is done to ensure the accessibility, compatibility, and durability of game state.</p>
</noscript>
</div>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Peer-to-peer game engine, built with Fabric. &middot; @rpg/core</title>
<link rel="manifest" href="/assets/manifest.json">
<link rel="stylesheet" type="text/css" href="/styles/screen.css" />
<link rel="stylesheet" type="text/css" href="/styles/semantic.css" />
</head>
<body data-bind="cabb60825bb86ea0fd8a3bc110e03b483bd2a965fd41731ea80ba39236ba9fe8"><fabric-application route="/" integrity="sha256-G3XqfVacP8NZ0jx5a+rmRSmlRQt428vgF9VtbK16+F8=">
<fabric-grid>
<fabric-grid-row id="menu"><fabric-menu class="ui fixed inverted menu">
<div class="ui container"><a href="/" class="item brand">@rpg/core</a><a href="/characters" class="item">Characters</a><a href="/maps" class="item">Maps</a><a href="/tiles" class="item">Tiles</a><a href="/peers" class="item">Peers</a><a href="/places" class="item">Places</a><a href="/players" class="item">Players</a> </div></fabric-menu></fabric-grid-row>
<fabric-grid-row id="details" class="ui container">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wD/AP+gvaeTAAAAPklEQVR4nO3BMQEAAADCoPVPbQsvoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgKcBnKQAAaZ1lY4AAAAASUVORK5CYII=" class="bordered" />
<h1><a href="/">@rpg/core</a></h1>
<p>Peer-to-peer game engine, built with Fabric.</p>
<fabric-channel></fabric-channel>
<nav data-bind="controls">
<button data-action="_generateIdentity" class="ui button">create new identity</button>
<button data-action="_toggleFullscreen" class="ui button">fullscreen</button>
</nav>
<div>
<p><code>Version:</code> <code>undefined</code></p>
<p><code>Clock:</code> <code data-bind="/clock">undefined</code></p>
<p><strong>Source:</strong> <a href="https://github.com/FabricLabs/web">fabric:github.com/FabricLabs/web</a>
</div>
</fabric-grid-row>
<fabric-grid-row id="settings" class="ui container">
<h3>Settings</h3>
<application-settings type="application/json"><code>{
"name": "@rpg/core",
"synopsis": "Peer-to-peer game engine, built with Fabric.",
"handle": "html",
"language": "en",
"components": {},
"offline": false,
"authority": "chat.roleplaygateway.com:9999",
"entropy": "6170cc426cbe663cef4342dc73860f2ab26c0c0e411c390ca064208bada65e6e",
"provide": [
"rpg"
],
"secure": true,
"height": 256,
"width": 256,
"depth": 256,
"path": "./stores/chat.roleplaygateway.com",
"seed": "alpha beta kappa gamma delta omega",
"resources": {
"Character": {
"name": "Character",
"components": {
"list": "rpg-character-list",
"view": "rpg-character-view"
}
},
"Map": {
"name": "Map",
"components": {
"list": "rpg-map-list",
"view": "rpg-map-view"
}
},
"Tile": {
"name": "Tile",
"components": {
"list": "rpg-tile-list",
"view": "rpg-tile-view"
}
},
"Peer": {
"name": "Peer",
"components": {
"list": "rpg-peer-list",
"view": "rpg-peer-view"
}
},
"Place": {
"name": "Place",
"components": {
"list": "rpg-place-list",
"view": "rpg-place-view"
}
},
"Player": {
"name": "Player",
"author": "Fabric Labs",
"components": {
"list": "rpg-player-list",
"view": "rpg-player-view"
},
"description": "Basic user component.",
"site": "https://fabric.pub/"
}
}
}</code></application-settings>
<h3>Resources</h3>
<fabric-resource-list><fabric-resource name="Component"><code>undefined</code></fabric-resource><fabric-resource name="Component"><code>undefined</code></fabric-resource><fabric-resource name="Component"><code>undefined</code></fabric-resource><fabric-resource name="Component"><code>undefined</code></fabric-resource><fabric-resource name="Component"><code>undefined</code></fabric-resource><fabric-resource name="Component"><code>undefined</code></fabric-resource></fabric-resource-list>
<h3>Circuit</h3>
<fabric-circuit>
<fabric-code-snippet data-bind="45c2876dd8b930ce7a68e0f30f34f247ed06f79d270a7aa04f3bcb0beb79e1e9" data-integrity="sha256-RcKHbdi5MM56aODzDzTyR+0G950nCnqgTzvLC+t54ek=">digraph "fsm" {
"init";
}</fabric-code-snippet>
<fabric-canvas>
<fabric-grid>
<fabric-grid-row>
<textarea data-bind="45c2876dd8b930ce7a68e0f30f34f247ed06f79d270a7aa04f3bcb0beb79e1e9" placeholder="Purity contract here...">digraph "fsm" {
"init";
}</textarea>
</fabric-grid-row>
<fabric-grid-row>
<button data-action="_step">step</button>
</fabric-grid-row>
<fabric-grid-row>
<fabric-svg id="svg"></fabric-svg>
</fabric-grid-row>
<fabric-grid-row>
<canvas id="output" data-bind="output"></canvas>
<canvas id="canvas" data-bind="45c2876dd8b930ce7a68e0f30f34f247ed06f79d270a7aa04f3bcb0beb79e1e9"></canvas>
</fabric-grid-row>
</fabric-canvas>
</fabric-circuit>
<h3>State <small><code>a31357775f1f5e11bb231b3b388b0f3490b3fc9b3385a8a95d04085ff19c4115</code></small></h3>
<pre><code>{
"name": "@rpg/core",
"synopsis": "Peer-to-peer game engine, built with Fabric.",
"authority": "chat.roleplaygateway.com:9999",
"entropy": "6170cc426cbe663cef4342dc73860f2ab26c0c0e411c390ca064208bada65e6e",
"provide": [
"rpg"
],
"secure": true,
"height": 256,
"width": 256,
"depth": 256,
"path": "./stores/chat.roleplaygateway.com",
"seed": "alpha beta kappa gamma delta omega",
"resources": {
"Character": {
"name": "Character",
"components": {
"list": "rpg-character-list",
"view": "rpg-character-view"
}
},
"Map": {
"name": "Map",
"components": {
"list": "rpg-map-list",
"view": "rpg-map-view"
}
},
"Tile": {
"name": "Tile",
"components": {
"list": "rpg-tile-list",
"view": "rpg-tile-view"
}
},
"Peer": {
"name": "Peer",
"components": {
"list": "rpg-peer-list",
"view": "rpg-peer-view"
}
},
"Place": {
"name": "Place",
"components": {
"list": "rpg-place-list",
"view": "rpg-place-view"
}
},
"Player": {
"name": "Player",
"author": "Fabric Labs",
"components": {
"list": "rpg-player-list",
"view": "rpg-player-view"
},
"description": "Basic user component.",
"site": "https://fabric.pub/"
}
}
}</code></pre>
</fabric-grid-row>
<fabric-grid-row id="router" class="ui container">
<fabric-router>
<fabric-grid-row>
<input type="text" name="address" value="./stores/chat.roleplaygateway.com" />
</fabric-grid-row>
<fabric-grid-row id="content"><fabric-resource name="BlankPage"><code>{"name":"BlankPage","types":{},"blobs":{},"states":{},"addresses":{},"collections":{},"tips":{}}</code></fabric-resource></fabric-grid-row>
</fabric-router>
</fabric-grid-row>
<fabric-grid-row id="composite" class="ui container">
<noscript>
<h3>JavaScript Renderer Available</h3>
<p>If you're reading this, you should consider enabling JavaScript for full effect.</p>
</noscript>
<fabric-column id="canvas">
<fabric-canvas></fabric-canvas>
</fabric-column>
<fabric-column id="peers">
<fabric-peer-list></fabric-peer-list>
</fabric-column>
</fabric-grid-row>
</fabric-grid>
<!-- [0]: README [dot] md -->
<!--
# RPG `@fabric/rpg`
## STOP HERE AND READ ME FIRST!
Before continuing, let us be the first to welcome you to the Source. While it
might be confusing at first, there's a lot you can learn if you make the time.

Use this URI:
> https://www.roleplaygateway.com/

From there, links like `hub.roleplaygateway.com` might "pop up" from time to
time. With a bit of navigating around, you can earn credit for your progress.

Continue:
> https://chat.roleplaygateway.com/

Offline:
> https://www.roleplaygateway.com/medals/beta-tester

Remember: never be afraid to explore! Curiosity might have killed the cat, but
that's why he had nine lives.

Good luck, have fun (`gl;hf o/`), and enjoy!

— the RPG team
-->
<script src="index.js" type="text/javascript"></script>
</body>
</html>
> # RPG `@fabric/rpg`
> ## STOP HERE AND READ ME FIRST!
> Before continuing, let us be the first to welcome you to the Source. While it
> might be confusing at first, there's a lot you can learn if you make the time.
> Use this URI:
> > https://www.roleplaygateway.com/
> From there, links like `hub.roleplaygateway.com` might "pop up" from time to
> time. With a bit of navigating around, you can earn credit for your progress.
> Continue:
> > https://chat.roleplaygateway.com/
> Offline:
> > https://www.roleplaygateway.com/medals/beta-tester
> Remember: never be afraid to explore! Curiosity might have killed the cat, but
> that's why he had nine lives.
> Good luck, have fun (`gl;hf o/`), and enjoy!
> — the RPG team
-->
<script type="text/javascript" src="/scripts/index.min.js" defer></script>
</fabric-application></body>
</html>
Binary file modified assets/mario.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quant/avatar-sheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quant/brick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quant/goomba.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quant/mario.png
Binary file added assets/quant/wario.png
Binary file added assets/slime-blue.png
Binary file modified assets/slime.png
42 changes: 42 additions & 0 deletions assets/styles/screen.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
* {
margin: 0;
padding: 0;
}

fabric-grid-row {
display: block;
}

fabric-svg {
width: 800px;
height: 600px;
}

textarea {
display: block;
width: 100%;
height: 10em;
}

.bordered {
border: 1px solid black;
}

# Semantic Overrides
.ui.menu .item img.logo {
margin-right: 1.5em;
}

#details,
.main.container {
margin-top: 7em;
}

.wireframe {
margin-top: 2em;
}

.ui.footer.segment {
margin: 5em 0em 0em;
padding: 5em 0em;
}
Binary file modified assets/wario.png
Loading