Giter VIP home page Giter VIP logo

catbulb.js's Introduction

catbulb.js icon

English / 한국어

Table of Contents

DISCLAIMER: This README is currently NOT BEING UPDATED.

DISCLAIMER: catbulb is currently in its earliest stage of development. As such, some features mentioned in this README may not have been implemented yet. Such features (unless explicitly marked otherwise, such as with checkboxes in the Features section) are marked with a strikethrough.

catbulb.js is a JavaScript framework for jrpg-esque adventure games on the web. (demo) Powered by PixiJS, it has full support for both WebGL and the HTML5 Canvas API. It can also be ported effortlessly to desktop using something like Electron.

catbulb allows you to develop games codelessly[1], loading all data from a single JSON file and supporting Tiled map files (.json). On the other hand, it is also easily and extensively customizable, making use of ES6 Classes.

Currently, catbulb is its earliest stage of development and lacks many basic features. Therefore, I highly discourage you use catbulb for production at this point in time. (Which is why, at the moment, there is no LICENSE file in this repository) However, if for some reason you need to use catbulb in your own project, please open an issue.

Installation

Quick Setup

Assuming you have Python installed on your system, you can use the following commands to grab a copy of catbulb and set up a development web server.

git clone https://github.com/M00nR4bb1t/catbulb.js.git
cd catbulb.js
python -m http.server 5000

Or, if you are using Python 2.* or below,

git clone https://github.com/M00nR4bb1t/catbulb.js.git
cd catbulb.js
python -m SimpleHTTPServer 5000

Afterwards, just navigate to localhost:5000.

Detailed Setup

First, get youself a copy of catbulb by running git clone.

git clone https://github.com/M00nR4bb1t/catbulb.js.git 

You will see a working demo of catbulb under catbulb.js/.

This is what the directory structure looks like (ignoring Git-related files, README files, etc.):

catbulb.js/
├── sources/
│   ├── entity.js
│   ├── events.js
│   ├── main.js
│   ├── player.js
│   ├── tilemap.js
│   ├── triggers.js
│   ├── utilities.js
│   │
│   └── data.js
├── assets/
│   ├── .../
│   └── └── ...
├── build.py
├── index.html
├── index.php
├── pixi.min.js
├── SAT.min.js
└── style.css

In case you don't plan to edit any of the catbulb source files, catbulb provides a build.py Python script to bundle all of these JS files. Run the following command to combine and minify catbulb and its dependencies into one catbulb.min.js file. Note that the script uses the JavaScript Minifier Web API to minify JavaScript, and thus requires an internet connection to work.

python ./build.py -- includeDependencies catbulb.min.js

Or, alternatively,

chmod +x build.py
./build.py --includeDependencies catbulb.min.js

Then, you can just include the file like this, preferably at the end of <body>:

<!-- You still need the data file, obviously. -->
<script src="data.js"></script>
<script src="catbulb.min.js"></script>

If you are looking to edit the catbulb source files, make sure to include all the JS files under source/ as well as the SAT.min.js and pixi.min.js like so, preferably at the end of <body> (order matters!):

<!-- Dependencies -->
<script src="pixi.min.js"></script>
<script src="SAT.min.js"></script>

<!-- catbulb Source Files -->
<script src="sources/data.js"></script>

<script src="sources/utilities.js"></script>
<script src="sources/entity.js"></script>
<script src="sources/events.js"></script>
<script src="sources/triggers.js"></script>
<script src="sources/player.js"></script>
<script src="sources/tilemap.js"></script>
<script src="sources/main.js"></script>

Things to Note

  • If you want to (for some reason or the other) bundle only catbulb source files without dependencies (PixiJS, SAT.js), you can do so by running build.py without the --includeDependencies flag.

Features

  • Player
    • Walking
    • Running
  • Tilemap
    • Tile Rendering
    • Tile Animation
  • Events & Triggers
    • EventPlayer & Trigger
    • Message Event
    • MapChange Event
  • Loader
    • data.js
      • List of Assets
      • Maps
      • Tilesets
      • Events & Triggers
      • Bitmap Fonts
      • Player Party
      • SE & BGM
      • ...
    • Tiled JSON Loader
  • BitmapText
    • Glyphs
      • ASCII
      • Hangul Johab
      • Hangul Wansung
      • Hiragana & Katakana
      • Japanese Kanji
      • Latin Extended
      • Chinese Hanzi (Traditional)
      • Chinese Hanzi (Simplified)
      • ...
    • Formatting
      • Shake
      • Tint
      • Size
      • Line Wrapping
  • Inventory System
    • ...
  • Battle System
    • ...

[1] data.js is really just JSON, so not counting that as code.

catbulb.js's People

Contributors

lunabunn avatar

catbulb.js's Issues

Native Port?

Although catbulb.js was made with the web in mind, its main target platforms are PC, consoles, and mobile. However, catbulb is powered by PixIJS, which means porting it to the aforementioned platforms requires additional measures such as Electron. Furthermore, the fact that pixi-typescript is not being maintained means that we can only use PixiJS 5 with plain old JS, which tends to get quite clunky as projects grow bigger. Also, as of now, the fact that catbulb is targetting both browsers and NodeJS might get in the way when creating something like a save-load system.

With all these points in mind, would it be viable to port catbulb to another engine/library? It would be stupid to completely re-program the whole thing, so if a port was to be made the target language should be pretty similar to JS in syntax and structure (to make copy-pasting as easy as possible). IF catbulb was to be ported, here is a list of engines/libraries/etc. that could possibly be used:

Haxe

C#

C++

Java

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.