Skip to content

Commit

Permalink
Initial check in for working version
Browse files Browse the repository at this point in the history
  • Loading branch information
kevglass committed Nov 19, 2024
1 parent e129429 commit abbb44d
Show file tree
Hide file tree
Showing 22 changed files with 4,801 additions and 121 deletions.
136 changes: 15 additions & 121 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,127 +4,21 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
node_modules
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
4 changes: 4 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
semi: false,
trailingComma: "es5",
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint"]
}
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Getting Started with Rune

### `npm run dev`

Runs the game in Dev UI.

The page will reload when you make changes.

### `npm run upload`

Builds the game and starts upload process to Rune.

### `npm run build`

Builds the game. You can then upload it to Rune using `npx rune-games-cli@latest upload`.

### `npm run lint`

Runs the validation rules. You can read about them in the [docs on server-side logic](https://developers.rune.ai/docs/advanced/server-side-logic).

### `npm run typecheck`

Verifies that TypeScript is valid.


## Learn More

See the [Rune docs](https://developers.rune.ai/docs/quick-start) for more info. You can also ask any questions in the [Rune Discord](https://discord.gg/rune-devs), we're happy to help!
27 changes: 27 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import js from "@eslint/js"
import prettier from "eslint-plugin-prettier/recommended"
import globals from "globals"
import runePlugin from "rune-sdk/eslint.js"
import tseslint from "typescript-eslint"

export default [
{
languageOptions: {
globals: {
...globals.browser,
...globals.es2020,
},
ecmaVersion: "latest",
sourceType: "module",
},
},
js.configs.recommended,
...runePlugin.configs.recommended,
...tseslint.configs.recommended,
prettier,
{
rules: {
"prettier/prettier": "warn",
},
},
]
61 changes: 61 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"
/>
<title>Storyteller AI</title>
</head>
<body>
<div id="page">
<div id="logo">

</div>
<div id="players">
<img src="avatar" class="player ready"></img>
<img src="avatar" class="player not-ready"></img>
<img src="avatar" class="player not-ready"></img>
<img src="avatar" class="player ready"></img>
<img src="avatar" class="player ready"></img>
</div>
<div id="startScreen" class="screen enabled">
<div id="intro">Welcome to the game of Storyteller, where AI helps you create amazing tales.</div>
<div id="startTheStory" class="storyButton"><span>Start</span></div>
</div>

<div id="thinkingScreen" class="screen off">
<div id="thinking">Storyteller AI is writing an epic....</div>
</div>
<div id="inputScreen" class="screen off">
<div id="textSection">
</div>
<div id="playerInputControls">
<div id="error"></div>
<input type="text" id="playerInput" placeholder="Enter story terms here">
</input>
<div id="suggestions">
<div id="suggestionsLabel">SUGGESTIONS</div>
<div id="suggestionsList">
</div>
</div>
<div id="addButton" class="storyButton"><span>Add</span></div>
</div>
<div id="waitingForOtherPlayers">
Waiting for other players...
</div>
</div>

<div id="endScreen" class="screen off">
<div id="fullTextSection">
The creature paused, eyeing the <span class="term">rubber duck<img src="avatar" class="termAvatar"></span> at its feet when a telephone on the fountain rang. A familiar voice crackled through—britney spears singing softly, distorted and haunting. The crowd froze, unsure if they were more startled by the voice or the creature's sudden, intent gaze on the ringing phone.
</div>
<div id="shareButton" class="storyButton"><span>Share</span></div>

</div>
</div>
<script type="module" src="/src/logic.ts"></script>
<script type="module" src="/src/client.ts"></script>
</body>
</html>
Loading

0 comments on commit abbb44d

Please sign in to comment.