{"id":34227860,"url":"https://github.com/cosmo-ray/yirl","last_synced_at":"2026-06-28T03:00:46.533Z","repository":{"id":30614222,"uuid":"34169544","full_name":"cosmo-ray/yirl","owner":"cosmo-ray","description":"YIRL is a Work in progress game engine aiming to be fully configurable, scriptable and mod friendly.","archived":false,"fork":false,"pushed_at":"2026-06-14T09:52:19.000Z","size":14053,"stargazers_count":21,"open_issues_count":12,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-06-14T11:24:01.020Z","etag":null,"topics":["c","engine","game","hacktoberfest","lua","snake","tcc","widget"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cosmo-ray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-04-18T14:47:57.000Z","updated_at":"2026-06-14T09:48:26.000Z","dependencies_parsed_at":"2024-02-04T03:20:46.250Z","dependency_job_id":"9d35074e-d1b5-4ccb-83ce-a91236846d9f","html_url":"https://github.com/cosmo-ray/yirl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cosmo-ray/yirl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmo-ray%2Fyirl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmo-ray%2Fyirl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmo-ray%2Fyirl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmo-ray%2Fyirl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cosmo-ray","download_url":"https://codeload.github.com/cosmo-ray/yirl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmo-ray%2Fyirl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34875360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c","engine","game","hacktoberfest","lua","snake","tcc","widget"],"created_at":"2025-12-16T01:00:25.834Z","updated_at":"2026-06-28T03:00:46.484Z","avatar_url":"https://github.com/cosmo-ray.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"doc/img/logo_mini.png\" width=\"150\" /\u003e\n  \u003ch1\u003eYIRL isn't a Rogue-like\u003c/h1\u003e\n  \u003ch3\u003eA Work in progress game engine \u003c/h3\u003e\n  \u003ch4\u003eAiming to be fully configurable, scriptable and mod friendly!\u003c/h4\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://matrix.to/#/#yirlspace:matrix.org\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/matrix-000000?style=for-the-badge\u0026logo=Matrix\u0026logoColor=white\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"ircs://irc.libera.chat/yirl\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/IRC-FF55DD?style=for-the-badge\u0026logo=wechat\u0026logoColor=white\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://discord.gg/8QrKTtV\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge\u0026logo=discord\u0026logoColor=white\"/\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n*irc server: libera chanel: #yirl*\n\n- YIRL is a WIP,\n- YIRL is a game engine aiming to be fully configurable, fully scriptable and mod friendly.\n- YIRL has been started as an school project at EPITECH\n\n| ![Preview from sukeban](doc/img/preview_sukeban.png) |\n|:--:|\n| *A screenshot from the Sukeban project made with YIRL* |\n\n_The first version, the one release at the end of my scholarship can be found on bitbucket: https://bitbucket.org/cosmo_ray/yirl/src_\n\n---\n\n## Concept:\nThe idea behind YIRL is to give to the user some basic tools and widgets that everyone can reuse or wrap into more complex widgets.\nWe can see YIRL as a CMS for video game:\nEveryone should be able to add module to YIRL, and everyone should be able to wrap modules into more powerful modules.\n\nAs an example the [snake module](https://github.com/cosmo-ray/yirl/tree/master/modules/snake) is a map with more function and a init, it's basically an inheritance of a map, this allow everyone to add a snake easily in his game.\nSnake module is written in lua, but as YIRL have a generic script system, we could have written snake in any scripting language.\nHere is an example how Snake module can be use: https://github.com/cosmo-ray/yirl/tree/master/example/modules/snake.\nAnother example would be how I integrate most games widgets into my RPG Sukeban:\nI first load the games modules in sukeban start.json:\nhttps://github.com/cosmo-ray/Sukeban/blob/master/start.json\nlike snake modules:\n```json\n    \"pre-load\" : [\n \t     { \"path\" : \"YIRL_MODULES_PATH/snake/\", \"type\" : \"module\" },\n       ...\n```\nAn then create a widget that is of the type of the desired game that is then push in a container widget:\nlike in [action.lua](https://github.com/cosmo-ray/Sukeban/blob/master/actions.lua) playSnake function:\n```lua\n   local snake = Entity.new_array() -- create the array\n\n   snake[\"\u003ctype\u003e\"] = \"snake\" -- set the widget type\n   snake.dreadful_die = 1 -- internal stuff\n   snake.hitWall = \"snake:snakeWarp\" -- which function to call when hit a wall (to make it more like snake2)\n   snake.die = Entity.new_func(\"backToGame\") -- what's happend when you die\n   snake.quit = Entity.new_func(\"backToGame\") -- when your quit... (backToGame is sukeban function to return to game)\n   snake.resources = \"snake:resources\" -- resource to describe snake sprites/characters\n   snake.background = \"rgba: 255 255 255 255\" -- widget background\n   ywPushNewWidget(main, snake) -- push snake widget into main\n```\n\nsupportted scripting languages are lua, C(with tinycc), scheme(s7), javascript(quickjs), php 5.3 (ph7), perl, kuroko (python-like language), and yb(YIRL own asm) feel free to add your language :).\n\n## how to start using YIRL\nFor now the easier way to use YIRL is to come chat with us and ask for help\nBut you can still understand how YIRL work by:\n* using games using YIRL (https://uso.itch.io)\n* modify some functionality form a game\n* copy one to create your own game/module\n\n## Modules\nModules are a very important part of YIRL, a modules can be a set of functions,\nA widget that implement some game mechanism(like snake), or a full game (like game/vapz)\n\nEach modules have a start file that will serve as entry file, and will tell YIRL how to load every other files.\nIt can be either a json file (start.json), or a C/lua/scheme/javascript file. how to load every other files\n\nNote that for now some scripting languages doesn't support all platform.\nHere's a Table of what support what:\n\n| Language  | Linux | Windows | wasm |\n| ------------- | ------------- | -- | -- |\n| C  | :heavy_check_mark:  | :heavy_check_mark: | :x: |\n| js  | :heavy_check_mark:  | :heavy_check_mark: | :heavy_check_mark: |\n| kuroko  | :heavy_check_mark:  | :heavy_check_mark: | :heavy_check_mark: |\n| php | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| lua | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| perl | :heavy_check_mark: | :construction_worker: | :construction_worker: |\n| scheme | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| yb | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n\n*perl for windows and wasm use [gravier](./gravier), YIRL own perl implementation, use it at your own risk*\n\n## Start a game from the source\n\n`-d` is the path to the game module \n\n`-P` is the path to engine root, that contain yirl base modules, and scripts helpers.\n```sh\n./yirl-loader.sh -P $PWD -d path/to/game/module\n```\n\nnote: -d ans -P are now optional as YIRL does now add -d implicitly for first argument, and try to automatically detect its root directory.\n\n## building\nFirst install the [dependencies](https://github.com/cosmo-ray/yirl?tab=readme-ov-file#dependencies)\n\nMost scripting language support are optional and can be disable using for instance: `--disable-perl`.\nmore info using `./configure --help`\n\nLinux - Mac Os:\n```\ngit submodule update --init\n./configure\nmake\n```\n\nDue to the way Ubuntu package lua, you need to do `./configure -t ubuntu` instead of `./configure`\n\nWindows:\nyou need to use msys2: http://www.msys2.org/\n```\ngit submodule update --init\n./configure -t mingw-i686\nmake\n```\n\n## Package Game\nfor windows you can use `package-game-mingw.sh` with mingw\n\nfor linux (like Arch Linux that I use BTW): `package-game.sh`\n\nBoth script are rarly used because I'm lazy and might require manual inervention to remove some lib\nAlso you should use an old distro (like centos 7) to package you game, otherwise old(or stable) distro might have incompatibility wih glibc\n\n## Contribution\nObviously contributions are very welcome, to contribute you can simply make a Pull Request on GitHub, if something is wrong, I'll tell you :)\nAs I didn't have time to write a coding style, in case of contribution, you should just try to imitate code already in place.\n\nI'd like to use Linux coding style, but this would require to change every functions and structures names.\nA good contribution would be to make YIRL compatible with Linux coding style.\n\n## Dependencies\nDevelopment package of these libs:\n\n* glib2 (only for tests)\n* lua 53+\n* sdl2, sdl2_image, sdl2_ttf\n* json-c\n* sdl2_mixer with a version \u003e= 2.0.5 (you can use ./configure --clone-sdl-mixer)\n\n## Tree (outdated):\n\n\u003cdetails\u003e\u003csummary\u003eSee file tree\u003c/summary\u003e\n\n* include: headers\n  * sys: system header, that can be useful for TCC\n    * queue.h: [man 3 queue](https://linux.die.net/man/3/queue)\n  * tinycc: tcc libc header\n  * YIRL: YIRL header, use internally and for TCC scripting, but so far, the best documentation, most functions have bindings\n    * widget.h: widget base class and common widgets functions\n    * events.h; check if a key have been press, windget contain functions to handle events too, but these one are better\n    * map.h: a square map\n    * menu.h; either a clasique menu or a panel\n    * canvas.h: canvas API(for 2D rendering)\n    * text-screen.h: a simple text widget.\n    * container.h: widget that contain others widgets\n    * pos.h: helpers to manipulate everything with a position\n    * rect.h: helpers for rectangles\n    * sdl-driver.h; internal, look away\n    * keydef.h: keyboard touches define base on curses key numbers\n    * game.h: starting point, initializ everything, and handle modules\n    * entity.h: the YIRL entity system, use everywhere in the engine\n    * debug.h: some debug functions\n    * description.h: generic api for descriptions files(files that describe entities tree)\n    * json-desc.h\n    * script.h: generic api for scripting manipulation\n    * lua-script.h\n    * tcc-script.h\n    * native-script.h: allow to create FunctionEntity from YIRL internal API\n    * lua-binding.h: binding between yirl api and lua\n    * block-array.h: yirl internal array use by ArrayEntity\n    * sound.h: yirl abstract sound system\n    * sound-libvlc.h: libvlc sound implementation\n    * util.h\n    * timer.h\n* core: engine sources\n* test: unit tests\n* modules: set of basic YIRL modules, still used a lot, it contain some games too, tiled map parser, and a character generator that use Liberated Pixel Cup sprites\n* games: old crap, on which I don't work anymore\n* example: all examples are outdated\n* doc: documents like sceenshot images\n\n## Projects using YIRL\n* https://uso.itch.io/pre-hangover-simulator\n* https://harald8.itch.io/pre-hangover-quest\n* https://uso.itch.io/warrior-of-asc-ii\n* https://uso.itch.io/jims\n* https://uso.itch.io/sukeban\n* https://uso.itch.io/pewpew-pepper\n* https://github.com/cosmo-ray/polis-at-war\n\n\n\u003c/details\u003e\n\n## License:\nYIRL is licensed under the LGPL license, the idea behind that, is that you can add a modules under the license you want, but if you make a modification to the engine, you need to share it.\n\n**Note: libperl is under Artistic or GPL 3.0, so if you use yirl with libperl, and libperl as gpl3, I guess YIRL became GPLed. (but not with Artistic License). licensing is weird, Anyway, You can use `--disable-perl` when `./configure`**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmo-ray%2Fyirl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosmo-ray%2Fyirl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmo-ray%2Fyirl/lists"}