{"id":28224065,"url":"https://github.com/pravetz/cssfml-pacman","last_synced_at":"2026-01-25T16:31:23.723Z","repository":{"id":286443367,"uuid":"961421457","full_name":"Pravetz/CSSFML-Pacman","owner":"Pravetz","description":"Pacman clone written in Mono C# using SFML.NET binding","archived":false,"fork":false,"pushed_at":"2025-04-07T14:57:54.000Z","size":21725,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-12T03:43:12.310Z","etag":null,"topics":["c-sharp","csfml","pac-man","pac-man-clone","pac-man-game","pacman-clone","pacman-game","sfml","sfml-net"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pravetz.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,"zenodo":null}},"created_at":"2025-04-06T13:44:08.000Z","updated_at":"2025-04-07T14:57:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e201f66-d906-4877-9a2f-f309353f90f5","html_url":"https://github.com/Pravetz/CSSFML-Pacman","commit_stats":null,"previous_names":["pravetz/cssfml-pacman"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pravetz/CSSFML-Pacman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pravetz%2FCSSFML-Pacman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pravetz%2FCSSFML-Pacman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pravetz%2FCSSFML-Pacman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pravetz%2FCSSFML-Pacman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pravetz","download_url":"https://codeload.github.com/Pravetz/CSSFML-Pacman/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pravetz%2FCSSFML-Pacman/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28755522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T13:59:49.818Z","status":"ssl_error","status_checked_at":"2026-01-25T13:59:33.728Z","response_time":113,"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":["c-sharp","csfml","pac-man","pac-man-clone","pac-man-game","pacman-clone","pacman-game","sfml","sfml-net"],"created_at":"2025-05-18T09:11:01.192Z","updated_at":"2026-01-25T16:31:23.716Z","avatar_url":"https://github.com/Pravetz.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## SFML-Pacman\nMy relatively old course project, written in C# in MonoDevelop using SFML.Net only, it's state is finished, that's why it's distributed in a single project.zip file, which needs to be extracted and opened in MonoDevelop.\n\nProject has it's own graphics(made in GIMP) and sounds(made in LMMS) inspired by original game from the 80s.\n\nIt is very modification-friendly, as all in-game entities, animations and sounds are defined in config files(can be found in `assets` folder in `bin/Debug`) in home-grown esoteric configuration language, you can read more in `Modification` related sections.\n\n## Modification: Game's filesystem\nGame assets such as character appearances, sounds, animations, maps and etc. can be modified without needing to edit game's source code.\n\nEverything is defined in special configuration files in in project's `bin/Debug/assets/configs` folder subdirectories:\n\n  - `animations` contains files describing various animations for ghosts(`ghost.animation`) and Pac-Man(`pacman.animation`)\n  - `entities` contains files describing idle textures for ghosts(`ghosts.txt`), ghost eyes(`ghost_eyes_textures.txt`) and Pac-Man(`pacman.txt`)\n  - `font` contains bitmap font configurations, which are used by game's localizations to properly draw text in-game\n  - `maptiles` contains `maptx.txt` file, which describes texture coordinates of map tiles\n  - `sounds` contains descriptions of sounds, which are played when Pac-Man or ghosts do certain actions\n  - `UI` contains `paclifes.txt`, which sets texture for Pac-Man lifes \"counter\" and `ui_overlay.txt`, which contains relative positioning and sizes of text elements in-game\n\nData for config files is located in `bin/Debug/assets/gfx`(for textures and map layouts) and `bin/Debug/assets/sfx`(for sounds)\n\nIn-game text strings are defined in language-specific files, e.g. `EN.txt` for English text or `UA.txt` for Ukrainian.\n\nGame also has `settings.txt` file, which is created automatically on it's first start, settings can not be changed in-game, but the file can be open and changed using Notepad or similar programs.\n\n## Modification: Game Settings\nGame uses automatically created settings file to locate and load necessary data, as well as configure some rules, following configurations can be edited:\n```\nFULLSCREEN: Whether to start in fullscreen mode(True/False, default value is True)\nWINDOW_WIDTH: Window width if game doesn't use full screen(integer), default value is 1368\nWINDOW_HEIGHT: Window height if game doesn't use full screen(integer), default value is 768\nGAME_TX_PATH: Game texture atlas path, default is assets/gfx/game_atlas.png\nGHOSTS_DEF_PATH: Ghosts definition file path, default is assets/configs/entities/ghosts.txt\nPACMAN_DEF_PATH: Pac-Man defintion file path, default is assets/configs/entities/pacman.txt\nGHOST_EYES_TXDEF: Ghost eyes` textures path, default is assets/configs/entities/ghost_eyes_textures.txt\nMAP_TILE_TXDEF_PATH: Map tiles definition file path, default is assets/configs/maptiles/maptx.txt\nMAPS_PATH: Maps path, default is assets/gfx/maps/\nDEFAULT_MAP: Default map name in MAPS_PATH, default is classic_map.png\nDEFAULT_LANG: Game localization language, default is EN\nCHARS_PATH: Bitmap font definition files path, default is assets/configs/font/\nTEXT_PATH: Localization strings path, default is assets/text/\nLOG_PATH: Logging path, default is logs/\nUI_OVERLAY_PATH: UI overlay definition file path, default is assets/configs/UI/ui_overlay.txt\nPACMAN_LIFES_BAR_DEF: Pac-Man life bar texture definition path, default is assets/configs/UI/paclifes.txt\nSOUND_VOLUME: Game sound volume, default is 100\nRANDOM_MAPS: Whether to load random map from MAPS_PATH each time player wins a level(True/False), default is False\n```\n\n## Modification: Editing Animations\nAnimation files have their own syntax rules, which are fairly simple, to (re-)define animations\nSample code: \n```\n\"idle\" 0,001\n\ttd4 0 0 16 0 16 16 0 16\n```\n\nThis is \"idle\" animation for Pac-Man, `\"idle\"` is animation identifier, `0,001` is time interval between each animation frame, `td4` or `texture direction 4` is the Pac-Man's character direction in game, for which this frame will get applied.\nThere are 5 directions, which can be used with `td`:\n\n  - `0`: right\n  - `1`: up\n  - `2`: left\n  - `3`: down\n  - `4`: any direction, use this to specify animation frames regardless of character's movement direction\n\n`td` must always be followed with 8 integer values, those are (x, y) pairs of texture coordinates on game atlas (`bin/Debug/assets/gfx/game_atlas.png`), to specify second frame in selected texture direction, just write another line starting with same texture direction specifier, e.g.\n\n```\n\"move\" 0,005\n\ttd0 0 0 16 0 16 16 0 16\n\ttd0 16 0 32 0 32 16 16 16\n\ttd0 32 0 48 0 48 16 32 16\n\ttd0 48 0 64 0 64 16 48 16\n\ttd0 64 0 80 0 80 16 64 16\n\ttd0 80 0 96 0 96 16 80 16\n\t\n\ttd1 0 16 16 16 16 32 0 32\n\ttd1 16 16 32 16 32 32 16 32\n\ttd1 32 16 48 16 48 32 32 32\n\ttd1 48 16 64 16 64 32 48 32\n\ttd1 64 16 80 16 80 32 64 32\n\ttd1 80 16 96 16 96 32 80 32\n\t\n\ttd3 0 16 16 16 16 32 0 32\n\ttd3 32 32 16 32 16 16 32 16\n\ttd3 48 32 32 32 32 16 48 16\n\ttd3 64 32 48 32 48 16 64 16\n\ttd3 80 32 64 32 64 16 80 16\n\ttd3 96 32 80 32 80 16 96 16\n\t\n\ttd2 16 0 0 0 0 16 16 16\n\ttd2 32 0 16 0 16 16 32 16\n\ttd2 48 0 32 0 32 16 48 16\n\ttd2 64 0 48 0 48 16 64 16 \n\ttd2 80 0 64 0 64 16 80 16\n\ttd2 96 0 80 0 80 16 96 16\n```\n\nIn-game characters have fixed amount of animations, new ones can not be added(without changing the code), but can be defined in any order.\n\n\n## Modification: Editing Entities\nPac-Man and Ghosts are defined in `ghosts.txt` and `pacman.txt` files which use a little different syntax.\nFor Pac-Man, definition is following:\n\n```r255, g255, b0, a255, 0, 0, 16, 0, 16, 16, 0, 16, x16, y16```\n\n`r\u003cINT\u003e`, `g\u003cINT\u003e`, `b\u003cINT\u003e` and `a\u003cINT\u003e` specify RGBA color for Pac-Man's body, next 8 integer values specify his default texture, just in case idle animation was not defined for some reason, `x\u003cINT\u003e`, `y\u003cINT\u003e` specify Pac-Man's size on map.\n\nGhosts are defined in single file:\n\n```\n\"Blinky\", r255, g0, b0, a255, 0, 64, 16, 64, 16, 80, 0, 80, x16, y16\n\"Pinky\", r255, g184, b255, a255, 0, 64, 16, 64, 16, 80, 0, 80, x16, y16\n\"Inky\", r0, g255, b255, a255, 0, 64, 16, 64, 16, 80, 0, 80, x16, y16\n\"Clyde\", r255, g184, b81, a255, 0, 64, 16, 64, 16, 80, 0, 80, x16, y16\n```\n\nThe overall structure resembles Pac-Man's definition file, with addition of character name strings as first argument. Those don't just \"name\" ghosts, they actually specify their behavior on map, allowing to create new ghost characters with their behavior copying one of the 4 existing ones (Blinky, Pinky, Inky or Clyde), e.g.\n\n```\n\"Blinky\", r82, g7, b37, a255, 0, 64, 16, 64, 16, 80, 0, 80, x16, y16\n```\n\nWill create another ghost with dark-pink color and behavior of Blinky\n\n## Modification: Editing Fonts\nFonts are also present on the game's texture atlas(`bin/Debug/assets/gfx/game_atlas.png`), each localization needs it's own bitmap font specified(it can be copied from existing ones, though).\n\nSyntax for bitmap font definition is fairly simple, here's example `EN.txt`:\n\n```\nOFFSET 0 120\nA 6 8\nB 5 8\nC 5 8\nD 5 8\nE 5 8\nF 5 8\nG 6 8\nH 5 8\nI 1 8\nJ 2 8\nK 5 8\nL 5 8\nM 5 8\nN 5 8\nO 5 8\nP 5 8\nR 5 8\nS 5 8\nT 5 8\nU 5 8\nV 5 8\nW 9 8\nX 5 8\nY 5 8\nZ 6 8\n```\n\nOFFSET keyword here signals game's pixel scanner to jump to position (0, 120) on in-game atlas before reading any characters, then, there are tuples of 3 values: character, it's width and height.\n\nScanner goes horizontally from left-most position specified by OFFSET to right, if your bitmap font is positioned on multiple lines in `game_atlas.png`, don't be afraid to use OFFSET again in same file.\n\nFor example, numbers are located lower than latin letters on game atlas, so to read them too, another offset is specified after all the letters are scanned:\n```\nOFFSET 0 128\n0 5 8\n1 3 8\n2 5 8\n3 5 8\n4 6 8\n5 5 8\n6 5 8\n7 6 8\n8 4 8\n9 5 8\n```\n\n## Modification: Editing Map Tiles\nMap Tiles, or \"Cells\" are defined in `maptx.txt`, example syntax for wall cells:\n```\nCELLTYPE WALL\n0 80 16 80 16 96 0 96\n16 80 32 80 32 96 16 96\n32 80 48 80 48 96 32 96\n160 80 176 80 176 96 160 96\n48 80 64 80 64 96 48 96\n80 80 96 80 96 96 80 96\n112 80 128 80 128 96 112 96\n224 80 240 80 240 96 224 96\n64 80 80 80 80 96 64 96\n96 80 112 80 112 96 96 96\n128 80 144 80 144 96 128 96\n208 80 224 80 224 96 208 96\n144 80 160 80 160 96 144 96\n176 80 192 80 192 96 176 96\n192 80 208 80 208 96 192 96\n256 80 272 80 272 96 256 96\n```\n\nTo begin defining cell textures, one writes CELLTYPE followed by cell name in uppercase, then, in new lines, all possible textures are defined as 8 integer values(x,y coordinate pairs) for the cell depending on it's direction and possible intersections with other cells.\n\nFor edibles, each new entry specifies new fruit which will appear on map depending on level\n\n## Modification: Editing Sounds\nSounds are attached for certain actions characters do, those actions are hardcoded, but as with animations, sounds can be defined for them in any order, example for Pac-Man:\n\n```\n\"eat\"=assets/sfx/pacman/eat.ogg\n\"eat_fruit\"=assets/sfx/pacman/eat_fruit.ogg\n\"eat_ghost\"=assets/sfx/pacman/eat_ghost.ogg\n\"energizer\"=assets/sfx/pacman/energized.ogg\n\"death\"=assets/sfx/pacman/death.ogg\n```\n\nFirst goes action identifier, then, separated by = sign, path to .ogg sound file.\n\nIn-game sound player doesn't play same sound for all characters, only unique ones, to prevent \"earraping\" the player.\n\n## Modification: Editing and Creating Localizations\nBy default, game is supplied with English and Ukrainian localizations, but user can create his own localizations and put them in `bin/Debug/assets/text` with unique file name.\n\nAs a reference, one should take English localization file and then translate each line to target language:\n\n```\nPACMAN\n\u003cENTER\u003e - PLAY\n\u003cESC\u003e - EXIT\n- BLINKY (CHASER)\n- PINKY (AMBUSHER)\n- INKY (FICKLE)\n- CLYDE (FEIGNED IGNORANCE)\n- PACMAN\nREADY!\nSCORE: \nGAME OVER!\n\u003cENTER\u003e - RESTART\n\u003cESC\u003e - EXIT\nGAME PAUSED.\n```\n\nOne should also create or copy already existing bitmap font definition for a language as described in `Editing Fonts` section.\n\n## Modification: Editing UI Overlay\nUser can also edit the positioning, color and scaling of in-game text using `ui_overlay.txt` file.\nIt is composed of lines with 4 or 8 floating point and integer values:\n```\n0,076 0,02297 4 4 255 255 0 255\n0,076 0,425 1 1\n0,076 0,450 1 1\n0,099 0,16 1,5 1,5 255 0 0 255\n0,099 0,192 1,5 1,5 255 184 255 255\n0,099 0,224 1,5 1,5 0 255 255 255\n0,099 0,256 1,5 1,5 255 184 81 255\n0,099 0,288 1,5 1,5 255 255 0 255\n0,089 0,1 1,5 1,5 255 255 0 255\n0 -0,022125 2 2\n0,45 0,45 2 2 255 0 0 255\n0,452 0,66 1 1\n0,452 0,685 1 1\n0,073 -0,02 1,5 1,5 255 255 0 255\n```\n\nTwo first floating point values specify text position in relation to game's window size, next two floating point values specify text scaling(widht, height), this should be 1 1 by default.\n\nThis data is sufficient for game to draw text properly, but if you want to get fancy, you can also add coloring for text by specifying extra 4 integer values, RGBA values in strict order, first goes Red, then Green, then Blue and then Alpha value.\n\nEach ui overlay entry corresponds to localization strings in files found in `bin/Debug/assets/text`, so, if you are feeling lost, you can lookup the text you need to adjust overlay for there.\n\n```\n0,076 0,02297 4 4 255 255 0 255 (in ui_overlay.txt) --\u003e PACMAN (in bin/Debug/assets/text/EN.txt)\n```\n\n## Modification: Editing and Adding Maps\nGame can load any number of maps defined in `bin/Debug/assets/gfx/maps` folder as long as they follow the pattern:\n\n  - Each pixel is a separate cell\n  - Each pixel color determines separate cell type\n  - There are NO undefined cell types\n\nCell types are following:\n```\n  Wall - RGBA(33,33,222,255)\n  Ghost house door - RGBA(159,133,115,0)\n  Edible(default) - RGBA(255,255,255,0)\n  Edible(energizer) - RGBA(255,255,255,1)\n  Edible(fruit) - RGBA(255,255,255,2)\n  Empty - RGBA(0,0,0,0)\n  Pacman's initial position - RGBA color defined in `bin/Debug/assets/configs/entities/pacman.txt`\n  Ghosts' initial positions - RGBA colors defined in `bin/Debug/assets/configs/entities/ghosts.txt`\n```\n\nAny other color values are considered undefined and will lead to game's crash when loading map.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpravetz%2Fcssfml-pacman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpravetz%2Fcssfml-pacman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpravetz%2Fcssfml-pacman/lists"}