Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/YAL-Haxe/hxpico8
Experimental Lua target for Haxe
https://github.com/YAL-Haxe/hxpico8
Last synced: 8 days ago
JSON representation
Experimental Lua target for Haxe
- Host: GitHub
- URL: https://github.com/YAL-Haxe/hxpico8
- Owner: YAL-Haxe
- License: mit
- Created: 2015-07-28T08:26:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-15T09:27:06.000Z (about 8 years ago)
- Last Synced: 2024-08-02T14:08:01.732Z (3 months ago)
- Language: Haxe
- Size: 35.2 KB
- Stars: 41
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### What's this
This is an experimental Haxe compiler target for pico-8.It's primary purpose is generating laconic Lua code that can be compared to handwritten code while still retaining support for most Haxe' features.
It can also be viewed as an example of how [JS Generator API](http://api.haxe.org/haxe/macro/JSGenApi.html) can be used to quickly prototype new language targets.
### What's pico-8
[Pico-8](http://www.lexaloffle.com/pico-8.php) is a "fantasy console". It has a number of strict restrictions and is interesting to experiment with.It also has it's own flavour of [Lua](http://lua.org) scriptting language, which gets us here.
If you have bought the "Humble Mozilla Bundle" some time ago, you should already own it together with Voxatron.
### How to use this
1. Setup this repository as a haxelib (see `haxelib git`)
2. [Download](http://builds.haxe.org/) and install Haxe 3.2.
3. Setup your project to use the library. This is done by adding the following into your HXML file (or Project Properties - Compiler Options - Additional Compiler Options in FlashDevelop):
```
-lib hxpico8
--macro p8gen.PgMain.use()
-dce full
```
The project should be pointed generate either a .lua file, or to a .p8xm (which will update a .p8 of the same name with new code section).You'll most likely want to use the `Pico` class, which maps the built-in functions of the console. Since Pico-8 does not include the standard Lua function set, very little of standard Haxe API is supported.
For additional examples, see the [hxpico8 example repository](https://github.com/YellowAfterlife/hxpico8xm).
### About
hxpico8 is made by Vadim "[YellowAfterlife](http://yal.cc)" Dyachenko. [MIT license](LICENSE).You can find me on [Twitter](http://twitter.com/YellowAfterlife) / [Tumblr](http://yellowafterlife.tumblr.com/) / [VK](http://vk.com/yal_cc) if you want to.