io-game - Synchronizing various RPG elements over the network with sockets.

栏目: IT技术 · 发布时间: 4年前

内容简介:io-game is a networking prototype using sockets and express to communicate over the network, p5.js for the graphics and input, and electron.js for cross-platform support. The end goal is to create a online RPG syncing over various elements such as NPCs, ch

io-game - Synchronizing various RPG elements over the network with sockets.

io-game is a networking prototype using sockets and express to communicate over the network, p5.js for the graphics and input, and electron.js for cross-platform support. The end goal is to create a online RPG syncing over various elements such as NPCs, chat messages and other transforms.

Thanks to electron the game has the potential to run on Windows, Linux, Mac and any web browser.

Due to the limitations of the p5.js graphics library and the complexity of three.js, this project has been discontinued and is now a relic in time. I'm still open to working on it if anyone has any suggestions.

Feel free to contact me on Discord ( valk#3277 ).

Table of Contents

Setup

  1. Clone https://github.com/valkyrienyanko/io-game-v2.git
  2. Download and install LTS Node.js
  3. Make sure you have yarn installed npm i -g yarn
  4. Run yarn install
  5. Start server with yarn dev:server
  6. Create a client by opening up localhost:7777/ in your browser

If you're using nodemon, the server will automatically restart whenever code has been changed. If you ever need to restart the server manually you can do so with the rs command. Nodemon is used by default when using yarn dev:server . You can use node . instead if you prefer.

Building

Use yarn build to build the electron app.

Debugging

Server

The server will spit out errors directly to the server console. If you're using nodemon, it will restart the server when changes are made to any of the files.

Browser

Viewing the developer console depends on which browser you're using. Here are some hotkeys to take note of.

Chrome Firefox Opera
CTRL + SHIFT + J CTRL + SHIFT + J CTRL + SHIFT + I

Electron

An external debugger will automatically be attached if you run the app through yarn dev:client . Note that this has not been tested and may not even be the right way to go about debugging electron.

Libraries


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

游戏编程权威指南

游戏编程权威指南

Mike McShaffry 麦克沙福瑞、David “Rez” Graham 格雷海姆 / 师蓉、李静、李青翠 / 人民邮电 / 2016-3 / 99.00元

全书分为4个部分共24章。首部分是游戏编程基础,主要介绍了游戏编程的定义、游戏架构等基础知识。 第二部分是让游戏跑起来,主要介绍了初始化和关闭代码、主循环、游戏主题和用户界面等。 第三部分是核心游戏技术,主要介绍了一些*为复杂的代码 示例,如3D编程、游戏音频、物理和AI编程等。 第四部分是综合应用,主要介绍了网络编程、多道程序设计和用C#创建工具等,并利用前面所讲的 知识开发出......一起来看看 《游戏编程权威指南》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

在线进制转换器
在线进制转换器

各进制数互转换器

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具