Git Product home page Git Product logo

kingston-csj / jforgame Goto Github PK

View Code? Open in Web Editor NEW
871.0 53.0 288.0 1.98 MB

jforgame是一个一站式游戏服务器开发框架。包含游戏服务器开发所需要的各种组件,比如网关,socket服务端与客户端,自定义高效消息编解码,游戏热更新,游戏通用工具等等。包含游戏服,跨服,匹配服,后台管理系统等实现,同时提供大量业务案例以供学习。亦可用于其他socket应用,例如及时聊天等。

License: Apache License 2.0

Java 97.40% Shell 0.36% JavaScript 0.59% PLpgSQL 1.24% HTML 0.30% Groovy 0.11%
java game mina netty socket-io socket-io-client socket-io-server socketio websocket

jforgame's Issues

使用IDEA运行项目失败,有报错

使用的是IDEA 2021.1版本,Java环境是:Java(TM) SE Runtime Environment (build 1.8.0_181-b13)

打开工程后自动下载maven相关插件,然后就报错了:
Cannot resolve org.apache.mina:mina-core:2.0.7

看了下pom.xml里面也有org.apache.felix相关的plugin,不知道是哪里的问题,麻烦看下该如何配置吧。

我直接点了build,提示缺少包:
D:\Src\jforgame\hotswap\hotswap-util\src\main\java\jforgame\hotswap\HotSwapUtil.java:3:28
java: 程序包com.sun.tools.attach不存在

请问是因为上面的报错导致没下载完全么,还是需要进行什么设置,或者安装特殊的jdk呢?

onekey.sh运行报错,缺少jar包

Downloading: https://repo.maven.apache.org/maven2/org/jforgame/jforgame-common/1.0.0/jforgame-common-1.0.0.jar
Downloading: https://repo.maven.apache.org/maven2/org/jforgame/jforgame-net/1.0.0/jforgame-net-1.0.0.jar
Downloading: https://repo.maven.apache.org/maven2/org/jforgame/jforgame-orm/1.0.0/jforgame-orm-1.0.0.jar
Downloading: https://repo.maven.apache.org/maven2/org/jforgame/hotswap-util/1.0.0/hotswap-util-1.0.0.jar

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:24.025s
[INFO] Finished at: Thu Jan 06 16:33:04 CST 2022
[INFO] Final Memory: 11M/130M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project jforgame-server: Could not resolve dependencies for project org.jforgame:jforgame-server:jar:1.0.0: The following artifacts could not be resolved: org.jforgame:jforgame-common:jar:1.0.0, org.jforgame:jforgame-net:jar:1.0.0, org.jforgame:jforgame-orm:jar:1.0.0, org.jforgame:hotswap-util:jar:1.0.0: Could not find artifact org.jforgame:jforgame-common:jar:1.0.0 in public (http://maven.aliyun.com/nexus/content/groups/public/) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

缺少 jforgame-net-1.0.0.jar类似的jar包

at com.kingston.jforgame.server.game.core.SchedulerManager.scheduleAtFixedRate(SchedulerManager.java:41)

java.lang.NullPointerException
at com.kingston.jforgame.server.game.core.SchedulerManager.scheduleAtFixedRate(SchedulerManager.java:41)
at com.kingston.jforgame.server.robot.Robot.runAi(Robot.java:73)
at com.kingston.jforgame.server.robot.handler.CreatePlayerHandler.onMessageReceive(CreatePlayerHandler.java:13)
at com.kingston.jforgame.server.robot.RobotSession.receiveMessage(RobotSession.java:39)
at com.kingston.jforgame.server.robot.Robot$ClientHandler.messageReceived(Robot.java:103)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
我这里本机测试robot的demo不正常,
1、(SchedulerManager.java:41)里的貌似不能被初始化service对象是null的,
2、运行demo数据库会重复创建玩家
不过虽然爆异常,服务端可以看到客户端发过来的消息了 @kingston-csj

jforgame-server/pom.xml 遇到一个编译错误

jforgame

把项目导入idea之后,jforgame-server/pom.xml遇到了一个编译错误,如上图;

本地maven版本3.3.9,更新到最新的3.5.2之后还是显示错误;

然后查看了一下 apache maven 官网,,然后我直接删除了这一行,请问一下这个应该对打jar包没有影响的吧?

启动异常

启动异常
[06 02:05:35,420 ERROR] [main] server.ServerStartup - server start failed
java.io.FileNotFoundException: configs/version.properties (No such file or directory)

配置表 表名大小写问题

  • 导入的data sql里表名非驼峰命名方式,比如configconstant;
  • 但是在代码里的sql的表名是驼峰的
String sql = "SELECT * FROM ConfigConstant";

导致启动的时候找不到表报错:

java.sql.SQLSyntaxErrorException: Table 'game_data_001.ConfigConstant' doesn't exist

我这边是Debian,mysql大小写敏感了。
谢谢楼主开源~

匹配模块的逻辑是否可以分享下?

看了下匹配模块的代码,看到声明了积分和战力字段,后续的操作没有详细给出,说下我的粗略方案,会放入redis匹配池中,按照战力或者积分排序,取相邻的两个放入匹配结果中,如果匹配池中只有一个人的情况就需要给机器人,这一块的逻辑如果换做是你,是怎么考虑的呢?谢谢分享

C#客户端通信

请问如果用C#写的客户端 比如unity3D 该怎么与之通信? C#没法直接用NioSocketConnector IoSession之类的

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.