Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/twisterghost/heights-peak
A compiler from standardized JSON to JavaScript, runnable with the Heights.js game engine. No longer maintained.
https://github.com/twisterghost/heights-peak
Last synced: about 2 months ago
JSON representation
A compiler from standardized JSON to JavaScript, runnable with the Heights.js game engine. No longer maintained.
- Host: GitHub
- URL: https://github.com/twisterghost/heights-peak
- Owner: twisterghost
- Created: 2013-02-26T16:56:21.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-11-26T20:29:20.000Z (about 10 years ago)
- Last Synced: 2024-04-13T07:47:05.440Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 238 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**This repo is no longer maintained, but was revived and edited in a redux branch. See what it would have looked like if it were made more recently [here](https://github.com/twisterghost/heights-peak/tree/redux).**
# Peak
A compiler for Heights## What?
Peak is a system to take standardized JSON source files and generate full JavaScript files for the Heights game engine. Peak can minify and optimize the code, as well as include the Heights engine for a complete file which you can simply drop into a webpage.
Peak source files are not intended to be written directly, though it is entirely possible. The idea for Peak is to provide automation for code generation from an easily manipulatable standard, allowing applications to help generate Heights games. See the source spec further down in this README.
**NOTE: Peak is still in early, rapid development and is not intended for commercial use quite yet!**
## Usage
`node peak SOURCEFILE`## Options
`-o, --out` Specify the output filename.`-m, --min` Minify the output code.
`-f, --full` Include the Heights engine in the output file.
## Sourcefile spec
**NOTE: Peak is still in early development, this spec is NOT complete.**
```javascript
{
"variables" : {
"VARIABLE_NAME" : "VARIABLE_VALUE"
},
"objects" : {
"OBJECT_NAME" : {
"constructor" : "CONSTRUCTOR_CODE",
"functions" : {
"FUNCTION_NAME" : [
"FUNCTION_ARGUMENTS",
"FUNCTION_CODE"
]
},
"collisions" : {
"OTHER_OBJECT" : "COLLISION_CODE"
},
"inputs" : {
// For keyboad events
"INPUT_EVENT_TYPE" : ["KEY", "CODE_TO_RUN"],
// For mouse events
"INPUT_EVENT_TYPE" : "CODE_TO_RUN",
}
}
}
}
```