Code Monkey home page Code Monkey logo

codegame's Introduction

Hey there, I'm Zihua 👋

I'm super passionate about creating tools that make life easier and more fun for developers like you.

Right now, I'm all about WYSIWYG editor frameworks and related distributed data structures. I am primarily maintaining the Quill editor, including Quill, Parchment, and Delta.

I created ioredis, one of the most popular clients for Redis. It was acquired by Redis Ltd. in 2023.

Besides all that, I also dabble in making macOS and iOS apps. Medis is a delightful and popular Redis GUI tool I developed. The first version was developed with Electron and has now been rewritten in Swift.

Feel free to explore my repositories and hit me up if you've got any questions or just want to chat! I'm here for you.

codegame's People

Contributors

gaz3ll3 avatar hayeah avatar luin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codegame's Issues

增加快捷键

Ctrl + S 储存代码
Ctrl + P 预览
Alt + P 目标对战用户编辑框获取焦点

另外希望储存成功不弹窗,往旁边显示几秒后隐藏挺好,上传失败的话保留错误信息。

readme错了吧

cp config _sample.json development.json

readme安装步骤写错了吧,应该是

cd config
cp _sample.json development.json

排行榜序号

目前的榜单上, 很多人的名字前的序号和自己的主页显示的不一样。

原因是没有第五名,直接从第四到第六。是第五名注销了吗?

更新:不仅没有第五名,整个榜单一共少了大概八个名次,第一百显示的是一百零八。

使用 Canvas 重写比赛动画

现在是使用 CSS Animation 实现的动画,简单但是效果在 Safari 或一些浏览器上效果不好。考虑使用 Canvas 重写。

用户id有“非英文”的无法作为练习目标

在编辑器下如果填写对手ID可以模拟对战
但如果对方ID里面有非英文字符的情况下点预览
预览按钮变灰色然后无法显示战斗结果(也没有错误提示)

比如 McFog Wang (中间有空格)

增加单步调试功能

请求增加一个调试方法。

因为在对称的地图与自己对战的情况下,两个坦克的行为都是一样的,往往不能调试出什么东西

所以希望加入以下功能:

不填写调试对象的情况下进入单步调试模式

  1. 对战会一帧一帧的播放
  2. 用户不按键的情况下调试暂停
  3. 用户使用键盘 上下左右 空格(发炮) 回车(跳过此帧,无动作) 来控制自己AI的敌人

玩家通过键盘控制敌人可以更好的形成我们需要调试的对战状态
而且可以尽可能的测试一些在实际对战中可能出现的任何情况

