Skip to content

gdquest-demos/template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cover itchio youtube tags description
static/cover.webp
example template
A generic template to use as a basis for demos

An example Demo repo

This repo serves as an example of the requirements and standards necessary for creating a demo.

Checklist:

  • There's a purposeful and specific icon for the demo
  • The Screen settings are:
    • not full screen by default
    • if there is a fullscreen shortcut/button, it's hidden for the HTML5 feature
    • Window stretch/mode is set to canvas_items and stretch/aspect to keep (or keep-height or keep-width)
  • The README.md is well written:
    • Buttons are in <kbd> tags, like this: Z. For controllers, you can use AlphaNumeric Enclosed UTF8 chars (see below for a list of useful ones)
    • The frontmatter is well set (see this file)
    • All images used are stored in a directory called static
  • If you want to puch to itch, make sure the itch address is configured correctly, and that it exists, and that ITCHIO_API_KEY is passed either through environment variables or a .env file in the project's root.
  • The project has a well configured export_presets.cfg that you tested locally or does not have an export_presets.cfg at all (it will be generated)
  • the project has a LICENSE file

To upload to Itch

Either:

  1. specify the environment variables ITCHIO_GAME, ITCHIO_USER and ITCHIO_API_KEY
  2. put those variables in a .env file (don't forget to exclude it from git)
  3. Only specify ITCHIO_API_KEY, but have an itch url in your frontmatter

To test locally:

  • Add bin and exports to your project's .gitignore (not necessary, but recommended)
  • Run:
    gwee build \
      -b beta17 . \
      -p x11,win,osx,web \
      && \
      notify-send "build finished" && \
      npx local-web-server \
        --https \
        --cors.embedder-policy "require-corp" \
        --cors.opener-policy "same-origin" \
        --directory exports/public
  • Head to https://localhost:8000

For a main repo build (e.g, gquest-demos.github.io), run:

gwee render . && npx local-web-server --https --directory public

To push the build to gh-pages

#!/usr/bin/env bash

export BUILD_DIR="exports/public"
export RELEASE_BRANCH="gh-pages"

git fetch origin $RELEASE_BRANCH || git checkout -b $RELEASE_BRANCH
git add -f $BUILD_DIR
tree=$(git write-tree --prefix=$BUILD_DIR)
git reset -- $BUILD_DIR
export identifier=$(git describe --dirty --always)

git push -u origin $RELEASE_BRANCH
export commit=$(git commit-tree -p refs/remotes/origin/$RELEASE_BRANCH -m "Deploy $identifier" $tree)
git update-ref refs/heads/$RELEASE_BRANCH $commit
git push origin refs/heads/$RELEASE_BRANCH
git checkout main

Useful Symbols for documenting keys & buttons

  • W
  • A
  • S
  • D
  • 🕹 Stick
  • XBox Ⓐ
  • XBox Ⓑ
  • XBox Ⓧ
  • XBox Ⓨ
  • ☰ Menu
  • ⇧ Shift
  • ⌃ Control
  • ⌥ Alt
  • ⇪ CapsLock
  • ← Arrow left
  • ↑ Arrow up
  • → Arrow right
  • ↓ Arrow down
  • ⏎ Enter
  • ⌫ Backspace
  • ␣ Space
  • ⇥ Tab
  • ⌘ Command
  • 🖱 Mouse

Commonly used sentences:

  • Move with WASD or the 🕹 left stick.
  • Move the camera with 🖱 Mouse or the 🕹 right stick.
  • Jump with ␣ Space or XBox Ⓐ.
  • Shoot with Left Mouse or XBox Ⓑ.
  • Aim with Right Mouse or XBox RT.
  • Cycle weapons with ⇥ Tab or Xbox Ⓧ.
source
- Move with <kbd>W</kbd><kbd>A</kbd><kbd>S</kbd><kbd>D</kbd> or the <kbd>🕹 left stick</kbd>.
- Move the camera with <kbd>🖱 Mouse</kbd> or the <kbd>🕹 right stick</kbd>.
- Jump with <kbd>␣ Space</kbd> or <kbd>XBox Ⓐ</kbd>.
- Shoot with <kbd>Left Mouse</kbd> or <kbd>XBox Ⓑ</kbd>.
- Aim with <kbd>Right Mouse</kbd> or <kbd>XBox RT</kbd>.
- Cycle weapons with <kbd>⇥ Tab</kbd> or <kbd>Xbox Ⓧ</kbd>.

Releases

No releases published

Packages

No packages published