Giter Site home page Giter Site logo

050602 / tank-game-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zfoo-project/tank-game-server

0.0 1.0 0.0 217.55 MB

进击的坦克的游戏服务器

License: Apache License 2.0

Shell 0.02% JavaScript 14.25% Java 69.80% CSS 0.61% HTML 1.64% Vue 13.46% SCSS 0.23%

tank-game-server's Introduction

Ⅰ. 进击的坦克(The Fight of Tanks)

  • zfoo框架的游戏服务器的演示项目
  • 单服运行代码和分布式运行的代码几乎一致
  • 上能写游戏,下能写网站,单服,分布式,网关,异步调用无所不能,所以叫万能的RPC框架

Ⅱ. 环境要求

  • JDK 11+
  • MongoDB 4.2
  • Zookeeper 3.6.1

Ⅲ. 本地单服运行

  • admin为web资源服务器提供游戏入口和后台管理系统
  • single为单服游戏服务器,single-boot是用了spring boot自动化配置的single,代码一致
1. 在浏览器中运行游戏使用websocket的服务器启动入口,即ApplicationTest.startWebsocketApplication()
2. 在untiy种运行使用tcp的服务器启动入口,即ApplicationTest.startApplication()

本地游戏入口,http://localhost:9600/game/index.html
本地后台管理入口,http://localhost:9600/

Ⅳ. 本地分布式运行

  • admin为web资源服务器提供游戏入口和后台管理系统
  • gateway网关
  • cache提供缓存服务
  • home提供基本业务逻辑服务
本地游戏入口,http://localhost:9600/game/index.html
本地后台入口,http://localhost:9600/

Ⅴ. 部署运行

单服部署命令:
sh /deploy.sh stopUpdateStart /usr/local/tank/admin/admin-1.0.jar /usr/local/tank/admin
sh /deploy.sh stopUpdateStart /usr/local/tank/single/single-1.0.jar /usr/local/tank/single


分布式部署命令
sh /deploy.sh stopUpdateStart /usr/local/tank/admin/admin-1.0.jar /usr/local/tank/admin
sh /deploy.sh stopUpdateStart /usr/local/tank/cache/cache-1.0.jar /usr/local/tank/cache
sh /deploy.sh stopUpdateStart /usr/local/tank/gateway/gateway-1.0.jar /usr/local/tank/gateway
sh /deploy.sh stopUpdateStart /usr/local/tank/home/home-1.0.jar /usr/local/tank/home

Ⅵ. 游戏截图

Image text Image text Image text Image text Image text Image text

Ⅵ. 后台系统截图

Image text Image text Image text Image text Image text Image text

tank-game-server's People

Contributors

godotg avatar 37sir avatar 132982jianan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.