GithubHelp home page GithubHelp logo

thekidthatcodes / copy-cat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from squiddev-cc/copy-cat

0.0 0.0 0.0 1.22 MB

copy cat but it updates with cc

Home Page: https://copy-cat.squiddev.cc/

License: MIT License

JavaScript 6.61% Java 22.57% TypeScript 57.85% CSS 5.76% HTML 7.21%

copy-cat's Introduction

Copy Cat

Copy Cat is a ComputerCraft emulator for the web, heavily inspired by the a similar project Mimic. However, unlike Mimic, it's built from the mod's source code - ensuring that it's always 1 as accurate as possible.

The interface is essentially the same as Cloud Catcher, but with the computer running right in your browser rather than a server!


1. While we try to keep as close as we can, there are some elements which are impossible to emulate due to the restricted environment of a browser.

For instance, the http API has been entirely recreated, and some functionality (such as setting specific headers or requesting some sites) is not possible. As with any emulator, there will be subtle differences in how input events (key presses, mouse clicks, etc...) are handled, so do not rely on our behaviour.

And yes, this disclaimer was longer than the actual description.

Screenshots

The emulator in action

Editing a file

Embedding

It's possible to embed copy-cat within another website. This may be useful if you want to show off your programs on their own site.

<!-- The div to embed your computer. Can be placed anywhere within the page. -->
<div id="embed-computer"></div>

<!-- Any requirejs-compatible loader (https://requirejs.org/) will work. -->
<script type="text/javascript" src="https://copy-cat.squiddev.cc/require.js"></script>

<script>
  // Tell requirejs to load copycat/* from the website.
  require.config({ paths: { copycat: "https://copy-cat.squiddev.cc/" } });
  // Find our #embed-computer element and inject a computer terminal into it.
  require(["copycat/embed"], setup => setup(document.getElementById("embed-computer")));
</script>

The setup function also accepts several arguments, which are demonstrated in this example.

Build it yourself

Due to the nature of this project, Copy Cat has a rather strange build setup. We take sources of [CC: Tweaked, modify them to work in a Javascript environment, and then compile them to JS. Thankfully, this is all automated by Gradle. However, it does require a bit of setup:

Before getting started, you will need the JDK (Java Development Kit), and NodeJS installed and on the path.

  • Clone Copy Cat with submodules: git clone --recursive https://github.com/SquidDev-CC/copy-cat
  • Install NodeJS packages: npm install
  • Build: ./gradlew assemble. You can also automatically build everything when a file changes using ./gradlew assemble --continuous.

The resulting website should be in build/web.

Use git submodule foreach git pull in order to update all source repositories. You will probably need to apply and then regenerate patches after doing so.

copy-cat's People

Contributors

squiddev avatar thekidthatcodes avatar gibbo3771 avatar dependabot[bot] avatar lupus590 avatar

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.