Giter Site home page Giter Site logo

danmaku-game's Introduction

弹幕互动游戏

由直播观众作为玩家,发送弹幕进行操作的游戏。
分为弹幕扫雷、弹幕数独两个小游戏。
只支持Bilibili平台。

用法

  1. 安装NodeJSelectron
  2. npm start执行程序。

文件说明

  • index.html:主文件。当前该文件中指定开始的是数独游戏。如果要改成扫雷游戏,把其中的sudoku.js改成mine-sweeping.js,或者把mine-sweeping.html重命名成index.html即可。
  • index.js:游戏的主框架。当前游戏默认连接到Bilibili直播间4449590(魔方12139的直播间),如需修改,在创建bs变量时指定所需的直播间号码。
  • mine-sweeping.js:扫雷游戏的逻辑主体。具体玩法和规则见游戏中说明。
  • sudoku.js:数独游戏的逻辑主体。同上。
  • sudoku-problem-*.txt:数独游戏的题目。0, 1, 2, 3分别代表四个不同的难度。如果需要更换题目,可以修改其内容。
  • 生成器网站.txt:数独游戏题目生成器网站。可以利用其中的JavaScript脚本从该网站获取题目。

更多信息请自行阅读各文件内容。

预览

鸣谢

  • Bilibili UP主红色xyz(322954448)。程序中直播间连接与弹幕抓取部分参考了他的专栏。

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.