Giter Site home page Giter Site logo

cc-starship's Introduction

CC-Starship

A project to make a ComputerCraft-based multiplayer starship simulator.

Installation

Copy src and library folders to the root of a ComputerCraft computer. Then either copy startup as well, or run src/main.lua yourself. Connect monitors to use them.

Notes / ToDo

Organized by sub-folder of src, these are notes about the code and an informal todo list.

apis

Right now, just a blank file called consoles which allows all files to access the consoles table via CC's os.loadAPI().

bin

Programs to be run from the terminal console.

  • moff Turns all monitors off and clears all consoles. You can tap them to turn them back on.
  • soff Turns the ship off. Dangerous! D:

consoles

These are classes for the different kinds of console each monitor can have (with the exception of select_console which is stored in the src directory).

  • helm: Provides an interface displaying basic data about what is near the ship, current velocity, and controls for changing velocity.
  • lib_access: Provides a lookup and viewer for information in the ship's library computer (see files in library folder).
  • terminal: Provides a terminal interface for running commands on the computer directly. Intended as a last-ditch backup or for debugging.

env

These are special objects emulating their respective CC APIs so that the terminal console works.

This is a list of APIs I may need to emulate for the terminal to function better (not require special programs):

shell

Note that my implementation of the shell API within the emulated environment is minimal. As this environment is supposed to be primarily for internal use, I am not worried about full functionality. Bear that in mind when trying to run external programs or writing your own.

interface

Classes for interfaces used by multiple consoles.

  • adv_keypad: A keypad that takes 4x5 area and has support for setting up to 4 modes in addition to a number (display is last 3 digits of the number).
  • basic_keypad: A keypad that takes 3x5 area and displays last 3 digits of number.
  • keyboard: A keyboard that takes the bottom half of the screen and supports ASCII input. Additionally, contains ability to add scroll keys to keyboard. TODO: Add symbols. (There is a # key used to access special symbols that does not function yet.)

ships

Definitions for different ships that can be used in the simulation. Currently one default for testing, I'd like to make it configurable based on the settings API. And have definitions roughly corresponding to 'real' ships.

util

Utility functions.

  • console: Utilities for writing to monitors.
  • String: Extensions to the string library.
  • Table: Extensions to the table library. Note: Not currently in use.

cc-starship's People

Watchers

 avatar  avatar  avatar

cc-starship's Issues

copy-pasted short notes

enter on not found screen of lib computer should clear screen
terminal does weird error about loop rather than 'no such program'

lib_access should access a different library depending on century the ship is
from, which is defined by the ship class. along with commons for both

small editor program needs to be made, as well as re-implementations of any programs that will wait on key-input
 (or write a wrapper that passes appropriate 'key pressing' if possible)
todo list?

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.