{"id":26054697,"url":"https://github.com/avdaredevil/powersneks","last_synced_at":"2025-04-11T02:09:33.697Z","repository":{"id":21691584,"uuid":"25012890","full_name":"avdaredevil/PowerSneks","owner":"avdaredevil","description":"Snake game written in PowerShell which uses any windows console (cmd.exe, powershell.exe, even VSCode) and draws out a custom native code based game. Useful and fun game for aspiring programmers and techies.","archived":false,"fork":false,"pushed_at":"2025-03-25T04:20:50.000Z","size":488,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T02:09:29.750Z","etag":null,"topics":["console-game","game","laser-beam","powershell","snake-game"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/avdaredevil.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}},"created_at":"2014-10-09T23:37:32.000Z","updated_at":"2025-03-25T04:20:54.000Z","dependencies_parsed_at":"2023-02-11T23:45:46.482Z","dependency_job_id":null,"html_url":"https://github.com/avdaredevil/PowerSneks","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/avdaredevil%2FPowerSneks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdaredevil%2FPowerSneks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdaredevil%2FPowerSneks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdaredevil%2FPowerSneks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avdaredevil","download_url":"https://codeload.github.com/avdaredevil/PowerSneks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328160,"owners_count":21085261,"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":["console-game","game","laser-beam","powershell","snake-game"],"created_at":"2025-03-08T09:13:06.202Z","updated_at":"2025-04-11T02:09:33.688Z","avatar_url":"https://github.com/avdaredevil.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PowerSneks\n\n\u003e Snake game written in PowerShell which uses any windows console (`cmd.exe`, `powershell.exe`, even VSCode!) and draws out a custom native code based game. Useful and fun game for aspiring programmers and techies. Features:\n\n- Robust Game engine:\n  - Capable of handling multiple snakes / objects\n  - Mod capabilities by extending engine and providing your own Game Hook / Classes (as long as you implement the appropriate interfaces)\n  - Saving / Restoring complete state (Snakes, directions, objects, Game Grid, Tick Speed, etc)\n- Level Mechanics:\n  - Obstruction creation\n  - Laser beams\n  - Moving snitches (with random point values)\n- Customization Segment:\n  - Allows you to Customize `$Script:GameKnobs` to adjust everything from Sleep Times, Obstruction sizes, Render sizes, Colors, Symbols, SaveMaps, Laser Logic, etc\n\n## Screenshots\n\nStandard Single Player | Multiplayer (w/ Debug Console) | Scoreboard during gameplay\n--- | --- | ---\n![Standard Single Player](https://user-images.githubusercontent.com/5303018/67819656-4fe37300-fa73-11e9-9539-bd7cf05c1f5a.png) | ![Multiplayer (w/ Debug Console)](https://user-images.githubusercontent.com/5303018/67819723-9d5fe000-fa73-11e9-8ade-a39dd99e91b4.png) | ![PowerSneks Scoreboard](https://user-images.githubusercontent.com/5303018/69590755-59de9000-0fa5-11ea-8393-259a8b1d06fb.png)\n\nGameplay Gif |\n--- |\n![PowerSneks Gameplay](./docs/PowerSneks.gif)\n\n## Usage\n\n```PowerShell\n.\\PowerSneks.ps1 [[-Snakes] \u003cint:1\u003e] [[-Bots] \u003cint:0\u003e] [[-MapFile] \u003cstring\u003e] [-LoadDefaultSave] [-ShowPlayerLabels] [-Debug]\n```\n\n- Will draw a game to match the dimensions of the console window\n- `Snake` is the number of human players (controls cut off after 2 players), `Bots` is the number of bots in the game\n- `Debug` mode is for debugging to see snake positions, object distances, active render, current block, tick\n- `LoadDefaultSave` loads game from a previous save [File: `%appdata%\\AP-PowerSneks.Map.Save`]\n- `MapFile` is the save-file path you want to load the game from\n- *__Note__: If you've never run PowerShell Scripts before refer to __Setup PowerShell Section__ Below*\n\n## Features\n\n- In house Game Engine, and View overlay + Grid System\n- Color Scheming\n- Level Making\n- MAP Saving and Loading\n- Obstruction Creation\n- Laser Beams To cut through walls\n- Warping of Obstructions and Snake\n- Game-Console with Laser and Score count\n- Debug console like Minecraft for the game Engine\n- CPU cycle and sleep time adjustment as game progresses\n- Bots to play against\n- Golden Snitch to chase for extra points (and less walls)\n\n## Commands\n\nKey Code         | Usage\n---------------- | -----\n`q`, `x`, `ESC`       | Quit Game\n`←`   , `→`   , `↑`   , `↓`    | Move Snake (left/right/up/down) (Player 1)\n`A`   , `D`   , `W`   , `S`    | Move Snake (left/right/up/down) (Player 2)\n`J`   , `L`   , `I`   , `K`    | Move Snake (left/right/up/down) (Player 3)\n`num4`, `num6`, `num8`, `num5` | Move Snake (left/right/up/down) (Player 4)\n`end`, `r-ctrl`, `🔙` | Laser Beam (Player 1)\n`l-ctrl`, `c`         | Laser Beam (Player 2)\n`space`, `{`          | Laser Beam (Player 3)\n`0`, `num-enter`      | Laser Beam (Player 4)\n`+`                   | Speed Up Game [*Increases Tick speed*]\n`-`                   | Slow Down Game [*Increases Tick speed*]\n`p`                   | Pause Game\n`f12`                 | Full Screen\n`Tab`                 | Save Current Game State\n`f5`                  | Refresh view [*fast*]\n``` ` ```             | Enable dev console on game (also enable-able via the `-debug` cmdline flag)\n`.`                   | Add more food to the game [__Cheat Code__]\n\n## Files\n\n#### Game Launchers\n\nFile | Description\n--- | ---\n`PowerSneks.ps1` | Main Game launcher, use this to start the game\n`ToBots.ps1` | Use a saved game and convert all players to bots (*best use for this file, use `-LoadDefaultSave`*)\n\n#### Base Files\n\nFile | Description\n--- | ---\n`PowerSneks_BaseObjects.ps1` | Contains enums and base object definitions that the game engine relies on\n`PowerSneks_GameSettings.ps1` | Contains all the tinkerable variables that can be modified before launching the game engine\n`PowerSneks_Engine.ps1` | Loads all entities mentioned below, and exposes functions that are needed to draw or start the game\n`Sockets.ps1` | *__TODO__: Add LAN based multiplayer support for the game*\n\n#### Game Entity Files\n\n*The Number before the file name is the order in which the files are loaded into the game engine (since they depend on each other)*\n\nFile | Description\n--- | ---\n`entities/1_Game.ps1` | Contains the `Game` and `Scoreboard` class definitions\n`entities/2_Snake.ps1` | Contains the `Snake` class definition\n`entities/3_Bot.ps1` | Contains the `SnakeBot` class definition which can kinda play the game (super basic AI)\n`entities/3_GoldenSnitch.ps1` | Contains the `GoldenSnitch`, which is a special moving object that gives extra points (without creating walls)\n\n## Set Up PowerShell [If you've never run a script in PowerShell]\n\n- Open PowerShell with Admin Access\n- Run `Set-ExecutionPolicy Bypass`\n- This allows scripts to be run in PowerShell\n- cd to the *Folder* where you downloaded/cloned [PowerSneks.ps1](PowerSneks.ps1)\n- `./PowerSneks.ps1`*`\u003carguments\u003e`*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favdaredevil%2Fpowersneks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favdaredevil%2Fpowersneks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favdaredevil%2Fpowersneks/lists"}