Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
Fix JS deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed Jan 18, 2024
1 parent 93a68d8 commit d8f6867
Show file tree
Hide file tree
Showing 37 changed files with 5,219 additions and 5,341 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,38 @@

| Preview | Name | Tutorial | Features | Language | Platforms | Networking |
| ------- | ---- | -------- | -------- | -------- | --------- | ---------- |
| [![Preview](./godot/bomber/_media/preview_200.png)](./godot/bomber/) | [Bomber](./godot/bomber) | [Tutorial](https://rivet.gg/learn/godot/tutorials/crash-course) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | GDScript | Desktop | High-Level Multiplayer |
| [![Preview](./godot/bomber/_media/preview_256.png)](./godot/bomber/) | [Bomber](./godot/bomber) | [Tutorial](https://rivet.gg/learn/godot/tutorials/crash-course) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | GDScript | Desktop | High-Level Multiplayer |



### Unity

| Preview | Name | Tutorial | Features | Language | Platforms | Networking |
| ------- | ---- | -------- | -------- | -------- | --------- | ---------- |
| [![Preview](./unity/tanks-fishnet/_media/preview_200.png)](./unity/tanks-fishnet/) | [Tanks](./unity/tanks-fishnet) | [Tutorial](https://rivet.gg/learn/unity/tutorials/fishnet/crash-course) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | C# | Desktop | Fish-Networking |
| [![Preview](./unity/tanks-fishnet/_media/preview_256.png)](./unity/tanks-fishnet/) | [Tanks](./unity/tanks-fishnet) | [Tutorial](https://rivet.gg/learn/unity/tutorials/fishnet/crash-course) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | C# | Desktop | Fish-Networking |



### JavaScript

| Preview | Name | Tutorial | Features | Language | Platforms | Networking | Rendering |
| ------- | ---- | -------- | -------- | -------- | --------- | ---------- | --------- |
| [![Preview](./javascript/tanks-socketio-canvas/_media/preview_200.png)](./javascript/tanks-socketio-canvas/) | [Tanks](./javascript/tanks-socketio-canvas) | [Tutorial](https://rivet.gg/learn/html5/tutorials/tanks-canvas-socketio) [Live Demo](https://tanks.staging2.boatbumpers.io/) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | TypeScript | HTML5 | Socket.IO | Canvas |
| [![Preview](./javascript/microgravity.io/_media/preview_200.png)](./javascript/microgravity.io/) | [Microgravity](./javascript/microgravity.io) | [Live Demo](https://microgravity.io) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | TypeScript | HTML5 | Socket.IO | Canvas |
| [![Preview](./javascript/gameinc.io/_media/preview_200.png)](./javascript/gameinc.io/) | [gameinc.io](./javascript/gameinc.io) | [Live Demo](https://gameinc.io) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | TypeScript | HTML5 | Socket.IO | DOM |
| [![Preview](./javascript/sandbox/_media/preview_200.png)](./javascript/sandbox/) | [Sandbox](./javascript/sandbox) | [Live Demo](https://sandbox.staging2.boatbumpers.io/) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | TypeScript | HTML5 | Socket.IO | DOM |
| [![Preview](./javascript/webrtc/_media/preview_200.png)](./javascript/webrtc/) | [WebRTC](./javascript/webrtc) | | [🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | TypeScript | HTML5 | WebRTC | |
| [![Preview](./javascript/tanks-socketio-canvas/_media/preview_256.png)](./javascript/tanks-socketio-canvas/) | [Tanks](./javascript/tanks-socketio-canvas) | [Tutorial](https://rivet.gg/learn/html5/tutorials/tanks-canvas-socketio) [Live Demo](https://tanks.staging2.boatbumpers.io/) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | TypeScript | HTML5 | Socket.IO | Canvas |
| [![Preview](./javascript/microgravity.io/_media/preview_256.png)](./javascript/microgravity.io/) | [Microgravity.io](./javascript/microgravity.io) | [Live Demo](https://microgravity.io) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | TypeScript | HTML5 | Socket.IO | Canvas |
| [![Preview](./javascript/gameinc.io/_media/preview_256.png)](./javascript/gameinc.io/) | [GameInc.io](./javascript/gameinc.io) | [Live Demo](https://gameinc.io) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | TypeScript | HTML5 | Socket.IO | DOM |
| [![Preview](./javascript/sandbox/_media/preview_256.png)](./javascript/sandbox/) | [Sandbox](./javascript/sandbox) | [Live Demo](https://sandbox.staging2.boatbumpers.io/) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | TypeScript | HTML5 | Socket.IO | DOM |
| | [Colyseus](./javascript/colyseus) | | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | TypeScript | HTML5 | Colyseus | |
| [![Preview](./javascript/webrtc/_media/preview_256.png)](./javascript/webrtc/) | [WebRTC](./javascript/webrtc) | | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | TypeScript | HTML5 | WebRTC | |



### Other

| Preview | Name | Tutorial | Features | Language | Platforms | Networking | Rendering |
| ------- | ---- | -------- | -------- | -------- | --------- | ---------- | --------- |
| | [PixleProp.io](./rust/pixelprop) | [Live Demo](https://pixelprop-io.staging2.boatbumpers.io/) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | Rust & TypeScript | HTML5 | WebSocket | BabylonJS |
| [![Preview](./rust/scrunch/_media/preview_200.png)](./rust/scrunch/) | [scrunch.io](./rust/scrunch) | [Live Demo](https://scrunch.staging2.boatbumpers.io/) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | Rust & TypeScript | HTML5 | WebSocket | PixiJS |
| | [Core dump](./c/coredump) | | [🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | C | | | |
| | [CLI WebSocket](./rust/cli-websocket) | | [🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | Rust | | WebSocket | |
| [![Preview](./rust/pixelprop/_media/preview_256.png)](./rust/pixelprop/) | [PixleProp.io](./rust/pixelprop) | [Live Demo](https://pixelprop-io.staging2.boatbumpers.io/) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | Rust & TypeScript | HTML5 | WebSocket | BabylonJS |
| [![Preview](./rust/scrunch/_media/preview_256.png)](./rust/scrunch/) | [Scrunch.io](./rust/scrunch) | [Live Demo](https://scrunch.staging2.boatbumpers.io/) | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | Rust & TypeScript | HTML5 | WebSocket | PixiJS |
| | [CLI WebSocket](./rust/cli-websocket) | | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | Rust | | WebSocket | |
| | [Core dump](./c/coredump) | | [♟️](https://rivet.gg/docs/matchmaker "♟️ Matchmaker")[🌐](https://rivet.gg/docs/dynamic-servers "🌐 Dynamic Servers") | C | | | |


2 changes: 1 addition & 1 deletion _internal/templater/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fn template_example(config: &example::Config, tera: &Tera, path: &Path) -> Resul

let path_clone = preview_path.clone();
let (a, b) = rayon::join(
|| resize_and_save(&img, &path_clone, 200),
|| resize_and_save(&img, &path_clone, 256),
|| resize_and_save(&img, &preview_path, 512),
);
a?;
Expand Down
2 changes: 1 addition & 1 deletion _internal/templater/tpl/root/README.md.tera
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
| ------- | ---- | -------- | -------- | -------- | --------- | ---------- |{% if rendering %} --------- |{% endif %}
{% for ex in examples -%}
{% if ex.engine_id == engine -%}
| {% if ex.has_preview %}[![Preview]({{ ex.path }}/_media/preview_200.png)]({{ ex.path }}/){% endif %} | [{{ ex.config.display.title }}]({{ ex.path }}) | {% if ex.config.display.tutorial_url %}[Tutorial]({{ ex.config.display.tutorial_url }}){% endif %} {% if ex.config.display.demo_url %}[Live Demo]({{ ex.config.display.demo_url }}){% endif %} | {{ ex.features }} | {{ ex.language }} | {{ ex.platforms }} | {{ex.networking }} |{% if rendering %} {{ ex.rendering }} |{% endif %}
| {% if ex.has_preview %}[![Preview]({{ ex.path }}/_media/preview_256.png)]({{ ex.path }}/){% endif %} | [{{ ex.config.display.title }}]({{ ex.path }}) | {% if ex.config.display.tutorial_url %}[Tutorial]({{ ex.config.display.tutorial_url }}){% endif %} {% if ex.config.display.demo_url %}[Live Demo]({{ ex.config.display.demo_url }}){% endif %} | {{ ex.features }} | {{ ex.language }} | {{ ex.platforms }} | {{ex.networking }} |{% if rendering %} {{ ex.rendering }} |{% endif %}
{% endif -%}
{% endfor %}
{% endmacro engine_table %}
Expand Down
1 change: 1 addition & 0 deletions c/coredump/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

**Rivet Features**

- [♟️ Matchmaker](https://rivet.gg/docs/matchmaker)
- [🌐 Dynamic Servers](https://rivet.gg/docs/dynamic-servers)


Expand Down
2 changes: 1 addition & 1 deletion c/coredump/example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ title = "Core dump"
engine = "Custom"
languages = ["C"]
platforms = []
features = ["DynamicServers"]
features = ["Matchmaker", "DynamicServers"]


2 changes: 1 addition & 1 deletion godot/bomber/_media/preview_512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion javascript/gameinc.io/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# gameinc.io
# GameInc.io

<p align="center">
<img src="./_media/preview_512.png" />
Expand Down
2 changes: 1 addition & 1 deletion javascript/gameinc.io/_media/preview_512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion javascript/gameinc.io/example.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[display]
title = "gameinc.io"
title = "GameInc.io"
demo_url = "https://gameinc.io"
overview_weight = 70

Expand Down
2 changes: 1 addition & 1 deletion javascript/microgravity.io/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Microgravity
# Microgravity.io

<p align="center">
<img src="./_media/preview_512.png" />
Expand Down
4 changes: 2 additions & 2 deletions javascript/microgravity.io/_media/preview_512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion javascript/microgravity.io/example.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[display]
title = "Microgravity"
title = "Microgravity.io"
demo_url = "https://microgravity.io"
overview_weight = 80

Expand Down
3 changes: 3 additions & 0 deletions javascript/sandbox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ COPY src/ src/
COPY tsconfig.json .
RUN yarn run build:server

RUN adduser -D server
USER server

CMD ["node", "src/server.js"]
1 change: 1 addition & 0 deletions javascript/sandbox/example.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[display]
title = "Sandbox"
demo_url = "https://sandbox.staging2.boatbumpers.io/"
overview_weight = 30

[meta]
Expand Down
5 changes: 4 additions & 1 deletion javascript/sandbox/rivet.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
engine:
html5: {}
cdn:
build_command: yarn run build:prod
build_command: yarn install && yarn run build:prod
build_output: dist
matchmaker:
max_players: 128
tier: basic-1d8
regions:
lnd-atl: {}
lnd-fra: {}
game_modes:
default:
taggable: true
Expand Down
8 changes: 5 additions & 3 deletions javascript/tanks-socketio-canvas/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
FROM node:16-alpine as build
WORKDIR /app
COPY ./package.json ./package-lock.json /app/
RUN npm install
RUN yarn install
COPY . .
RUN npm run build:server
RUN yarn run build:server

# === Run ===
FROM node:16-alpine
WORKDIR /app
COPY --from=build /app/package.json /app/package-lock.json /app/
RUN npm install --production
RUN yarn install --production
COPY --from=build /app/dist/ /app/dist/
RUN adduser -D server
USER server
CMD node dist/server/index.js
7 changes: 5 additions & 2 deletions javascript/tanks-socketio-canvas/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ import { renderBullet } from "../shared/Bullet";
import { renderBarrel } from "../shared/Barrel";
import { renderExplosion } from "../shared/Explosion";
import { renderTurret } from "../shared/Turret";

import { RivetClient } from "@rivet-gg/api";
export const RIVET = new RivetClient({ token: process.env.RIVET_TOKEN });

export const RIVET = new RivetClient({
environment: process.env.RIVET_API_ENDPOINT,
token: process.env.RIVET_TOKEN,
});

const TITLE_TEXT = "Tanks!";

Expand Down
1 change: 1 addition & 0 deletions javascript/tanks-socketio-canvas/example.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[display]
title = "Tanks"
tutorial_url = "https://rivet.gg/learn/html5/tutorials/tanks-canvas-socketio"
demo_url = "https://tanks.staging2.boatbumpers.io/"
overview_weight = 90

[meta]
Expand Down
Loading

0 comments on commit d8f6867

Please sign in to comment.