简体   繁体   English

可以在nodeJS中创建3D多人游戏服务器

[英]Possible to create 3D multiplayer game server in nodeJS

Is it possible to create a game server with node JS for a 3D windows C++ game? 是否可以使用节点JS为3D Windows C ++游戏创建游戏服务器?

Is there a way to create the world server of for the game, login, character server is fairly easy to do and is quite possible with node. 有没有办法为游戏创建世界服务器,登录,角色服务器相当容易做到,并且很可能与节点。

But when it comes to the Map server, where it calculates object collision and character positions. 但是当涉及到地图服务器时,它会计算对象碰撞和角色位置。 How is this properly done? 这怎么做得好? and can it be done with node JS? 可以用节点JS完成吗?

It can be done the same way as any other multiplayer server would be done, simply with different (and maybe more complex) game logics. 它可以像完成任何其他多人游戏服务器一样完成,只需使用不同的(也可能更复杂的)游戏逻辑。

You need to implement the 3D physics of the world (that is: object collision logics, character position etc.) both inside the Node.js server and inside the client, and make them communicate via UDP or TCP sockets. 您需要在Node.js服务器内部和客户端内部实现世界的3D物理(即:对象冲突逻辑,字符位置等),并使它们通过UDP或TCP套接字进行通信。

As for the multiplayer communication techniques, I'd recommend you to read this guide: http://gafferongames.com/networking-for-game-programmers/ 至于多人通信技术,我建议你阅读本指南: http//gafferongames.com/networking-for-game-programmers/

Regarding physics over network, you should take a look a this, always from the same author: http://gafferongames.com/game-physics/networked-physics/ 关于网络物理,你应该看看这个,总是来自同一作者: http//gafferongames.com/game-physics/networked-physics/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM