{"id":15578906,"url":"https://github.com/tlsa/peltar","last_synced_at":"2025-07-29T01:33:36.605Z","repository":{"id":43209353,"uuid":"415364809","full_name":"tlsa/peltar","owner":"tlsa","description":"Two dimensional gravity-based space combat game","archived":false,"fork":false,"pushed_at":"2023-01-31T12:04:32.000Z","size":304,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T07:44:15.627Z","etag":null,"topics":["2d","game","procedural-generation","space"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tlsa.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":"2021-10-09T16:38:02.000Z","updated_at":"2022-12-28T10:58:51.000Z","dependencies_parsed_at":"2023-02-01T02:16:12.071Z","dependency_job_id":null,"html_url":"https://github.com/tlsa/peltar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tlsa/peltar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlsa%2Fpeltar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlsa%2Fpeltar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlsa%2Fpeltar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlsa%2Fpeltar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tlsa","download_url":"https://codeload.github.com/tlsa/peltar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlsa%2Fpeltar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267616563,"owners_count":24116153,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["2d","game","procedural-generation","space"],"created_at":"2024-10-02T19:13:18.025Z","updated_at":"2025-07-29T01:33:36.580Z","avatar_url":"https://github.com/tlsa.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Peltar: 2D gravity-based space combat game\n==========================================\n\n\u003e **Note**: This game is unfinished and not actively developed.\n\nPeltar is a game for two players who must each try to shoot the other player's\nship.  Missiles are affected by the gravity of the intervening planets.  It\nis based on an\n[Acorn Archimedes](https://en.wikipedia.org/wiki/Acorn_Archimedes) game called\n[Planet Warfare](https://github.com/tlsa/peltar/issues/5#issuecomment-955704718)\nthat I played when I was much younger.\n\n![Peltar screenshot](https://repository-images.githubusercontent.com/415364809/75c1dfef-ab2a-42e3-9ef4-18559ae0aa8a)\n\nIt was developed on Linux in C using SDL.\n\nWhy?\n----\n\nBefore I got a job, I bought \"Texturing and Modeling: A Procedural Approach\",\nand I wanted to experiment with making a fixed-point\n[Perlin noise](https://en.wikipedia.org/wiki/Perlin_noise) generator.\n\nI also had an idea for rendering 3D spheres using 2D techniques.  (Basically\ndrawing a circle and indexing into a texture with a bit of lookup-tabled maths\nto select a pixel colour that would give the illusion of 3D.)\n\nIt is unfinished, although it is playable.  Most of what remains to do is\nmain menu, setting up a game, score keeping, etc.\n\nCompile and run\n---------------\n\nTo build, type:\n\n```\nmake\n```\n\nTo build the test programs I used to develop individual features, run:\n\n```\nmake test\n```\n\nTo play the game, run:\n\n```\n./peltar\n```\n\nYou can run in fullscreen mode with the `-f` command line flag.\nThe window width/height can also be set via the command line:\n\n```\n./peltar -w800 -h600\n```\n\nPlaying\n-------\n\nIt's a two player turn-based game on a single computer.\n\n* The mouse is used to set a firing direction.\n  There are little crosshairs next to the player ship\n  (a sphere, because I had already written a sphere renderer).\n* The strength of the shot is controlled using the mouse scroll\n  wheel, and is indicated by the bar at the top of the screen.\n* Fire by clicking the mouse button.\n\nThe screen border colour indicates which player's turn it is.\n\nThe game ends when either player ship is hit.\n\n### Fooling around\n\nSince it was primarily made for playing around with graphics and procedural\ngeneration, there are a few keys that can be used to change things.\n\n| Key | Action                                   |\n| --- | ---------------------------------------- |\n| `a` | Toggle planet rotation animation on/off. |\n| `b` | Generate a new background star-scape.    |\n| `l` | Toggle the 3D lighting effect on/off.    |\n| `t` | Generate new planet textures.            |\n| `z` | Toggle the zoomed-out view.              |\n\nThere are also several test programs.  My favourites are:\n\n* `./test-texture` shows an Earth texture I found on the internet and my\n  attempt to generate something close to an Earth-like planet.  It was\n  helpful while tweaking the texturing code.  The `t` key generates a new\n  random planet texture.  I never got around to adding ice caps at the poles.\n\n* `./test-planet` was the first thing written to test the sphere rendering\n  algorithm.  If run with any command line argument, it will render a fixed\n  number of frames of planet rotation and then exit.  I used it to benchmark\n  different optimisations for performance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlsa%2Fpeltar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlsa%2Fpeltar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlsa%2Fpeltar/lists"}