All Projects → statico → Langterm

statico / Langterm

Licence: mit
🕹️ WebGL-based VT220 emulator, made as a learning example and frontend for a text adventure

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Langterm

Glsl Godrays
This module implements a volumetric light scattering effect(godrays)
Stars: ✭ 155 (+342.86%)
Mutual labels:  webgl, glsl, shaders, demo
Wireframe World
An infinite wireframe world in WebGL
Stars: ✭ 347 (+891.43%)
Mutual labels:  retro, webgl, glsl, demo
Radian
A 21 century R console
Stars: ✭ 878 (+2408.57%)
Mutual labels:  cli, terminal, console
Yaspin
A lightweight terminal spinner for Python with safe pipes and redirects 🎁
Stars: ✭ 413 (+1080%)
Mutual labels:  cli, terminal, console
Progressbar
Terminal-based progress bar for Java / JVM
Stars: ✭ 625 (+1685.71%)
Mutual labels:  cli, terminal, console
Veda
⚡VJ / Live Coding on Atom⚡
Stars: ✭ 373 (+965.71%)
Mutual labels:  webgl, glsl, shaders
Tess Opt
Demonstration of how we can use tessellation shaders to make faster fragment shaders.
Stars: ✭ 13 (-62.86%)
Mutual labels:  glsl, shaders, demo
Regl Cnn
Digit recognition with Convolutional Neural Networks in WebGL
Stars: ✭ 490 (+1300%)
Mutual labels:  webgl, glsl, demo
Tqdm
A Fast, Extensible Progress Bar for Python and CLI
Stars: ✭ 20,632 (+58848.57%)
Mutual labels:  cli, terminal, console
Regl Fire
Fire particle system made with regl
Stars: ✭ 16 (-54.29%)
Mutual labels:  webgl, glsl, demo
Polygon Shredder
The polygon shredder that takes many cubes and turns them into confetti
Stars: ✭ 686 (+1860%)
Mutual labels:  webgl, glsl, demo
Video To Ascii
It is a simple python package to play videos in the terminal using characters as pixels
Stars: ✭ 960 (+2642.86%)
Mutual labels:  cli, terminal, console
Stig
TUI and CLI for the BitTorrent client Transmission
Stars: ✭ 360 (+928.57%)
Mutual labels:  cli, terminal, console
Shader Doodle
A friendly web-component for writing and rendering shaders.
Stars: ✭ 356 (+917.14%)
Mutual labels:  webgl, glsl, shaders
Wonders
🌈 Declarative JavaScript framework to build command-line applications.
Stars: ✭ 34 (-2.86%)
Mutual labels:  cli, terminal, console
Pulsemixer
CLI and curses mixer for PulseAudio
Stars: ✭ 441 (+1160%)
Mutual labels:  cli, terminal, console
Tui Consolelauncher
Linux CLI Launcher for Android
Stars: ✭ 861 (+2360%)
Mutual labels:  cli, terminal, console
Consola
Elegant Console Logger for Node.js and Browser 🐨
Stars: ✭ 3,461 (+9788.57%)
Mutual labels:  cli, terminal, console
Whatspup
🔳 WhatsApp chat from commandline/console/cli using GoogleChrome puppeteer
Stars: ✭ 310 (+785.71%)
Mutual labels:  cli, console, fun
Python Progressbar
Progressbar 2 - A progress bar for Python 2 and Python 3 - "pip install progressbar2"
Stars: ✭ 682 (+1848.57%)
Mutual labels:  cli, terminal, console

langterm 🕹️

     __ _____________  __  ___
    / //_  __/ __/ _ \/  |/  /   langterm by Ian Langworth, 2017
   / /__/ / / _// , _/ /|_/ /    featuring "The Archive", a cheesy
  /____/_/ /___/_/|_/_/  /_/     interactive fiction game

This is a WebGL-based VT220 emulator with a simple fallback for non-JS/non-WebGL/non-desktop browsers. Made as a learning example and frontend for a cute text adventure game. It's also used as my home page on https://langworth.com/.

How It Works

The game has two view modes: simple and fancy.

If the user is on a small screen, or fires a touch event, or we cannot initialize WebGL, we fallback to the simple mode which is just a scrollable text box and an input field. Touch devices should have the on-screen keyboard appear which makes the game playable.

On larger desktops with hardware keyboards, provide the full pseudo-CRT experience using WebGL. This works as follows:

  1. A data structure, Terminal, keeps track of the logical appearance of the terminal.

  2. The terminal is rendered to a 2048x2048 texture by drawing triangles filled up with bitmap font data found in assets/apple2font.png. That font came from KreativeKorp's Ultimate Apple II Font and was turned into a sprite sheet with Codehead’s Bitmap Font Generator.

  3. That texture is rendered to another texture as a full-screen quad (two triangles) and post-processed to add CRT-like scanline and warping effects. I got the CRT shader from this CRT shader by Timothy Lottes.

  4. The background image was from here and is reused with permission. I photoshopped the text out and noise added to make it look blank. It's rendered to a full-screen quad, and some vignetting and noise is added for effect. I could have used background-size: cover in CSS and composited the vignette and noise over the web page, but I wanted to do it all in GLSL as a learning example.

  5. The terminal texture is rendered to a 2D quad. I initially used a 3D quad with a persepctive matrix, but the field of view gets stretched with short/wide windows. Using 2D and writing my own aspect ratio math in the shader looks better. Also, I had to enable GL blending to properly composite this texture and its alpha channel over the background image.

  6. Text input gets added to a buffer. When you hit Enter, the input buffer is sent to an interactive fiction server running a custom story made with Inform7. See my gluluxe-httpd project for the server. The story is closed source, but you can check out a limited public version here. The whole idea is that you'll have to figure it out on your own ;)

I started with WebGL Boilerplate. For more involved projects and to reduce repetition, I would consider using ThreeJS.

Build/Test

  1. Get a Glulx game and run statico/glulxe-httpd
  2. Serve this directory with something like python -m SimpleHTTPServer and go to http://localhost:8000

See Also

License

The source code in this repository is released under the MIT License. Other assets, such as the VT520 photo, fonts and CRT GLSL shader, are subject to any license provided by the original authors.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].