{"id":15049044,"url":"https://github.com/itsyakub/soft","last_synced_at":"2025-04-10T01:40:47.683Z","repository":{"id":240270612,"uuid":"801668404","full_name":"itsYakub/Soft","owner":"itsYakub","description":"Simple 2D Real-Time Graphics Library","archived":false,"fork":false,"pushed_at":"2024-05-27T19:05:35.000Z","size":132,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T03:22:28.090Z","etag":null,"topics":["c","c-programming","c-programming-language","c-project","cpu","cpu-render","cpu-rendering","graphics","graphics-library","graphics-programming","handmade","library","open-source","sdl","sdl2","sdl2-library"],"latest_commit_sha":null,"homepage":"","language":"C","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/itsYakub.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-05-16T17:19:55.000Z","updated_at":"2025-01-18T02:29:34.000Z","dependencies_parsed_at":"2024-05-27T22:12:48.481Z","dependency_job_id":"8d413918-d2d9-4690-8e0b-312351b29237","html_url":"https://github.com/itsYakub/Soft","commit_stats":null,"previous_names":["itsyakub/soft"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsYakub%2FSoft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsYakub%2FSoft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsYakub%2FSoft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsYakub%2FSoft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsYakub","download_url":"https://codeload.github.com/itsYakub/Soft/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142017,"owners_count":21054574,"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":["c","c-programming","c-programming-language","c-project","cpu","cpu-render","cpu-rendering","graphics","graphics-library","graphics-programming","handmade","library","open-source","sdl","sdl2","sdl2-library"],"created_at":"2024-09-24T21:17:46.035Z","updated_at":"2025-04-10T01:40:47.663Z","avatar_url":"https://github.com/itsYakub.png","language":"C","readme":"\u003cdiv align=\"center\"\u003e\n\n# Soft\n\n**Simple 2D Real-Time Graphics Library**\n\n\u003c/div\u003e\n\n## Introduction\nThis project was created purely for learning purposes. It allows me to get the deeper knowledge of how to graphics programming work under the hood. The big source of information was [raylib](https://github.com/raysan5/raylib), a simple and easy-to-use library to enjoy videogames programming. All of the external sources I've used are mentioned as the coude blocks in the `soft.c` implementation file. My main inspirations were:\n- [\"olive.c\" by Tsoding.](https://www.youtube.com/playlist?list=PLpM-Dvs8t0Va-Gb0Dp4d9t8yvNFHaKH6N)\n- [\"Programming a first person shooter from scratch like it's 1995\" by Jdh.](https://www.youtube.com/watch?v=fSjc8vLMg8c)\n\n## Example\n\n```c\n#include \"soft.h\"\n\nint main(int argc, char** argv) {\n    softInit(1024, 768, softTextFormat(\"Soft %s\", SOFT_VERSION));\n\n    while(!softWindowShoulClose()) {\n        softClearBufferColor(WHITE);\n        softDrawCircle((Circle) { softGetWindowCenter(), 100 }, RED);\n\n        softBlit();\n    }\n\n    softClose();\n\n    return 0;\n}\n```\n\n## Setup\n\n### 0. Prerequesites:\n- **[Git](https://git-scm.com/);**\n- **[CMake](https://cmake.org/);**\n\n### 1. Dependencies:\n*(NOTE: All of the external dependencies should be fetched by CMake using FetchContent)*\n- **[SDL2](https://www.libsdl.org/);**\n\n### 2. Setup:\n- Clone this repository:\n    ```console\n    $ git clone https://github.com/itsYakub/Soft.git --branch=master --depth=1 \n    $ cd Soft/\n    ```\n\n- Create a binary directory:\n    ```console\n    $ mkdir bin\n    $ cd bin/\n    ```\n\n- Compile the project using **CMake**:\n    ```console\n    $ cmake ..\n    $ cmake --build .\n    ```\n\n- Run the executable:\n    ```console\n    $ ./example/demo.out\n    ```\n\n## Credits\n- **[Differential Line Algorithm's `Wikipedia` page](https://en.wikipedia.org/wiki/Digital_differential_analyzer_(graphics_algorithm));**\n- **[Filled circle drawing algorithm on `Stack Overflow`](https://stackoverflow.com/questions/1201200/fast-algorithm-for-drawing-filled-circles/14976268#14976268);**\n- **[Raylib's `TextFormat` solution](https://github.com/raysan5/raylib/blob/master/src/rtext.c#L1408);**\n- **[Bresenham's algorithms](https://zingl.github.io/bresenham.html);**\n- **[olive.c](https://github.com/tsoding/olive.c)**\n## Licence\nThis project is under the **[MIT Licence]()**.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsyakub%2Fsoft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsyakub%2Fsoft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsyakub%2Fsoft/lists"}