{"id":13525440,"url":"https://github.com/PikuseruConsole/pikuseru","last_synced_at":"2025-04-01T05:31:29.967Z","repository":{"id":66816322,"uuid":"604048106","full_name":"PikuseruConsole/pikuseru","owner":"PikuseruConsole","description":"Open Source Fantasy Console in pure Rust [Core]","archived":false,"fork":false,"pushed_at":"2023-12-07T08:03:04.000Z","size":273,"stargazers_count":88,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-06T22:04:29.552Z","etag":null,"topics":["python","rhai","rust","wasm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PikuseruConsole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-20T08:18:43.000Z","updated_at":"2025-03-06T07:29:14.000Z","dependencies_parsed_at":"2023-12-07T09:23:58.570Z","dependency_job_id":"90e59356-cc1b-442f-b52f-acbe7406d4fd","html_url":"https://github.com/PikuseruConsole/pikuseru","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"5dd5e2bb6affec2562ad4d3ca8731123c6b53595"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PikuseruConsole%2Fpikuseru","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PikuseruConsole%2Fpikuseru/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PikuseruConsole%2Fpikuseru/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PikuseruConsole%2Fpikuseru/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PikuseruConsole","download_url":"https://codeload.github.com/PikuseruConsole/pikuseru/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246591195,"owners_count":20801981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","rhai","rust","wasm"],"created_at":"2024-08-01T06:01:18.740Z","updated_at":"2025-04-01T05:31:26.119Z","avatar_url":"https://github.com/PikuseruConsole.png","language":"Rust","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"\u003c!-- PROJECT BADGES --\u003e\n\u003c!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n--\u003e\n[![Github Link][github badge]][github link]\n[![CI Status][ci badge]][ci link]\n[![Version][crates.io version]][crates.io link]\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"pikuseru.png\"\u003e\n\u003c/p\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n# Pikuseru Console \n\n[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/PikuseruConsole/pikuseru/blob/master/LICENSE.md)\n\n\nPikuseru Console (previously known as [PX8](https://github.com/l0kod/PX8) or [Unicorn Console](https://github.com/Gigoteur/UnicornConsole)) is a fantasy engine that let you do quickly any sort of game, application with a default resolution of 128x128 pixels, 32bits color. The console allow you to load what is called a 'cartridge' that looks like a text file, that contains the code, the graphics and the sounds.\n\nThe main engine is not dependant of a specific graphic library so you can use it where you want:\n  * [pikuseru](https://github.com/PikuseruConsole/pikuseru): Main core engine\n  * [pikuseru-console](https://github.com/PikuseruConsole/pikuseru-console): Launcher for all cartridge, based on EGUI + Pixels\n  * [pikuseru-editor](https://github.com/PikuseruConsole/pikuseru-editor): Editor of the cartridge (graphics, sound, code), based on EGUI\n  * [pikuseru-rs](https://github.com/PikuseruConsole/pikuseru-rs): Wasm binding crate\n  * [pikuseru-examples](https://github.com/PikuseruConsole/pikuseru-examples): a non exhausitve list of Pikuseru cartrdige for testing\n  \n## Features\n\n  * Display: 128x128 pixels by default, 8 bits colors with available list of predefined palettes (16 colors) (pico-8, commodore, atari2600 etc)\n  * 32 bits color could be added directly via the API, with alpha channel (for transparency)\n  * Font: predefined list of fonts (pico8, bbc, trollmini, etc)\n  * Sprites: Single bank of 128 8x8 sprites that is directly in the cartridge\n  * Dynamic sprites: create sprites dynamically with the API\n  * Map: 128x32 8-bit cells\n  * Code: No limit size in the cartridge, and support of the following languages: Lua (optional), Python (optional), Rhai (default), WASM (default)\n  * Sound: 8 channels, tracker, FM synthetizer, 16-bit Wavetables (from GamerCade console) \n  * Screenshot / Gif Recording (image feature)\n\n## Examples\n\nSee the [console](https://github.com/PikuseruConsole/pikuseru-console) for more examples.\n\n## Limitations\n\nThe console is somewhat compatible with [pico-8](https://www.lexaloffle.com/pico-8.php) (buy it !), most of current functions from pico8 is implemented and the cartridge is the same format. However some pico8/lua language syntax is supported like:\n  * compound assignment operators (+=, -=, etc)\n  * \"!=\" like \"~=\"\n  * binary literals\n\nBut see the pikuseru-examples, I did some modifications of good games to use it with Pikuseru too.\n\n\n## Build\n\nCargo features:\n  * cpython: enable python support\n  * rlua: enable lua support\n\nYou can build the console directly to play games:\n```\ngit clone github.com/PikuseruConsole/pikuseru\ncd pikuseru\ncargo build --release --features=cpython,rlua,image\n```\n\n## File format\n\n| File format  | Read | Write |\n| ------------- | ------------- | ------------- |\n| Pico8 .PNG  | X  | / |\n| Pico8 .P8  | X  | X |\n| Pikuseru (.PIK) | X  | X |\n\nPikuseru file format is exactly the same as PICO8 P8 format, except that new sections are available, like __python__, __rhai__, __wasm__, __code__ etc.\n\n## Create\n\n## API\n\nThe API is available for Lua/Python.\n  * [Graphics](#graphics)\n    + [camera](#camera)\n    + [circ](#circ)\n    + [circfill](#circfill)\n    + [clip](#clip)\n    + [cls](#cls)\n    + [color](#color)\n    + [ellipse](#ellipse)\n    + [ellipsefill](#ellipsefill)\n    + [fget](#fget)\n    + [font](#font)\n    + [line](#line)\n    + [mode](#mode)\n    + [pal](#pal)\n    + [palt](#palt)\n    + [pget](#pget)\n    + [print](#print)\n    + [pset](#pset)\n    + [rect](#rect)\n    + [rectfill](#rectfill)\n    + [sget](#sget)\n    + [spr](#spr)\n    + [sset](#sset)\n    + [sspr](#sspr)\n    + [trigon](#trigon)\n  * [MAP](#map)\n    + [map](#map)\n    + [mget](#mget)\n    + [mset](#mset)\n  * [Math](#math)\n  * [Memory](#memory)\n  * [Mouse Input](#mouse_input)\n  * [Palettes](#palettes)\n  * [Cart Data](#cart_data)\n\n### Graphics\n\n#### camera\n\n`camera([x, y])`\n\nSet the camera position.\n\n* _x_/_y_ are the coordinates to set the camera, and they could be optional (in this case, 0/0 will be used)\n\n#### circ\n\n`circ(x, y, r, [col])`\n\nDraw a circle:\n*  _x_/_y_ are the coordinates\n* _r_ is the radius of the circle\n* _col_ is the color of the circle\n\n#### circfill\n\n`circfill(x, y, r, [col])`\n\nDraw a filled circle:\n*  _x_/_y_ are the coordinates\n* _r_ is the radius of the circle\n* _col_ is the color of the circle\n\n#### clip\n\n`clip([x, y, w, h])`\n\nSet a screen clipping region where:\n* x/y are the coordinate\n* w is the width\n* h is the height\n\n#### cls\n\nClear the screen.\n\n#### color\n\n`color(col)`\n\nset default color\n\n#### ellipse\n\n`ellipse(x, y, rx, ry, [col])`\n\nDraw an ellipse\n\n#### ellipsefill\n\n`ellipsefill(x, y, rx, ry, [col])`\n\ndraw filled ellipse\n\n#### fget\n\n`fget(n, [f])`\n\nget values of sprite flags\n\n#### font\n\n`font(name)`\n\nChange the font policy (\"pico8\", \"bbc\", \"cbmII\", \"appleII\")\n\n#### fset\n\n`fset(n, [f], v)`\n\nset values of sprite flags\n\n#### line\n\n`line(x0, y0, x1, y1, [col])`\n\ndraw line\n\n#### pal\n\n`pal(c0, c1)`\n\nSwitch the color c0 to color c1.\n\n#### palt\n\n`palt(col, t)`\n\nSet the transparency for color 'col', where 't' is a boolean\n\n#### pget\n\n`pget(x, y)`\n\nGet the pixel color in x/y coordinate\n\n#### print\n\n`print (str, [x, y, [col]])`\n\nDisplay a string on the screen\n\n#### pset\n\n`pset(x, y, col)`\n\nSet the pixel color with the value 'col' in x/y coordinate\n\n#### rect\n\n`rect(x0, y0, x1, y1, [col])`\n\ndraw a rectangle\n\n#### rectfill\n\n`rectfill(x0, y0, x1, y1, [col])`\n\ndraw filled rectangle\n\n\n#### sget\n\n`sget(x, y)`\n\nget spritesheet pixel colour\n\n#### spr\n\n`spr(n, x, y, [w, h], [flip_x], [flip_y])`\n\nDraw a sprite:\n* _n_ is the sprite number\n* _x_/_y_ are the coordinate\n* _w_ and _h_ specify how many sprites wide to blit and are 1/1 values by default\n* _flip_x_ to flip horizontally the sprite\n* _flip_y_ to flip vertically the sprite\n\nColor 0 will be transparent by default (see \"palt\" API).\n\n\n#### sset\n\n`sset(x, y, [col])`\n\nset spritesheet pixel colour\n\n#### sspr\n\n`sspr(sx, sy, sw, sh, dx, dy, [dw, dh], [flip_x], [flip_y])`\n\ndraw texture from spritesheet\n\n#### trigon\n\n`trigon(x1, y1, x2, y2, x3, y3, [col])`\n\ndraw trigon\n\n### Keyboard Input\n\n#### btn([i, [p]])\n\nget button i state for player p\n\n#### btnp([i, [p]])\n\nonly true when the button was not pressed the last frame; repeats every 4 frames after button held for 15 frames\n\n### Map\n\n#### map\n\n`map(cel_x, cel_y, sx, sy, cel_w, cel_h, [layer])`\n\n[Python: **spr_map**]\n\nDraw map; layers from flags; sprite 0 is empty\n\n#### mget\n\n`mget(x, y)`\n\nGet a map value\n\n#### mset\n\n`mset(x, y, v)`\n\nSet a map value\n\n### Math\n### Memory [**WIP**]\n### Mouse input [**WIP**]\n### Palettes [**WIP**]\n### Cart Data [**WIP**]\n\n\n[github badge]: https://img.shields.io/badge/github-pikuseruconsole/pikuseru-8da0cb?style=for-the-badge\u0026logo=github\n[github link]: https://github.com/PikuseruConsole/pikuseru\n[crates.io link]: https://crates.io/crates/pikuseru\n[crates.io version]: https://img.shields.io/crates/v/pikuseru.svg?style=for-the-badge\u0026logo=rust\n[ci link]: https://github.com/PikuseruConsole/pikuseru/actions\n[ci badge]: https://img.shields.io/github/actions/workflow/status/PikuseruConsole/pikuseru/rust.yml?branch=main\u0026style=for-the-badge\u0026logo=github-actions\u0026logoColor=white\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPikuseruConsole%2Fpikuseru","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPikuseruConsole%2Fpikuseru","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPikuseruConsole%2Fpikuseru/lists"}