Coder Social home page Coder Social logo

qiaomengrui / tank-game-server Goto Github PK

View Code? Open in Web Editor NEW

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

0.0 0.0 0.0 242.42 MB

The Fight of Tanks

License: Apache License 2.0

Shell 0.18% JavaScript 7.71% C++ 12.96% Python 5.98% Java 34.33% Lua 1.25% Go 6.30% C# 9.49% TypeScript 10.28% CSS 0.03% GDScript 6.01% HTML 0.03% CMake 0.01% Vue 5.36% SCSS 0.08%

tank-game-server's Introduction

简体中文 | English

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

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

Ⅱ. 环境要求

  • 后端依赖 zfoo ,运行前先使用Maven install zfoo 前端依赖 lux-admin-vuetify3,目标创造最优秀的 vuetify3 的 Admin 开源模板
  • JDK 17+
  • MongoDB 4+
  • Zookeeper 3.6+

Ⅲ. 本地单服运行

  • admin为web资源服务器提供游戏入口和后台管理系统
  • single为单服游戏服务器,single-boot是用了spring boot自动化配置的single,代码一致
  • 单服启动不依赖zookeeper,所以无法和admin通信
  • 本地运行从test下运行,原因看FAQ ,实在有问题可以看看手把手的 zfoo 框架视频教程
1. 在浏览器中运行游戏使用websocket的服务器启动入口,即ApplicationTest.startWebsocketApplication()
2. 在untiy种运行使用tcp的服务器启动入口,即ApplicationTest.startApplication()

本地游戏测试入口,https://github.com/zfoo-project/tank-game-server/blob/main/single-boot/src/test/java/com/zfoo/tank/single/boot/client/MyTankClientTest.java
本地游戏入口,http://localhost:9600/game/index.html ,老版本unity无法下载已经弃用
本地后台管理入口,http://localhost:9600/

Ⅳ. 本地分布式运行

  • admin为web资源服务器提供游戏入口和后台管理系统
  • gateway网关
  • cache提供缓存服务
  • home提供基本业务逻辑服务
  • login提供http登录服务
  • 本地运行从test下运行,原因看FAQ ,实在有问题可以看看手把手的 zfoo 框架视频教程
本地游戏测试入口,https://github.com/zfoo-project/tank-game-server/blob/main/single-boot/src/test/java/com/zfoo/tank/single/boot/client/MyTankClientTest.java
本地游戏入口,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

132982jianan avatar 37sir avatar godotg avatar meiwei666 avatar qq564139153 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.