CoboldConsole

An Open-Source HTML5 Console
Excellent for text-based games
Designed with ♥ by Luke Nickerson
for the ASCII Enthusiasts Game Jam
Try it out now > Omicron Game Basic Console Example > Hello World Cobold Console GitHub Repo
Screenshot of Omicron Game Fork me on GitHub

How to Use the Console

Setup

  1. Include jQuery <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
  2. Include the latest Cobold Console code <script src="js/cobold_console-0.1.js"></script>
  3. Include the HTML for the Console
    <div id="console">
      <div id="consoleOutput">
        Loading...
      </div>
      <div id="consoleInput">
        <form method="get" post="">
          <label for="consoleInputTextArea"></label>
          <textarea id="consoleInputTextArea" autocapitalize="off">
          </textarea>
          <!--- <input type="submit" /> --->
        </form>
      </div>
    </div>
    
  4. Include the CSS styling <link rel="stylesheet" href="css/console_alpha.css" />
  5. Instantiate the Cobold Console
    $(document).ready(function(){
    	window.cc = new ConsoleClass();
    });
    

Functions

Output

Input

Special

Example

	var cc = new ConsoleClass();
	cc.addLine("Hello")
		.addDelay(1000)
		.addLine("World")
		.addDelay(1000);
	cc.submitCallback = function (x) {
		alert(x);
	}

Go Forth

  1. Make stuff
  2. Contribute to the Cobold Console GitHub Repo