玩家可以手动的调戏自己的AI,从而找出自己AI的不足(严肃

大家可以讨论一下,因为我自己是挺想有这样的调试方法,不知道实现起来会不会很困难。

你们这些用 Math.random 的人...要不要禁用 Math.random?

你们能想象到大半夜的我刚改完解析引擎,用我的代码随便挑了个人对战,前两次正常,第三次竟然发现结果不一样了。于是忐忑地换了个人,结果也是两轮结果完全不一样。我当时就吓坏了好么。。。结果发现随便挑的两个人都用了 Math.random。

我觉得用 Math.random 对于 AI 来说意义不是很明显,而且每次结果是不确定的,不知道对比赛来说是不是件好事。大家可以讨论一下

建议调试模式下加入随机用户作为训练目标

现在可以选择比配对手了这个不错。
不过建议在旁边加多一个勾选"随机练习对手"的选项。
这样开着5倍速可以快速测试自己的算法?(不知道会不会大大增加服务器负担)

就从top100里面随机就好~

如果再做好一点的话,应该是

  1. 勾选“随机练习对手”
  2. 要是输了,就去掉这个勾选
  3. 这时候“填写对手名字”的框框里面就自动填充之前那个随机对手的名字(方便改代码后再测试)

不加也没所谓,就是懒得去排行榜找人来训练了而已

支持多个地图

现在只有一个地图,很容易写出针对的算法。比赛时应该使用专用且保密(或随机)的比赛地图

如何在本地运行

运行环境 Ubuntu 14.04 , node 0.11+ , 安装了redis 2.4+.

依照在slack里的办法能够用github账户登录,但是里面没地图,地图应该是用数据库储存的。但是请求 /map会给出 'not admin' , 我读了下代码,是在config里要加个login什么的吗?完全不熟悉node。

后来我把isAdmin设置为true,/map可以访问,只能看见编辑size的form还有命名的form,但是编辑地图的图形界面还是看不到。不知道为什么,可能是我只改了isAdmin这一个地方。

BTW: heroku上可以跑这个吗?如果可以的话,可以用多个虚拟机来分担压力吗?每次挑战请求收到的时候分配到某个空闲的虚拟机上运行。不知道这样是不是有用?

开发期间的 "练习模式“

提供一个功能随机从数据库取一个 AI 和你对战,不算分的。

这样可以避免针对某个玩家人调整自己的 AI

不知道为什么Bug了

玩家: 0 [帧数: 4 执行时间: 21ms] Script execution timed out.editor.js:1 o.print
不知道是我的代码问题还是什么问题,报告o.print出错

【建议】增加倒车功能

除了前进以外,是否可以有倒车功能(可以比前进慢),在做防弹逃逸和两车相遇时有更多的策略。

例如:
在狭窄通道中迎面遇到子弹的策略:

  1. 掉头2+前进1+转向1+前进1=5
  2. 倒车2+转向1+前进1=4
  3. 前进1+转向1+前进1=3(还要算上子弹提前到达以及前行通道是否可行)

npm run build 出错

[email protected] build /home/zp/CodeGame-1.1.0
gulp build

/usr/bin/env: "node": 没有那个文件或目录

npm ERR! Linux 4.8.0-22-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] build: gulp build
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] build script 'gulp build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the CodeGame package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs CodeGame
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls CodeGame
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/zp/CodeGame-1.1.0/npm-debug.log

这算bug吗?

if 我的坦克朝左,then 向左转,完毕,这样我的坦克应该是向下了。但到下一轮获取我的坦克方向的时候还是left。

npm run build出错

events.js:141
      throw er; // Unhandled 'error' event
      ^
CssSyntaxError: /home/feng/code/CodeGame/client/css/app.css:1412:20: Missed semicolon
    at Input.error (/home/feng/code/CodeGame/node_modules/postcss/lib/input.js:65:21)
    at Parser.checkMissedSemicolon (/home/feng/code/CodeGame/node_modules/postcss/lib/parser.js:440:30)
    at Parser.decl (/home/feng/code/CodeGame/node_modules/postcss/lib/parser.js:277:18)
    at Parser.word (/home/feng/code/CodeGame/node_modules/postcss/lib/parser.js:136:30)
    at Parser.loop (/home/feng/code/CodeGame/node_modules/postcss/lib/parser.js:61:26)
    at Object.parse [as default] (/home/feng/code/CodeGame/node_modules/postcss/lib/parse.js:21:12)
    at new LazyResult (/home/feng/code/CodeGame/node_modules/postcss/lib/lazy-result.js:54:42)
    at Processor.process (/home/feng/code/CodeGame/node_modules/postcss/lib/processor.js:30:16)
    at /home/feng/code/CodeGame/node_modules/myth/lib/features.js:131:25
    at Rework.use (/home/feng/code/CodeGame/node_modules/rework/index.js:50:3)

草丛中移动一格需要两帧

一个建议,草丛中移动一个需要两帧时间,有如下好处:

  1. 降低藏匿于草丛中优势,迫使敌人不会一直在草丛中转圈圈
  2. 提高寻路系统的设计难度,提高坦克的智能的区分度

预览出错

点击创建我的AI后,进入代码编辑页面,然后直接点预览的话服务器成功发送一个POST包但是浏览器并没有反应,此时预览按钮灰色.public\js中app.js、vs.js红色报错“Cannot invoke an excpression whose type lacks a call signature.”

内存泄露

运行一天占用内存到 1GB,导致服务崩溃

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.