• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

cdreier/impactConnect: nodeJS plugin for impactjs game engine

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

cdreier/impactConnect

开源软件地址:

https://github.com/cdreier/impactConnect

开源编程语言:

JavaScript 100.0%

开源软件介绍:

impactConnect

this is my implementation of a impact plugin for realtime multiplayer games with node/socket.io

requirements

  1. nodejs and socket.io for windows user i highly recommend nodejs-win (http://code.google.com/p/nodejs-win/) until npm works without massive pain.
  2. a normal webserver like apache (xampp, wampp... etc)
  3. the impact game engine (http://impactjs.com/)

demo

http://www.youtube.com/watch?v=4-ib0qJsyrE

to run the demo, just put a copy of impact in the lib folder and start the server ("node impactConnectServer.js") in case of several security restrictions, you have to start a webserver and open the index.html via http://localhost/impactConnect/

short infos and explanations

  • socket.io removes all prototypes from classes and objects for no reason (or i just dont know the reason), so im sending strings and use eval on client side (in spawning entities and moving function). example for moving animation: var newAnim = "ent.anims."+data.remoteAnim; ent.currentAnim = eval(newAnim);

  • reconnecting does not work for now

  • extended main.js by "getEntityByRemoteId"

  • if you want to run it not on localhost, you have to change the server in 2 files: index.html:

<script type="text/javascript" src="http://localhost:1337/socket.io/socket.io.js"></script>

impactconnect.js: this.socket = io.connect('http://localhost:'+port, {...

  • if you need more logging serverside, just uncomment "io.set('log level', 1);" in impactConnectServer.js

  • added announce method

  • added notification manager from Abraham Walters to announce to everyone




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
tuyuer/GameEngine发布时间:2022-06-07
下一篇:
luciasoftware/lucia: An audio game engine written in python发布时间:2022-06-07
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap