V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
GSANDLY

用 JavaScript 写了个经典的贪吃蛇游戏

  •  
  •   GSANDLY · Mar 27, 2017 · 2848 views
    This topic created in 3317 days ago, the information mentioned may be changed or developed.

    https://github.com/GSANDLY/hungry-snake 第一次发帖,请大家批评指正!谢谢!

    Supplement 1  ·  Mar 28, 2017
    现在可以按住方向键加速移动啦
    3 replies    2017-03-28 17:55:55 +08:00
    tux
        1
    tux  
       Mar 28, 2017
    1.不能加速移动,比如往右的时候,再按右,不能加速
    2.分辨率太高的时候,蛇太小,最好限制一下固定界面大小
    GSANDLY
        2
    GSANDLY  
    OP
       Mar 28, 2017
    @tux 有道理,谢啦,我改进一下
    GSANDLY
        3
    GSANDLY  
    OP
       Mar 28, 2017
    现在可以按住方向键加速移动啦
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3564 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 11:10 · PVG 19:10 · LAX 04:10 · JFK 07:10
    ♥ Do have faith in what you're doing.