Giter VIP home page Giter VIP logo

clh-bash's Introduction

clh-bash

screenshot from 2019-02-06 09-54-54

Development

Install dependencies.

npm install

Extract the compressed MTL and OBJ files.

npm run extract

Extract the compressed MTL and OBJ files for Windows OS.

npm run unzip

Start the dev server.

npm start

If you need to make changes to MTL/OBJ files and want to preserve them, run this to compress them. Only gzipped MTL/OBJ files are saved in the repo.

npm run compress

Leaderboard selection

Bash supports multiple options for leaderboard storage. The default is in-browser localStorage. A networked leaderboard is also supported, through sending leaderboard entries to a Parse server.

Networked leaderboards with Parse

If you want a networked leaderboard, you must have a Parse instance up and running. Then, open src/config.js and change PARSE_URL to point to the URL of your parse server.

Finally, when you launch Bash, add &storage=parse to the end.

Selecting a leaderboard namespace

Both localStorage and Parse leaderboard support namespacing. In other words, you can give the leaderboard a name. This is especially useful if you need to maintain multiple leaderboards, for tournament rounds, timed events at conferences, etc. Switching between leaderboards is as easy as changing the namespace.

Then, when you launch Bash, add &name=NAMESPACE to the end of Bash's URL. Note that you can change the word NAMESPACE to be anything you want.

How to get Help

  1. Post a question in the repo issues
  2. Ask a question in real-time in our public Discord server
  3. Send a tweet to one of the twitter links below social

Community

Join our public Discord server!

Social

clh-bash's People

Contributors

jared-sprague avatar jasehackman avatar mikefindsthings avatar mwcz avatar ronknight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clh-bash's Issues

give players a star ranking

To give players a feeling of completion, display a star ranking at the end of the game.

I set a benchmark by typing in as many HTML tags as I could, going by the list.
I was able to type in 89 commands and got a score of approx 140,000.

That was at high speed going from a list with no downtime for thinking, so it's
definitely an upper bound. I'm thinking a more realistic number would be 30 commands, one star per 6 commands.

state: playing

The playing state is zoomed in on the screen

screenshot from 2019-01-18 17-22-17

To complete this issue, create a function to "enter" the playing screen which does the following:

  • zoom camera in until the monitor almost fills the viewport
  • blank the monitor
  • display some help text #14
  • begin the timer
  • respond to keypresses with #1
  • respond to onValidCommand and onInvalidCommand by doing the following
    • update the score
    • add command entry to the screen (scroll up older entries to make room)
  • at end of timer, display #20 and then move to leaderboard state

copy: help text

Create some help text to display when the player begins playing. Something like this:

Enter all the commands you can think of, as fast as you can!  You have two minutes!

Commands may be:
 - HTML tags
 - BASH commands & built-ins
 - Python keywords and standard library functions
 - JavaScript keywords and standard library functions

command list: JS

Get all JS:

  • keywords (like function, async, if)
  • global functions (like parseInt, isNaN, but not ones inside namespaces like Math.random())

Move game instructions to the main screen

All game instructions should be on the main screen on the right. This will give people a chance to read the instructions and type "play" when ready to start the game.

state: leaderboard

To complete this issue, create a function to "enter" the leaderboard which does the following:

  • fetches the latest leaderboard data from #16
  • if player just finished playing, send their score to #16
  • display leaderboard, something like this
NAME   SCORE   TRIBE
TOM    1500    BASH
JIM    900     PYTHON
BOB    100     CSS

left arrow should be disabled

Left arrow was fine when the textarea was visible but now you can't see the position of the cursor. Moving the cursor with the left arrow should simply be disabled for simplicity. Backspace is still fine.

ghosty should appear to give hints

Ghosty should appear and give hints.

  1. Hi, you appear to be having trouble with this game. Here's a hint.
  2. F ... (pause) ... N ... (pause) ... I ... (pause) ... D

I don't think we decided between "press F1 to activate hints" or "you get a hint when you're idle".

Feedback

