{"id":16207910,"url":"https://github.com/asancai/potatoglory","last_synced_at":"2026-02-22T20:34:10.754Z","repository":{"id":170156790,"uuid":"113327081","full_name":"AsanCai/PotatoGlory","owner":"AsanCai","description":"一个双人在线射击手游","archived":false,"fork":false,"pushed_at":"2018-10-18T01:42:02.000Z","size":38868,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"android","last_synced_at":"2025-09-04T02:53:43.503Z","etag":null,"topics":["csharp","photon","socket","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AsanCai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-12-06T14:33:01.000Z","updated_at":"2024-09-27T14:30:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"13541a21-7877-4414-b7a3-89a1cb54d72a","html_url":"https://github.com/AsanCai/PotatoGlory","commit_stats":null,"previous_names":["asancai/potatoglory"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AsanCai/PotatoGlory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsanCai%2FPotatoGlory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsanCai%2FPotatoGlory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsanCai%2FPotatoGlory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsanCai%2FPotatoGlory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsanCai","download_url":"https://codeload.github.com/AsanCai/PotatoGlory/tar.gz/refs/heads/android","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsanCai%2FPotatoGlory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29726026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"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":["csharp","photon","socket","unity3d"],"created_at":"2024-10-10T10:14:46.439Z","updated_at":"2026-02-22T20:34:10.732Z","avatar_url":"https://github.com/AsanCai.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 2D-Shooter\n\n---\n1. 项目\n\n    本项目是一个基于[Unity3D游戏引擎](https://unity3d.com/cn/)和[Photon网络引擎](https://www.photonengine.com/zh-CN/Photon)开发的双人射击手游，大部分素材来源于Unity Assets Store上一个免费的单机demo[2D Platformer](https://assetstore.unity.com/packages/essentials/tutorial-projects/2d-platformer-11228)。有兴趣可以下载[游戏安装包](http://download-1253364479.cosgz.myqcloud.com/PotatoGlory.apk)进行体验，如遇到什么问题欢迎发邮件给我进行交流。\n\n---\n\n\n2. 游戏功能\n\n    游戏的主要功能包括：\n* 用户注册登录功能（*因为Photon不提供登录服务器，因此需要自己搭建数据库并编写服务端程序，本项目的服务端程序仓库为[PotatoGloryGameServer](https://github.com/AsanCai/PotatoGloryGameServer)*）\n* 创建游戏房间，进入多人游戏场景功能\n* 同步游戏数据，实现玩家之间的交互功能\n* 技能冷却效果\n* 实现虚拟摇杆控制人物移动功能\n\n---\n\n3. 项目运行说明\n\n* 下载[Photon-Server](https://www.photonengine.com/en-US/Download/Photon-Server-SDK_v4-0-29-11263.exe)，下载之前需要先注册一个Photon账号。下载完成后，双击下载好的exe文件进行解压\n* 进入解压目录，打开*deploy/bin_Win64/PhotonControl.exe*，然后在任务栏右键Photon图标，选择*LoadBalancing(MyCloud)-\u003eStar as Application*，接着选择*Game Server IP Config-\u003eSet Public IP*，并记住显示的ip地址\n* clone本项目到本地，用Unity打开之后，在*Photon Unity Networking-\u003eResources-\u003ePhotonServerSettings*里设置**Hosting**为**Self Hosted**，然后填入上一步的ip地址\n* clone[服务器项目](https://github.com/AsanCai/PotatoGloryGameServer)到本地，创建数据库之后，设置数据库连接参数、主机ip（建议在本地运行，ip填127.0.0.1）和端口\n* clone本项目到本地，打开StartScene，点击ClientManager，在Inspector窗口填写主机ip和端口\n* 运行服务器程序（因为是.net Core程序，所以需要安装.net Core和相应的.net framework）\n\n---\n\n4. 游戏截图\n\n![游戏主界面](https://github.com/AsanCai/2D-Shooter/raw/android/Images/img1.png)\n\n![游戏大厅](https://github.com/AsanCai/2D-Shooter/raw/android/Images/img2.png)\n\n![创建房间](https://github.com/AsanCai/2D-Shooter/raw/android/Images/img3.png)\n\n![创建房间成功](https://github.com/AsanCai/2D-Shooter/raw/android/Images/img4.png)\n\n![加入房间](https://github.com/AsanCai/2D-Shooter/raw/android/Images/img5.png)\n\n![准备开始](https://github.com/AsanCai/2D-Shooter/raw/android/Images/img6.png)\n\n![开始游戏](https://github.com/AsanCai/2D-Shooter/raw/android/Images/img7.png)\n\n![游戏失败](https://github.com/AsanCai/2D-Shooter/raw/android/Images/img8.png)\n\n---\n\n5. 项目感想\n\n    因为Photon的官网上没有对Api的详细说明，只能自己看着官方demo自己研究每个api的用法，踩了无数个坑。此外，由于一开始对Unity3d的运用也不是很熟练，我花费了很多时间解决了很多之前没想过的小问题。再加上最后自己在服务器上搭建数据库编写服务器程序的时候也踩了很多坑，这个项目的制作过程可以说是十分艰难。但踩完这么多坑之后，我也收获颇丰，因此我打算重新整理整个项目之后，在[个人博客](https://asancai.github.io/)写一个系列教程，与大家分享交流。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasancai%2Fpotatoglory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasancai%2Fpotatoglory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasancai%2Fpotatoglory/lists"}