{"id":18295244,"url":"https://github.com/andezion/pong","last_synced_at":"2026-02-20T00:02:00.741Z","repository":{"id":229908871,"uuid":"777981935","full_name":"Andezion/Pong","owner":"Andezion","description":"This is simple Pong-game for two players.","archived":false,"fork":false,"pushed_at":"2025-01-15T16:26:02.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T02:42:26.599Z","etag":null,"topics":["c","cpp","game-development","pong-game","sfml-game","sfml-graphics-library","sfml2"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Andezion.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-03-26T21:29:14.000Z","updated_at":"2025-01-15T16:26:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"efc6a8bc-a7fc-4c1c-a389-6a98e93c3701","html_url":"https://github.com/Andezion/Pong","commit_stats":null,"previous_names":["andezion/pong"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andezion%2FPong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andezion%2FPong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andezion%2FPong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andezion%2FPong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Andezion","download_url":"https://codeload.github.com/Andezion/Pong/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248002116,"owners_count":21031524,"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","cpp","game-development","pong-game","sfml-game","sfml-graphics-library","sfml2"],"created_at":"2024-11-05T14:34:09.659Z","updated_at":"2026-02-20T00:02:00.728Z","avatar_url":"https://github.com/Andezion.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pong on SFML\nThis is simple Pong-game for two players.\n## Table of contents\n* [General info](#general-info)\n* [Gameplay](#gameplay)\n* [Technologies](#technologies)\n* [Features](#features)\n* [Setup](#setup)\n\n## General info\nI used SFML for graphics, sound, text and user-computer processing. I created templates of rectangles (players) and a ball, in addition I added a sound when the ball is kicked. At the same time used Audacity to correct the sound. \n\n![Start menu](./Photo/2.jpg)\n\nThe mechanism of bouncing from walls or from players is very simple, as soon as there is a coincidence of extreme coordinates of objects - the ball changes its speed to diametrically opposite with the preservation of all laws of physics.\n\n![Game](./Photo/1.jpg)\n\nThe game has an initial window where you can select an action, namely start play, restart, speed up, slow down or exit. The player score is highlighted at the bottom, and resets to zero on restart. As for the text, the template was taken the most usual, the main thing is that it was readable.\n\n## Gameplay\n\nhttps://github.com/Andezion/Pong/assets/115638748/5c83b3cb-e929-4fa9-a40d-c42e674a9300\n\n## Technologies\nProject is created with:\n* SFML-2.6.0 for for visuals and game logic\n* Audacity to adjust and change the sound\n* The Bible for courage\n\n## Features\nFirst we have two auxiliary functions to check for field edge and collision. \nAfter that, we load texts, create instructions and basic objects, sounds and variables.\n\nThen we check if the game has started - we start moving the object we created earlier - the ball, checking if it has crossed any fields of the screen.\nIn case of collision we change the direction and play the sound:\n```\nif (cheking_hitting(round, rect1) || cheking_hitting(round, rect2))\n{\n\tspdX = -spdX;\n\n\tsound.play();\n}\n```\nThen we process the keys pressed by our players and display the score.\nIf the game hasn't started yet, we show text/instructions to the players.\n\t\n## Setup\nTo run this project, install it locally using npm:\n```\nsudo apt-get update\nsudo apt-get install libsfml-dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandezion%2Fpong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandezion%2Fpong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandezion%2Fpong/lists"}