Some feedback from Castastrophe:

  1. It's fun!
  2. On title screen the eye is drawn to the text on the left, not to the computer screen. The blinking cursor helps but not enough.
  3. The time on the bonus commands screen is way too long.
  4. There are too many bonus commands. Two or three per language would be better.
  5. Choosing a language would be better than having them all mixed together.

copy: game over

There should be some text when a player finishes, saying to check out the podcast and offering a link to the game repo.

Johan will help improve and edit whatever we write.

Question: should the text appear before or after the leaderboard?

animation for ghosty

When ghosty is giving a tip, he should float around subtly on a path (bezier path)?

juice: blinking cursor

A blinking cursor would be really nice to have, to draw the eye to the command prompt.

It should be fairly easy to add and remove a character on a timer.

If needed, the HTML special char is: █

add computer model with UV coords to allow displaying text

followup to #5

The computer model we have doesn't include UV coords so we can't map textures onto it. If we get a version with UV coords, we're all set to put the console texture directly onto the screen.

If not, a backup plan that should still look pretty good is to take the temporary flat plane (#5) and give it many more polygons, then curve it. Here's an equation that's at least approximately the same curve as a CRT monitor.

add LEDs to comp

Add two small cubes or spheres to the comp (with three.js) to act as power & activity LEDs. This would help add some life to the computer and keep the title screen alive.

[Instruction State] Golden Commands

Have a primer screen before the game starts that has like a randomly selected list of golden commands that will be displayed before the game starts that is part of the instructions screen that says "Here are a few commands to get you started" then they disappear and the game starts, the golden commands will count bonus points for memory.

this helps many things:

  1. It kind of gives a primer into the game instead of just dropping them on a command line
  2. It makes the game totally playable for people who know nothing about ANY of the things, because they can treat it simply as a memory challenge
  3. It kind of makes it a little less tempting to bring a list and just type stuff, since we'll show a list at the beginning and people that are good at remembering the golden commands will get bonus points vs people dumbly entering from a printed list or their phones

The golden commands can have extra juice when they enter them right, and they will be different each game

State: Command Report Bar Chart

Have a way to display a descending order horizontal bar chart of the frequency of commands entered. It would be really interesting to see which command are most commonly typed. This could be brought up on -demand with a hotkey when the game is not playing, or after the leaderboard state.

state: title screen

Here's the general layout of the title screen:

screenshot from 2019-01-18 17-19-05

To complete this issue...

create a function to "enter" the title screen which does the following:

  • positions the camera
  • blanks out the computer screen
  • adds 'type "play"' to the screen
  • when player types "play", transition to the play state
  • displays the CLH logo
  • displays credits "created by Jared Sprague, Michael Clayton, and Eric Kramer"
  • displays link to repo, maybe?

The above can be roughly laid out, they don't have to be perfect, we can fine tune and tweak later.

command list: python

Get all python:

  • keywords
  • global standard library functions (like max(), but not ones inside modules like math.sin())

Need a credits link and screen

We need a link on the splash page to a credits screen. When the link is clicked, stay on the same page but replace the instructions with list of credits.

Important credits:
Open source contributors
CLH team
Waveshaper for music with link back to bandcamp

Link at the bottom to go back to Instructions.

Kiosk app switcher

Need a kiosk app that can switch multiple browsers running the webgames and executables running open jam games. This will be the way players pick which game they want to play when the walk up to the arcade machine.

create database and server

Parse probably? @Jared-Sprague is in charge!

I think it should save two things:

  • commands entered
    • every command entered (or maybe just the successful ones) should be logged so we can get stats about which commands are most popular, etc.
  • leaderboard scores
    • name - a short name or handle, we should limit it to maybe 8 or 10 chars so it always fits on screen
    • score - the score
    • top_lang - the language from which they scored the most commands, it would be cool to display that on the leaderboard #17

Score doesn't reset

Bug found by @castastrophe, score doesn't reset between plays. If you start a new game your old score shows up. Per-language command counts are also not reset.

Mobile message

Display a message that the game is not playable on mobile

[Juice] Flames!

When the player is on a roll the sides of the monitor should start catching on fire, ala Overwatch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.