{"id":20961543,"url":"https://github.com/apetenchea/spaceinvaders","last_synced_at":"2025-07-20T22:34:13.389Z","repository":{"id":79890250,"uuid":"75562782","full_name":"apetenchea/SpaceInvaders","owner":"apetenchea","description":"Multiplayer game made from scratch.","archived":false,"fork":false,"pushed_at":"2022-03-07T08:48:13.000Z","size":921,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T07:28:26.681Z","etag":null,"topics":["java-8","multiplayer-game","space-invaders"],"latest_commit_sha":null,"homepage":"","language":"Java","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/apetenchea.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":"2016-12-04T20:33:28.000Z","updated_at":"2024-02-06T14:56:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"e3536b51-c082-4fb5-a03e-4641a43e5573","html_url":"https://github.com/apetenchea/SpaceInvaders","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/apetenchea/SpaceInvaders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apetenchea%2FSpaceInvaders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apetenchea%2FSpaceInvaders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apetenchea%2FSpaceInvaders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apetenchea%2FSpaceInvaders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apetenchea","download_url":"https://codeload.github.com/apetenchea/SpaceInvaders/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apetenchea%2FSpaceInvaders/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266210843,"owners_count":23893338,"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":["java-8","multiplayer-game","space-invaders"],"created_at":"2024-11-19T02:14:12.113Z","updated_at":"2025-07-20T22:34:13.382Z","avatar_url":"https://github.com/apetenchea.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/apetenchea/SpaceInvaders.svg?branch=master)](https://travis-ci.org/apetenchea/SpaceInvaders)\n\n# SpaceInvaders - a multiplayer game made from scratch.\nI've always wondered what is going on behind a multiplayer game, so I decided to make one in order to find out!\nInspired by the well known classic, up to 3 players may team up in an online battle agains the invaders.\n\nThe required Java version is [**Java 8**](http://www.oracle.com/technetwork/java/javase/overview/java8-2100321.html) or newer.\n\n## Building\nUsing maven:\n```\nmvn package\n```\n\nJust compiling the source into *.class* files:\n1. Go to where the source files are (src/main/java)\n2. Run:\n  ```Shell\n  mkdir target\n  ```\n3. Replace \u003ci\u003epath_to_gson\u003c/i\u003e with the path to \u003ci\u003egson-2.8.0.jar\u003c/i\u003e and run::\n  ```Shell\n  javac -d target -classpath path_to_gson -sourcepath . spaceinvaders/SpaceInvaders.java\n  ```\n\n## Usage\nThe game consists of two parts: a client and a server.\n\n### Server\nStarting up:\n```\njava -jar spaceinvaders*.jar server port [verbose]\n```\nThe script [server.sh](https://github.com/apetenchea/SpaceInvaders/blob/master/server.sh) contains an example of how to start a server on your machine, on port 5412. If you add the ***verbose*** argument, the logging is going to be more verbose.\nUsing the *.jar* file is recommended. Because when running a `.jar` Java handles resourced differently from when you are running *.class* files, a small modification in the code is required in the second case.\nIn the class [Config](https://github.com/apetenchea/SpaceInvaders/blob/master/src/main/java/spaceinvaders/Config.java), there is a field:\n```Java\nprivate static final transient Boolean JAR_FILE = true;\n```\nThis field must be set to `false` in case the target is not a *.jar* file.\n\n### Client\nStarting up:\n```\njava -jar spaceinvaders*.jar client [verbose]\n```\n\nThe script [client.sh](https://github.com/apetenchea/SpaceInvaders/blob/master/client.sh) contains an example of how to run the client. If you add ***verbose*** as an argument, the logging is going to be more verbose. In order to play the game, you must choose an username, how many players your team shall you team have, and then connect to a running server.\n\n## Configuration files\n- [app.json](https://github.com/apetenchea/SpaceInvaders/blob/master/src/main/resources/config/app.json) contains runtime information about the application. In case of a lan party, the ***lanGame*** field should be set to ***true***, thus configuring the game to prefer the UDP protocol over TCP.\n- [client.json](https://github.com/apetenchea/SpaceInvaders/blob/master/src/main/resources/config/client.json) contains the client's configuration.\n- [game.json](https://github.com/apetenchea/SpaceInvaders/blob/master/src/main/resources/config/game.json) is used to configure the gameplay.\n- [resources.json](https://github.com/apetenchea/SpaceInvaders/blob/master/src/main/resources/config/resources.json) is used to locate resources.\n\n## Code\nThe code follows the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html) and is checked using [checkstyle](http://checkstyle.sourceforge.net/).\n\n## Documenation\nDocumenation is generated using [javadoc](http://docs.oracle.com/javase/8/docs/technotes/tools/windows/javadoc.html).\nThe script [getDoc.sh](https://github.com/apetenchea/SpaceInvaders/blob/master/getDoc.sh) handles this.\n\n## Credits for the materials used in this game\nIcons made by \u003ca href=\"http://www.freepik.com\" title=\"Freepik\"\u003eFreepik\u003c/a\u003e, \u003ca href=\"http://www.flaticon.com/authors/madebyoliver\" title=\"Madebyoliver\"\u003eMadebyoliver\u003c/a\u003e, \u003ca href=\"http://www.flaticon.com/authors/roundicons\" title=\"Roundicons\"\u003eRoundicons\u003c/a\u003e, \u003ca href=\"http://www.flaticon.com/authors/alfredo-hernandez\" title=\"Alfredo Hernandez\"\u003eAlfredo Hernandez\u003c/a\u003e from \u003ca href=\"http://www.flaticon.com\" title=\"Flaticon\"\u003ewww.flaticon.com\u003c/a\u003e are licensed by \u003ca href=\"http://creativecommons.org/licenses/by/3.0/\" title=\"Creative Commons BY 3.0\" target=\"_blank\"\u003eCC 3.0 BY\u003c/a\u003e.\nSome of the original icons were edited by [luciamoga](https://github.com/luciamoga).\n\n## Screenshot\n![Screenshot.png](https://github.com/apetenchea/SpaceInvaders/blob/master/screenshot.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapetenchea%2Fspaceinvaders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapetenchea%2Fspaceinvaders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapetenchea%2Fspaceinvaders/lists"}