{"id":22394711,"url":"https://github.com/arocull/shepherd","last_synced_at":"2025-08-14T21:12:35.839Z","repository":{"id":52280300,"uuid":"219167338","full_name":"arocull/Shepherd","owner":"arocull","description":"A top-down game about a shepherd and his flock of sheep.","archived":false,"fork":false,"pushed_at":"2022-10-10T17:55:38.000Z","size":41657,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T04:27:27.433Z","etag":null,"topics":["cpp","game"],"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/arocull.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-02T14:43:12.000Z","updated_at":"2021-10-07T13:58:57.000Z","dependencies_parsed_at":"2023-01-19T19:47:13.790Z","dependency_job_id":null,"html_url":"https://github.com/arocull/Shepherd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arocull%2FShepherd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arocull%2FShepherd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arocull%2FShepherd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arocull%2FShepherd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arocull","download_url":"https://codeload.github.com/arocull/Shepherd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245749800,"owners_count":20666084,"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","game"],"created_at":"2024-12-05T05:11:38.557Z","updated_at":"2025-03-26T22:42:53.452Z","avatar_url":"https://github.com/arocull.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shepherd\n\nA small game about a shepherd and his flock of sheep.\n\n![](Assets/Textures/Loading.bmp)\n\n## Packages and Compiling\n\nThis game uses SDL2 and SDL2_Mixer as dependencies. To install these packages on Debian, run\n`$ sudo apt install libsdl2-dev libsdl2-mixer-dev`\n\nThe game compiles with a [Makefile](Makefile). Run the make file by typing `$ make`\n\nOnce the game is compiled, run it with `$ make run`\n\nCommands `$ make clean`, `$ make debug`, and `$ make debug-mem` are also available for cleaning the build, debugging, and checking memory management respectively.\n\n## Gameplay\n\nSolve ancient puzzles and fend off wolves as you lead your sheep to greener pastures.\n\nNote that this game is a work-in-progress, only providing about 5-15 minutes of gameplay for the time being.\n\nUpdates to the game may break saves, and save games may be unstable. To clear an existing save game, either run `$ make clean` and then `$ make`, or press \"New Game\" in the menu upon launching the game.\n\n### Controls\nThere is a tutorial in place that should give you the basic controls and instruct you on how to play.\n\nPress Escape to open the pause menu, and F11 to toggle fullscreen. Menus can be navigated with both WASD and Arrow Keys.\n\n\n# Editing\n\n## Level Editing\n\nLevel files can be located within [Assets \u003e Maps](Assets/Maps), and are merely comprised of ASCII.\nThe translations of char to tile/entity can be found within [Map \u003e map_loading.cpp](src/Map/map_loading.cpp) in the bottom function.\nThe number and letter below the actual map tiles itself are used for level identification and biome. Biomes merely affect the background color, whereas the identification is used in [Triggers](src/Triggers) to tell what level is what.\n\nBelow the level identification section is lines that can be used for **scrolls**. Scrolls are special collectibles that can contain various, meaningful text.\nThe first line after map identification is the name of the scroll. This is what you see when browsing discovered scrolls in the pause menu.\nThe line below the scroll name is the text the scroll contains when read. It extends the remaining length of the file, just note it has a max length of 256 characters (set in [config.h](src/Core/config.h)) and all the text must be able to fit in the dialogue box at once.\n\nBelow scrolls, additional data like puzzles, entities, etc can be placed, but each line must start with a flag. These are harder to work with and may more frequently change--they are mostly intended for save data. However, if you would like to mess with them, you can view them in [SaveLoad::LoadObjects](src/Map/save.cpp).\n\n## Triggers and Puzzles\n\nIf you want to set up and configure a puzzle, simply edit the function [Trigger_SetupPuzzles](src/Triggers/triggers.cpp) and add a section for your added level. Note the use of the [Puzzle](src/Map/puzzle.h) struct, which is a general, easy-to-use interface for creating puzzle conditions.\nIf the level requires a unique set of inputs, you can add conditions in [Scripts::PuzzleInput](src/Triggers/scripts_puzzleinput.h) for more specific purposes.\n\nThere are also additional functions for unique timings and scenarios, such as Trigger_LevelLoaded (fires upon entering level), Trigger_StaffSwing (fires whenever staff is swung), Trigger_Idled (fires after `TicksUntilIdle` ticks have passed), Trigger_LevelEvent (when level's event timer reaches zero), and [Scripts::OnTile](src/Triggers/scripts_ontile.h).\n\n## Custom Entities\n\nEntities are located in the [Entities \u003e Subclasses](src/Entities/Subclasses) folder. They all inherit the Entity class as somewhat of an interface, but contain custom functionality, drawing calls, and interactions.\n\nEntities are managed a little messily right now, but may be cleaned up in the future. First, to register an entity, add their name and corresponding ID to the [EntityID enum](src/Core/enums.h). Make sure to set their ID in their class constructor.\n\nAll Entities have their Tick function called, but if you need certain behaviors that interact with other entities, like Fireballs bursting or a custom AI, you will likely have to add it in the main game loop, located in [game](src/Core/game.cpp), at around line 130 at time of writing. If it's an enemy, you may find the [AI Manager](src/Entities/ai_manager.h) more useful, letting you write lengthy functions without filling up `game.cpp`, and providing support for things like swarm targets (or `enemyGoal` as defined in the manager).\n\nIf you want to spawn your enemy using the Level's ASCII tileset, you can edit the [GenerateMapFromFile](src/Map/map_loading.cpp) function and specify a specific ASCII character for your Entity. Otherwise, you can spawn them with [Triggers](#Triggers).\n\nDon't forget to set up a drawing function--use the other entities as examples. A function does not need to be defined if you are just using a plain image, like the Crate. Images are currently loaded in the Constructor for [RenderWindow](src/Core/renderwindow.h), deallocated in the Close function, and passed to entities in the DrawEntity function. If you're just drawing with SDL calls, a texture does not need to be provided (so no modification of RenderWindow is needed).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farocull%2Fshepherd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farocull%2Fshepherd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farocull%2Fshepherd/lists"}