{"id":20604004,"url":"https://github.com/szykol/skeleton","last_synced_at":"2025-04-15T02:07:50.118Z","repository":{"id":116468864,"uuid":"143757031","full_name":"szykol/skeleton","owner":"szykol","description":"Simple app framework written in C++/SFML. ","archived":false,"fork":false,"pushed_at":"2021-06-11T20:35:21.000Z","size":33181,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-15T02:07:41.877Z","etag":null,"topics":["cmake","cpp","framework","gamedev","gui","sfml"],"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/szykol.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-06T16:49:19.000Z","updated_at":"2023-05-27T01:55:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"215a9a94-b96a-4d49-b4f7-8c569b24e49e","html_url":"https://github.com/szykol/skeleton","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szykol%2Fskeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szykol%2Fskeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szykol%2Fskeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szykol%2Fskeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szykol","download_url":"https://codeload.github.com/szykol/skeleton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991543,"owners_count":21194894,"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":["cmake","cpp","framework","gamedev","gui","sfml"],"created_at":"2024-11-16T09:19:56.974Z","updated_at":"2025-04-15T02:07:50.113Z","avatar_url":"https://github.com/szykol.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# skeleton\n## Simple 2D application framework written in C++/SFML. \n\n**Skeleton** is a simple framework for creating apps and games using C++ and SFML. It has some tools that make creating new projects easier and faster. It comes with built-in classes such as Buttons, Popups, ResourceManager etc. so you can focus on other aspects of creating your app and stop worrying about creating GUI components or playing sounds - **Skeleton has it all!**\n\n### Brief overview of Skeleton's modules and most important classes\n- **GUI** - Contains all GUI based components\n  - **Text** - Basic sf::Text wrapper with some more functionallity\n  - **Box** - Basic sf::RectangleShape wrapper with some more functionallity\n  - **TextBox** - Combination of Text and Box classes\n  - **Button** - A clickable TextBox with callback\n  - **InputBox** - A box which handles user's input\n  - **Popup** - Can be used as an notifiaction\n  - **Prompt** - Contains InputBox and Buttons and can act as a prompt window\n- **States** - Contains State interface which is used with StateManager\n  - **FrameworkSplashscreen** - an example of state that implements State interface\n- **Managers** - All classes that help with managing the framework resources, states etc.\n  - **CacheSystem** - Manages loading and caching resources such as sf::Texture, sf::SoundBuffer etc.\n  - **AudioProvider** - Uses CacheSystem to play music and sounds (defalut implementation is SFMLSoundProvider)\n  - **StateManager** - Manages State classes. Lets push new States and updates the current state\n  - **ButtonManager** - Manages laying out the buttons, put's them in groups which results in nicely handled keyboard navigation\n  - **bunch** of other Manager classes\n- **Util**\n  - **Animation** - (*work in progress*) Handles animating of GUI components\n  - **Random** - Random integer/float distribution with range\n  - **FPSCounter** - Useful utility to check the performance\n  - **Math** - Some basic functions that I found helpful in creating SFML apps\n- **Application** - Handles running the app, updating all managers, changing backgrounds etc.\n\n## Example App\nSkeleton provides an example `Sandbox` app that creates a simple menu state.\nIt shows how the buttons and state managing works. It also uses a background\nusing `CacheSystem`.\nHere are example screenshots of the Sandbox app using Skeleton framework\n\n### Main menu\n![Example App](res/Screenshots/example_app.png \"Example App\")\n### Handling user input\n![Example Prompt](res/Screenshots/example_prompt.png \"Example Prompt\")\n\n# How to build\n\n## CMake\nDownload [SFML](https://www.sfml-dev.org/download/sfml/2.5.1/) compatible with your compiler and extract it to folder\nin the project or use your package manager to download the library.\n\n## Linux\nRoot project Makefile takes care of building the project. It accepts two flags that are passed to CMake.\n* `CMAKE_BUILD_TYPE` - the build type. If not specified `Debug` is used.\n* `SFML_DIR` - CMake configuration path. This should be used when SFML was installed manually to tell `find_package` where\nto search SFML for.\n### Example: Linux with defualt parameters\n```\nmake\nbuild/Sandbox\n```\n\n### Example: Linux with non default parameters\nThis shows `CMAKE_BUILD_TYPE` and `SFML_DIR` passed as parameters. This assumes SFML was downloaded and extracted in\n`vendor` folder.\n```\nmake CMAKE_BUILD_TYPE=Release SFML_DIR=vendor/SFML-2.5.1/lib/cmake/SFML\nbuild/Sandbox\n```\n\n## Windows\n### Example: Windows Visual Studio\nCMake should take care of creating the solution files. As this example does not use Makefile, you need to pass the\n`SFML_DIR` parameter directly to CMake:\n```\nmkdir build\ncd build\ncmake -DSFML_DIR=\"vendor\\SFML-2.5.1\\lib\\cmake\\SFML\"  ..\n\n# for 32 bit version:\n# cmake -A Win32 -DSFML_DIR=\"vendor\\SFML-2.5.1\\lib\\cmake\\SFML\"  ..\n```\nAfter that open generated solution file and hit build. \nCopy needed dlls to binary location.\nNote: You may need to set Sandbox as the startup project.\n\n### Example: Windows MinGW Makefiles\nThis works similiar to the previous example but uses different generator.\n```\nmkdir build\ncd build\ncmake -G \"MinGW Makefiles\" -DSFML_DIR=\"vendor\\SFML-2.5.1\\lib\\cmake\\SFML\"  ..\nmake\n# run the app after copying dll files\nSandbox.exe\n```\n\n## Skeleton resources folder\nSkeleton resources folder is located in `res` folder in the root of the project.\nCMake sets the absolute path to this folder as a `RESOURCES_DIR` macro available in the code.\nThis is then used by the `CacheSystem` in order to find the resources.\n\nThis lets users to run the app from anywhere as long as the resources folder is in the same place\nas when the app was built.\n\n### Tested on:\n* Ubuntu using libsfml-dev package. This is also used for CI builds.\n* Arch using sfml package.\n* Windows using Visual Studio 2019 with SFML for Visual Studio 2015 32-bit version.\n* Windows using MinGW Makefiles with SFML for GCC 7.3.0 32-bit version.\n* MacOS using SFML package from homebrew.\n\n## Skeleton used in other projects:\n* [szykol/Tetris](https://github.com/szykol/Tetris) - simple tetris game that uses Skeleton to manage the game state\nand menus.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszykol%2Fskeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszykol%2Fskeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszykol%2Fskeleton/lists"}