{"id":15060832,"url":"https://github.com/davidraab/demoengine-raylib-fs","last_synced_at":"2025-04-10T06:11:48.860Z","repository":{"id":250450989,"uuid":"834507176","full_name":"DavidRaab/DemoEngine-Raylib-Fs","owner":"DavidRaab","description":"A Demo Engine exploring ECS with Raylib and F#","archived":false,"fork":false,"pushed_at":"2024-09-15T17:37:43.000Z","size":5624,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T07:21:54.570Z","etag":null,"topics":["engine","fsharp","game","raylib"],"latest_commit_sha":null,"homepage":"","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavidRaab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2024-07-27T13:29:31.000Z","updated_at":"2025-02-06T17:54:37.000Z","dependencies_parsed_at":"2025-02-16T19:43:50.651Z","dependency_job_id":null,"html_url":"https://github.com/DavidRaab/DemoEngine-Raylib-Fs","commit_stats":null,"previous_names":["davidraab/raylibfs","davidraab/demoengine-raylib-fs"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidRaab%2FDemoEngine-Raylib-Fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidRaab%2FDemoEngine-Raylib-Fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidRaab%2FDemoEngine-Raylib-Fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidRaab%2FDemoEngine-Raylib-Fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidRaab","download_url":"https://codeload.github.com/DavidRaab/DemoEngine-Raylib-Fs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166925,"owners_count":21058481,"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":["engine","fsharp","game","raylib"],"created_at":"2024-09-24T23:05:09.781Z","updated_at":"2025-04-10T06:11:48.839Z","avatar_url":"https://github.com/DavidRaab.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"### About the Project: Raylib + F#\n\nThis is a port of my MonoGame + F# project to Raylib. I found Raylib\nand thought the API and just the procedural way it offers is in\ngeneral far better as the typical OO mess. A procedural API is also better\nconsumable from F# in my opinion.\n\nLike MonoGame, Raylib doesn't try to be a full game engine so it has only\nvery basics functionality, but still by default they offer some more features\nlike basic Camera and also the ability for basic draw commands. Also\n3D is out-of-the-box supported.\n\nSo overall at the moment I am really impressed by Raylib.\n\nInitially the performance compared to MonoGame was a little bit slower,\nbut not much. I already implemented some more optimizations and now performance\nis much better as the MonoGame project.\n\n# As a stress test\n\nI render boxes, at the moment replaced them with some small 16x16 pixel textures.\nEvery box move at random direction and random rotation. The random directions\nand rotations are periodeically randomized so all boxes constantly move\nunpredictable. All boxes have a Sprite Sheet and they switch between 3 Sprites\non periodically interval.\n\nEverything runs single-threaded at the moment. I have implemented some\nsimple object culling so only visible objects are drawn but still updated\nwhen they are not seen. It scales upto 90,000 boxes (maybe more,\ndidn't tested beyond that point), and still runs fine when all 90,000 boxes\nare shown.\n\nI have a parent system, so i make all boxes a parent to another object\nand then let this object rotate and all boxes rotate around that\nparent object.\n\n# Benchmarks\n\nI am using a Ryzen 5600 + 16 GiB RAM (3200 Mhz) + GTX 1660 Ti.\n\n|                            | All Visible | Culling (~3000)\n| :------------------------- | --------:   | -------:\n|  3000 boxes without parent | 2050 fps    | 2600 fps\n|  6000 boxes without parent | 1100 fps    | 1750 fps\n| 10000 boxes without parent |  660 fps    | 1550 fps\n| 40000 boxes without parent |  150 fps    |  750 fps\n| 90000 boxes without parent |   50 fps    |  320 fps\n|                            |             |\n|  3000 boxes with parent    | 1950 fps    | 2600 fps\n|  6000 boxes with parent    | 1050 fps    | 2300 fps\n| 10000 boxes with parent    |  645 fps    | 2000 fps\n| 40000 boxes with parent    |  140 fps    |  600 fps\n| 90000 boxes with parent    |   50 fps    |  250 fps\n\nBecause of Culling it's hard to \"measure\" anything as framerate greatly\ndepends on how much is seen on the screen. For example 10,000 boxes\nall shown on the screen without parent has ~650 fps, but when\ncamera is moved away and nothing is shown then fps goes up to \u003e4,000 fps.\n\nSo the \"Culling\" columns is a rough estimate with default Zoom level\nand the screen is full of boxes. Usually this means around 3,000\nboxes are still rendered.\n\n# Features implemented\n\n* **Entity**: Everything is an entity and you can add/remove components at runtime.\n* **Sprite Sheet \u0026 Sprite Sheet Animations**: says it all.\n* **Transforms**: Every Entity can have a parent and is positioned, scaled and rotated to its parent\n* **Input Handling**: Define a data-structure and get back Actions.\n* **Timer System**: Running code periodically or after a specific time-frame that depends on the GameTime\n* **RenderTexture**: You specify an internal resolution and the game scales with the display resolution.\n* **Fixed Update**: A fixed update loop that runs as often as needed per seconds independent from the frame-rate.\n\n# Features to come\n\n## Important\n\nWhen those are implemented, it is possible to create some games.\n\n* UI\n* Scenes / LevelEditor (Loading)\n* Multiple GameTime's\n* State Machine or Behaviour Trees\n* Sound / Music\n\n## Secondly\n\nNeat feature to have, but some games work without those.\n\n* Animation System\n* Basic Collision System maybe Physics\n* Particle System (if that is even needed, you just can use default sprite to show. But in a Particle System it could even further optimize some stuff)\n\n## Least important\n\n* Separation into its own library.\n\n# Stability\n\nCurrently nothing is stable. The whole API and data-structures will likely change\nover time as I see fit to it. The engine will only target F# and no other .NET language.\n\n### License\n\n[![CC0 1.0 Universal](https://licensebuttons.net/p/zero/1.0/88x31.png)](http://creativecommons.org/publicdomain/zero/1.0/)\n\nLicense: ([CC0 1.0 Universal](http://creativecommons.org/publicdomain/zero/1.0/)) You're free to use the code in any project, personal or commercial. There's no need to ask permission before using these. Giving attribution is not required, but is greatly appreciated!\n\n### Asset Licenses\n\nSome Assets are not my own see Resources.md for those Licenses!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidraab%2Fdemoengine-raylib-fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidraab%2Fdemoengine-raylib-fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidraab%2Fdemoengine-raylib-fs/lists"}