{"id":23529415,"url":"https://github.com/nermeenkamal/universe-3d-game","last_synced_at":"2026-05-16T18:08:56.712Z","repository":{"id":269331675,"uuid":"885831998","full_name":"NermeenKamal/Universe-3D-Game","owner":"NermeenKamal","description":"This is an OpenGL project that demonstrates the rendering of a simple 3D environment with rotating spheres (Earth and Moon) and a textured background. The project also includes lighting effects and basic keyboard controls to manipulate the scene.","archived":false,"fork":false,"pushed_at":"2024-12-22T19:11:08.000Z","size":832,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-22T20:18:49.396Z","etag":null,"topics":["cpp","graphics","opengl","universe","university-project"],"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/NermeenKamal.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":"2024-11-09T14:11:33.000Z","updated_at":"2024-12-22T19:12:19.000Z","dependencies_parsed_at":"2024-12-22T20:18:51.114Z","dependency_job_id":"d3bb4fec-f498-48d7-b754-e715bcc3ccf5","html_url":"https://github.com/NermeenKamal/Universe-3D-Game","commit_stats":null,"previous_names":["nermeenkamal/universe-3d-game"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NermeenKamal%2FUniverse-3D-Game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NermeenKamal%2FUniverse-3D-Game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NermeenKamal%2FUniverse-3D-Game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NermeenKamal%2FUniverse-3D-Game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NermeenKamal","download_url":"https://codeload.github.com/NermeenKamal/Universe-3D-Game/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239226460,"owners_count":19603270,"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":["cpp","graphics","opengl","universe","university-project"],"created_at":"2024-12-25T21:10:22.726Z","updated_at":"2026-05-16T18:08:56.672Z","avatar_url":"https://github.com/NermeenKamal.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image](https://github.com/user-attachments/assets/c566a936-3917-4af3-8c8d-6dfc6d63b134)\n\n# OpenGL Universe\n\nThis is an OpenGL project that demonstrates the rendering of a simple 3D environment with rotating spheres (Earth and Moon) and a textured background. The project also includes lighting effects and basic keyboard controls to manipulate the scene.\n\n## Features\n- 3D rendering of Earth and Moon with realistic lighting effects (ambient, diffuse, and specular).\n- Background image with texture mapping.\n- Support for continuous auto-rotation of objects.\n- Interactive keyboard controls for manipulating the scene.\n- Support for controlling the rotation of objects along X, Y, and Z axes.\n\n## Requirements\n- OpenGL (GLUT) for rendering 3D objects.\n- `stb_image` library for loading images.\n- SDL2 (optional) for audio functionality (currently commented out in the code).\n\n### Dependencies:\n- GLUT (for OpenGL window creation and handling input events)\n- stb_image.h (for loading images)\n- SDL2 (for audio, if desired)\n\nYou can install the required libraries as follows:\n- **GLUT**: Follow the installation guide for your operating system.\n- **stb_image.h**: Download the file from [stb_image](https://github.com/nothings/stb).\n- **SDL2** (optional): You can download and install SDL2 from [SDL2's website](https://www.libsdl.org/).\n\n## Installation\n\n1. Clone this repository:\n    ```bash\n    git clone https://github.com/yourusername/OpenGLUniverse.git\n    ```\n\n2. Navigate to the project directory:\n    ```bash\n    cd OpenGLUniverse\n    ```\n\n3. Make sure you have the required dependencies installed (GLUT, stb_image, SDL2).\n\n4. Compile and run the project:\n    - On Linux/macOS:\n      ```bash\n      g++ -o universe main.cpp -lGL -lGLU -lglut -lm\n      ./universe\n      ```\n    - On Windows, use your preferred IDE or a compiler like MinGW with appropriate linking for OpenGL and GLUT.\n\n## Controls\n\n- **Arrow Keys**: Rotate the scene (Up, Down, Left, Right).\n- **S**: Reset rotation to 0 for all axes and stop auto-rotation.\n- **A**: Start auto-rotation of objects.\n- **O**: Move the object along the X-axis (open).\n- **C**: Move the object along the X-axis (close).\n- **Z/X**: Rotate the object along the Z-axis.\n- **ESC**: Exit the program.\n\n## Lighting\nThe project supports multiple lighting modes:\n1. Ambient lighting only.\n2. Diffuse lighting only.\n3. Specular lighting only.\n4. Combined lighting (Ambient + Diffuse + Specular).\n\nThe lighting setup is customizable within the `setupLighting` function.\n\n## Background Image\nA background image is loaded using the `stb_image` library. Replace the `uni.png` file path with your desired image for the background texture.\n\n## Notes\n- The SDL2 audio functionality is currently commented out in the code. To enable audio, uncomment the relevant code sections and ensure you have the appropriate audio file and SDL2 installed.\n- The camera is set up to view the scene from a fixed position and allows rotation of the Earth and Moon using the keyboard.\ning README.md…]()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnermeenkamal%2Funiverse-3d-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnermeenkamal%2Funiverse-3d-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnermeenkamal%2Funiverse-3d-game/lists"}