{"id":13532562,"url":"https://github.com/jhasse/jngl","last_synced_at":"2025-05-16T11:04:56.637Z","repository":{"id":1363835,"uuid":"1313517","full_name":"jhasse/jngl","owner":"jhasse","description":"Easy to use cross-platform 2D game library for C++","archived":false,"fork":false,"pushed_at":"2025-05-14T17:57:28.000Z","size":39786,"stargazers_count":296,"open_issues_count":7,"forks_count":22,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-14T18:48:19.703Z","etag":null,"topics":["android","cross-platform","game-engine","game-engine-2d","gamedev","ios","linux","macos","nintendo-switch","openal","opengl","windows","xbox"],"latest_commit_sha":null,"homepage":"https://bixense.com/jngl/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhasse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2011-01-31T20:07:16.000Z","updated_at":"2025-05-14T17:57:32.000Z","dependencies_parsed_at":"2024-01-25T17:29:25.602Z","dependency_job_id":"2c0900bf-1407-4930-8bd2-d67afae47998","html_url":"https://github.com/jhasse/jngl","commit_stats":{"total_commits":2074,"total_committers":13,"mean_commits":"159.53846153846155","dds":"0.25554484088717455","last_synced_commit":"94f7b75447d77c56c044a74147343d285771c84e"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhasse%2Fjngl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhasse%2Fjngl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhasse%2Fjngl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhasse%2Fjngl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhasse","download_url":"https://codeload.github.com/jhasse/jngl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518384,"owners_count":22084374,"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":["android","cross-platform","game-engine","game-engine-2d","gamedev","ios","linux","macos","nintendo-switch","openal","opengl","windows","xbox"],"created_at":"2024-08-01T07:01:11.865Z","updated_at":"2025-05-16T11:04:51.629Z","avatar_url":"https://github.com/jhasse.png","language":"C++","funding_links":[],"categories":["Code","Game Engines","Engines","Uncategorized","Engines \u0026 Frameworks","Libraries"],"sub_categories":["Engines and Frameworks","Uncategorized","C++"],"readme":"# JNGL - Just a Neat Game Library\n\n[🌐 Website](https://bixense.com/jngl/)\n[🏃 Quickstart](https://github.com/jhasse/jngl/wiki/JNGL-Quickstart)\n[🎓 Tutorial](https://github.com/pinguin999/my-jngl-starter)\n[📚 Documentation](https://bixense.com/jngl/annotated.html)\n\n[![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/254P43HvWJ)\n\nAn easy to use C++ game library for Linux, Windows, macOS, Android, iOS, Xbox, the Nintendo Switch,\nLG webOS and the Web.\n\n[![Portal Dogs running on the Switch](https://user-images.githubusercontent.com/80071/105062511-f651d480-5a7a-11eb-8cd3-260c7929353a.gif)](https://portaldogs.com/)\n\n### Building from Source\n```bash\ncmake -Bbuild\ncmake --build build\n./build/jngl-test\n```\n\n## Linux\n### Ubuntu\n```bash\nsudo apt-get install libgl1-mesa-dev libfreetype6-dev libfontconfig1-dev libpng-dev \\\nlibxxf86vm-dev libvorbis-dev cmake g++ libwebp-dev git libsdl2-dev\n```\n### Fedora\n```bash\nsudo dnf install fontconfig-devel freetype-devel libvorbis-devel libwebp-devel \\\ncmake SDL2-devel gcc-c++ libatomic\n```\n### Arch Linux\n```bash\npacman -Syu --needed cmake gcc sdl2 pkg-config fontconfig libwebp libvorbis\n```\n\n## Windows\n### MSYS2 / MinGW-w64\nSet up [MSYS2](https://www.msys2.org/) and install the following in a MinGW-w64 Win64 Shell:\n```bash\npacman -Syu --needed mingw-w64-x86_64-gcc \\\nmingw-w64-x86_64-freetype mingw-w64-x86_64-libvorbis mingw-w64-x86_64-libwebp \\\nmingw-w64-x86_64-dlfcn mingw-w64-x86_64-cmake make mingw-w64-x86_64-gdb \\\nmingw-w64-x86_64-libtheora mingw-w64-x86_64-SDL2\n```\n### Visual Studio 2017 or newer\n```bash\ncmake -Bbuild -DFETCHCONTENT_QUIET=0\n```\nThen open `build/jngl.sln` in Visual Studio.\n\n## macOS\nUse [Homebrew](http://brew.sh/) to install the build dependencies:\n```bash\nbrew install sdl2 freetype libvorbis webp pkg-config cmake\n```\n\n## Android\n1. Install the Android SDK and set `ANDROID_HOME` to point to it.\n2. In the Android SDK Manager, install the NDK build tools.\n3. Run the following command to test via ADB:\n```bash\nmake -C android run\n```\nAlternatively, open `android/test` in Android Studio and build from there.\n\n## iOS\nGenerate an Xcode project using CMake:\n```bash\ncmake -Bbuild-ios -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/iOS.toolchain.cmake -DIOS_PLATFORM=SIMULATOR\n```\nThen open and build `build-ios/jngl.xcodeproj` in Xcode.\n\n## Xbox\n```bash\ncmake -Bbuild-uwp -DCMAKE_SYSTEM_NAME=WindowsStore \"-DCMAKE_SYSTEM_VERSION=10.0\"\n```\nThen open `build-uwp/jngl.sln` in Visual Studio.\n\n## Example Usage\nHere's a simple \"Hello, World!\" example in JNGL:\n```cpp\n#include \u003cjngl.hpp\u003e\n#include \u003cjngl/init.hpp\u003e\n\nclass MyGame : public jngl::Scene {\n    void step() override {\n        // game logic\n    }\n    void draw() const override {\n        text.draw(jngl::modelview().translate({ -100, 0 }));\n    }\n    jngl::Font font{ \"Arial.ttf\", 12 };\n    jngl::TextLine text{ font, \"Hello World!\" };\n};\n\njngl::AppParameters jnglInit() {\n    jngl::AppParameters params;\n    params.start = []() {\n        return std::make_shared\u003cMyGame\u003e();\n    };\n    return params;\n}\n```\n\nFor a more complete starting point (i.e. project structure, etc.) check out the\n[JNGL project template](https://github.com/jhasse/jngl-starter).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhasse%2Fjngl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhasse%2Fjngl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhasse%2Fjngl/lists"}