{"id":26198045,"url":"https://github.com/educ8s/cpp-analog-clock-with-raylib","last_synced_at":"2026-02-18T09:02:24.323Z","repository":{"id":272121543,"uuid":"909011418","full_name":"educ8s/Cpp-Analog-Clock-with-raylib","owner":"educ8s","description":"An analog clock project using C++ and raylib, showcasing OOP concepts and dynamic graphics.","archived":false,"fork":false,"pushed_at":"2025-01-12T09:16:38.000Z","size":637,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-15T17:10:24.739Z","etag":null,"topics":["analog-clock","cpp","raylib","raylib-cpp","raylib-project"],"latest_commit_sha":null,"homepage":"","language":"C++","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/educ8s.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-12-27T14:28:19.000Z","updated_at":"2025-09-06T21:32:52.000Z","dependencies_parsed_at":"2025-01-12T10:23:09.659Z","dependency_job_id":"5a280ce6-af73-4f94-bc5b-4a5126e25c0c","html_url":"https://github.com/educ8s/Cpp-Analog-Clock-with-raylib","commit_stats":null,"previous_names":["educ8s/cpp-analog-clock-with-raylib"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/educ8s/Cpp-Analog-Clock-with-raylib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/educ8s%2FCpp-Analog-Clock-with-raylib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/educ8s%2FCpp-Analog-Clock-with-raylib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/educ8s%2FCpp-Analog-Clock-with-raylib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/educ8s%2FCpp-Analog-Clock-with-raylib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/educ8s","download_url":"https://codeload.github.com/educ8s/Cpp-Analog-Clock-with-raylib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/educ8s%2FCpp-Analog-Clock-with-raylib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29574065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T08:38:15.585Z","status":"ssl_error","status_checked_at":"2026-02-18T08:38:14.917Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["analog-clock","cpp","raylib","raylib-cpp","raylib-project"],"created_at":"2025-03-12T02:49:48.020Z","updated_at":"2026-02-18T09:02:24.296Z","avatar_url":"https://github.com/educ8s.png","language":"C++","readme":"# Analog Clock with Raylib and C++\n\nThis repository contains the code for a video tutorial on creating a fully functional analog clock using Raylib and C++.\n\n## Video Tutorial\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"preview.jpg\" alt=\"Analog Clock Preview\" width=\"960\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n🎥 \u003ca href=\"https://youtu.be/E_hg96tixLM\"\u003eWatch the Video Tutorial on YouTube\u003c/a\u003e\n\u003c/p\u003e\n\n## Overview\n\nIn this tutorial, we build a visually appealing analog clock from scratch using C++ and Raylib. The tutorial guides you through every step of the process, from setting up the environment to designing the clock's components and implementing real-time updates.\n\n## Features\n\n- **Customizable Clock Face:** Learn how to design a polished clock face with an outer rim, hour markers, and inner details.\n- **Real-Time Clock Hands:** Create dynamic hour, minute, and second hands that update based on the current time.\n- **Object-Oriented Design:** The project is structured using OOP principles for clean and modular code.\n- **Efficient Graphics Rendering:** Use Raylib’s simple and powerful API for smooth and efficient rendering.\n\n## Code Structure\n\n- **AnalogClock.hpp / AnalogClock.cpp:** Contains the `AnalogClock` class, which handles drawing the clock face, hands, and real-time updates.\n- **main.cpp:** The main entry point that initializes the Raylib window, updates the clock, and renders it on the screen.\n\n## How to Run\n\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/yourusername/analog-clock-raylib.git\n   cd analog-clock-raylib\n   ```\n\n2. Install Raylib (if not already installed). Refer to the [Raylib installation guide](https://github.com/raysan5/raylib/wiki) for platform-specific instructions.\n\n3. Compile the project:\n   ```bash\n   g++ main.cpp AnalogClock.cpp -o AnalogClock -lraylib -std=c++17\n   ```\n\n4. Run the compiled program:\n   ```bash\n   ./AnalogClock\n   ```\n\n## Project Steps\n\nThis project is divided into the following steps:\n1. **Set Up Raylib** - Install Raylib and configure your development environment.\n2. **Create the Window \u0026 Main Loop** - Initialize the Raylib window and set up the main game loop.\n3. **Draw the Clock Face** - Design the clock's outer rim, inner rim, and clean clock face.\n4. **Add Hour Markers** - Create and position 12 evenly spaced hour markers around the clock.\n5. **Draw the Minute Hand** - Implement a dynamic minute hand that rotates in real time.\n6. **Draw the Hour Hand** - Build the hour hand with proportional movement based on the minute value.\n7. **Draw the Seconds Hand** - Add the seconds hand with an adjusted pivot point for smooth rotation.\n8. **Fetch Real-Time Data** - Use C++’s `\u003cctime\u003e` library to fetch the current time and update the clock dynamically.\n\n## Dependencies\n\n- C++17 or later\n- Raylib\n\n## Contributing\n\nContributions are welcome! If you have ideas for improvements, additional features, or bug fixes, feel free to open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\nEnjoy coding your analog clock, and don’t forget to share your project! 🚀\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feduc8s%2Fcpp-analog-clock-with-raylib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feduc8s%2Fcpp-analog-clock-with-raylib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feduc8s%2Fcpp-analog-clock-with-raylib/lists"}